<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hello Paulo,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Virsh itself doesn't really have a "create" command. It can define domain based on xml.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
You either compose this xml yourself, or use virt-install to compose it for you. You can also use vzctl or install prl-disp-service and use prlctl.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
If we're talking about OpenVZ9, you can use these commands for virt-install:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
I.e. <span style="font-family: "Open Sans", sans-serif; font-size: 12pt;">To create a container do the following:</span>
<ol class="arabic" style="margin: 0px 0px 0px 40px; padding: 0px 0px 10px; font-family: "Open Sans", sans-serif; list-style: none; clear: left; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<li style="margin:0px 0px 10px">
<p style="margin:0px 0px 20px">Create a disk image with<span> </span><code class="docutils literal notranslate" style="margin: 0px; padding: 1px 4px; font-family: Inconsolata, serif; background: rgb(235, 235, 235);"><span class="pre" style="margin:0px">vzpkg</span></code>.
For example:</p>
<div class="highlight-text notranslate" style="margin: 0px 0px 20px; padding: 10px 20px; border: 1px solid rgb(235, 235, 235); line-height: 24px; font-family: Inconsolata, serif; overflow-x: auto; background: rgb(245, 245, 245); box-sizing: border-box;">
<div class="highlight" style="margin:0px">
<pre style="margin:0px"><span style="margin:0px"></span># mkdir -p /vz/mylinuxct
# vzpkg create image centos-7-x86_64 /vz/mylinuxct/mylinuxct.hdd
Creating Container root image at /vz/mylinuxct/mylinuxct.hdd (centos-7-x86_64)
<...>
Image was succesfully created at /vz/mylinuxct/mylinuxct.hdd
</pre>
</div>
</div>
</li><li style="margin:0px 0px 10px">
<p style="margin:0px 0px 20px">Create the container based on the disk image. For example:</p>
<div class="highlight-text notranslate" style="margin: 0px 0px 20px; padding: 10px 20px; border: 1px solid rgb(235, 235, 235); line-height: 24px; font-family: Inconsolata, serif; overflow-x: auto; background: rgb(245, 245, 245); box-sizing: border-box;">
<div class="highlight" style="margin:0px">
<pre style="margin:0px"><span style="margin:0px"></span># virt-install \
--connect vzct:///system \
--name mylinuxct \
--memory 2048 \
--disk 'path=/vz/mylinuxct/mylinuxct.hdd,boot_order=1,size=64' \
--graphics vnc,port=5903,listen=0.0.0.0
<...>
Starting install...
Domain creation completed.
You can restart your domain by running:
virsh --connect vzct:///system start mylinuxct</pre>
</div>
</div>
</li></ol>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Note, that is "vzct" driver, not "vz" or "openvz". It's a new driver implementation that uses libvzctl and vzevent instead of prl-disp-service integration.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Speaking of configuration you mentioned, they are not well documented at the moment. Easiest way for you to figure out how it translates into domain.xml is to use vzctl for configuration, and see how it reflects in the configuration file. Settings were designed
to reuse VM (QEMU) configuration schema where possible. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="Signature">
<div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div><br>
</div>
<div>Best Regards,</div>
<div>--</div>
<div>Pavel Vokhmyanin</div>
<div>Management and Integrations</div>
<div>Virtuozzo</div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>От:</b> users-bounces@openvz.org <users-bounces@openvz.org> от имени Paulo Coghi - Coghi IT <paulocoghi@gmail.com><br>
<b>Отправлено:</b> 1 апреля 2022 г. 8:41<br>
<b>Кому:</b> OpenVZ users <users@openvz.org><br>
<b>Тема:</b> [Users] Equivalent "virsh" commands to set container parameters like "prlctl set"</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hello OpenVZ community,<br>
<div><br>
</div>
<div>Now that new OpenVZ versions have officially migrated to virsh as the main management tool, I would like to ask which are the equivalent commands in vitsh to set parameters provided by "prlctl set", like --cpulimit, --cpuunits, --nodemask, --ioprio, --ioprio,
--iolimit, --rate, --ratebound.<br>
<br>
Also, is there any important step on virsh to ensure the creation of a container instead of a vm, like prlctl create --vmtype ct?<br>
<br>
<br>
Cordially,<br>
Paulo Coghi</div>
</div>
</div>
</body>
</html>