Hi all,
I'm playing with virsh, and I succeed to mange easily some KVM nodes.
But I have issues to size RAM of openvz guests.
virsh set by default the the memory to 256M on each guest instead of that I specify in the XML
I have to modify by end the variable PHYSPAGES on each /etc/vz/conf/id_of_my_vz.conf
Please follow the XML dump and the steps that I did.
Cheers,Aurelien
Log
----
1) Define openvz guest domain 103
#virsh -c openvz:///system define vztest.xml
Domain 103 defined from vztest.xml
2) Start the guest
#virsh -c openvz:///system start 103
Domain 103 started
#vzlist
CTID NPROC STATUS IP_ADDR HOSTNAME
103 20 running - -
3) Check memory size vz guest 103
#vzctl enter 103
entered into CT 103
#root@test:/# free -m
total used free shared buffers cached
Mem: 256 27 228 0 0 14
-/+ buffers/cache: 13 242
Swap: 512 0 512
vztest.xml
-----------
<domain type='openvz'>
<name>100</name>
<uuid>86c12009-e591-a159-6e9f-91d18b85ef78</uuid>
<memory unit='GiB'>1</memory>
<currentMemory unit='GiB'>1</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<devices>
<filesystem type='template' accessmode='passthrough'>
<source name='debian-7.0-x86_64'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<mac address='00:16:3e:1a:66:67'/>
<source bridge='br0'/>
<target dev='veth3'/>
</interface>
</devices>
</domain>
xmldump
--------
<domain type='openvz' id='103'>
<name>103</name>
<uuid>86c52009-e541-a159-6e9f-91d18b85ef79</uuid>
<memory unit='KiB'>0</memory>
<currentMemory unit='KiB'>0</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<filesystem type='template' accessmode='passthrough'>
<source name='debian-7.0-x86_64'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<mac address='00:16:3e:1a:66:67'/>
<source bridge='br0'/>
<target dev='veth3'/>
</interface>
</devices>
</domain>