[Bug 579723] Re: kvm memory ballooning is unusable in Lucid

lhotari lartsa at sagire.fi
Fri May 28 07:34:16 BST 2010


Have you checked the file's execution bit?
chmod 0755 kvm-balloon

** Description changed:

  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: 
+ (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 :
+ - add a file called /usr/local/bin/kvm-balloon (and mark it executable: chmod 0755 kvm-balloon):
  #!/bin/sh
- /usr/bin/kvm -balloon virtio $@
+ /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)

-- 
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.



More information about the Ubuntu-server-bugs mailing list