Runing domain xml

vv.XMLDesc(0)

<domain type='kvm' id='17'>\n  <name>ub_test1</name>\n  <uuid>714dde02-76c9-7d45-25af-e50f0a54f4bc</uuid>\n  <memory unit='KiB'>545792</memory>\n  <currentMemory unit='KiB'>545792</currentMemory>\n  <vcpu placement='static' current='1'>4</vcpu>\n  <os>\n    <type arch='x86_64' machine='pc-1.0'>hvm</type>\n    <boot dev='cdrom'/>\n  </os>\n  <features>\n    <acpi/>\n  </features>\n  <clock offset='utc'/>\n  <on_poweroff>destroy</on_poweroff>\n  <on_reboot>restart</on_reboot>\n  <on_crash>destroy</on_crash>\n  <devices>\n    <emulator>/usr/bin/kvm</emulator>\n    <disk type='file' device='disk'>\n      <driver name='qemu' type='raw'/>\n      <source file='/var/lib/libvirt/images/ub_test1.img'/>\n      <target dev='hda' bus='ide'/>\n      <alias name='ide0-0-0'/>\n      <address type='drive' controller='0' bus='0' target='0' unit='0'/>\n    </disk>\n    <controller type='usb' index='0'>\n      <alias name='usb0'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>\n    </controller>\n    <controller type='ide' index='0'>\n      <alias name='ide0'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>\n    </controller>\n    <interface type='bridge'>\n      <mac address='00:16:3e:70:a5:eb'/>\n      <source bridge='br0'/>\n      <target dev='vnet2'/>\n      <model type='virtio'/>\n      <alias name='net0'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>\n    </interface>\n    <memballoon model='virtio'>\n      <alias name='balloon0'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>\n    </memballoon>\n  </devices>\n  <seclabel type='none'/>\n</domain>\n"

>>> vv.info()
[1, 545792L, 545792L, 1, 6320000000L]

1.
>>> vv.setMemoryFlags(545794)
libvir: QEMU Driver error : invalid argument: cannot set memory higher than max memory
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fluent/cvt/convirt-enterprise/tg2env/local/lib/python2.7/site-packages/libvirt.py", line 1781, in setMemoryFlags
    if ret == -1: raise libvirtError ('virDomainSetMemoryFlags() failed', dom=self)
libvirt.libvirtError: invalid argument: cannot set memory higher than max memory
>>> vv.setMemoryFlags(545790)
0

>>> vv.info()
[1, 545792L, 545792L, 1, 6480000000L]

>>> vv.setMemoryFlags(545788)
0
>>> vv.info()
[1, 545792L, 545792L, 1, 6480000000L]
 

If increase memory giving the above. if decreased memory it is running the command successfully but not changing the value

2.Vcpu update

>>> vv.setVcpusFlags(2)
libvir: QEMU Driver error : internal error got wrong number of vCPU pids from QEMU monitor. got 4, wanted 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fluent/cvt/convirt-enterprise/tg2env/local/lib/python2.7/site-packages/libvirt.py", line 1884, in setVcpusFlags
    if ret == -1: raise libvirtError ('virDomainSetVcpusFlags() failed', dom=self)
libvirt.libvirtError: internal error got wrong number of vCPU pids from QEMU monitor. got 4, wanted 2
>>> vv.setVcpusFlags(5)
libvir: QEMU Driver error : invalid argument: requested vcpus is greater than max allowable vcpus for the domain: 5 > 4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fluent/cvt/convirt-enterprise/tg2env/local/lib/python2.7/site-packages/libvirt.py", line 1884, in setVcpusFlags
    if ret == -1: raise libvirtError ('virDomainSetVcpusFlags() failed', dom=self)
libvirt.libvirtError: invalid argument: requested vcpus is greater than max allowable vcpus for the domain: 5 > 4
 

Cant increase or decrease vcpu.

 

 

 



Message sent via Atmail Open - http://atmail.org/