[libvirt] question on kvm
ajia at redhat.com
Fri Dec 23 03:02:14 UTC 2011
On 12/23/2011 10:14 AM, hero wrote:
> hello everyone:
> during the days I use kvm,I have got some questions I want to
> know,please read the following questions.
> 1.When a kvm VM is running, I use 'virsh setvcpus <domain> <count>' to
> change the cpu numbers of the VM, and when I use 'virsh dumpxml
> <domain>',there is a change from '<vcpus>count</vcpus>' to '<vcpus
> current="currentcount">count</vcpus>', just because of this I can't
> start the VM after I shutdown it. could you help me about this.
It works well for me, the guest can be successfully started after
shutdowning, what's the libvirt version?
> 2. when I use "virsh setmaxmem <domain> <value>" to change the max
> memory of the kvm VM, it says "error: Unable to change MaxMemorySize
> error: this function is not supported by the connection driver:
> virDomainSetMaxMemory", I want to know if libvirt has bugs or not.
Also work for me, for a running domain, will meet the following error as
# virsh setmaxmem vr-rhel5u7-x86_64-kvm 1048576
error: Unable to change MaxMemorySize
error: Requested operation is not valid: cannot resize the maximum
memory on an active domain
For a inactive domain, original Max memory is 524288 kB, the change is
# virsh dominfo vr-rhel5u7-x86_64-kvm
OS Type: hvm
State: shut off
Max memory: 1048576 kB
Used memory: 524288 kB
Managed save: no
Security model: selinux
Security DOI: 0
> 3.It works fine except I reboot the VM after I use "virsh setmem
> <domain> <value>" to change the kvm VM boot memory, for example, I
> change the memory 3000000k, but it can not save the value the next
> time to reboot.
You should see options family of virsh setmem such as --live, --config
--config affect next boot Note: it is a option what you want.
--live affect running domain
--current affect current domain
> Best wishes and Merry Christmas!
> libvir-list mailing list
> libvir-list at redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libvir-list