Public bug reported:

kvm/qemu doesn't enable ballooning by default anymore (the man page still 
claims that ballooning is enabled by default) .
There is no easy way to enable it with libvirt.

libvirt should add "-balloon virtio" to the qemu command line by default
or provide a way to modify the setting.

virsh dominfo domain should show the original qemu error message "The
balloon device has not been activated by the guest", but it hides it. I
found out the reason for the ballooning problem by starting kvm from the
command line and switching to the monitor console and by entering "info
balloon"

testing kvm/qemu behaviour:
kvm -cdrom ubuntu-10.04-server-amd64.iso
(CTRL-ALT 2 , enter: "info balloon"-> shows error message: 
The balloon device has not been activated by the guest
)

"info balloon" shows successfull balloon info after adding "-balloon virtio" to 
the command line.
kvm -cdrom ubuntu-10.04-server-amd64.iso -balloon virtio

Workaround:
- add a file called /usr/local/bin/kvm-balloon :
#!/bin/sh
/usr/bin/kvm -balloon virtio $@
- modify /etc/libvirt/qemu/domain.xml (virsh edit domain) , replace 
/usr/bin/kvm with /usr/local/bin/kvm-balloon
- poweroff and restart the VM (reboot isn't enough)

In the VM, the virtio_balloon module has to be loaded:
modprobe virtio_balloon
(to persistent after reboot: echo virtio_balloon >> /etc/modules)

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: balloon freemem kvm mem setmem virsh virtio

-- 
kvm memory ballooning is unusable in Lucid
https://bugs.launchpad.net/bugs/579723
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to