Debian-Squeeze

libvirtError:操作失敗:無法查詢記憶體氣球分配

  • April 22, 2014

嘗試使用 virt-manager 安裝 kvm vm,但出現此錯誤。這台機器有16GB的記憶體,我輸入的是4096MB。這裡有什麼問題?

   Unable to complete install '<class 'libvirt.libvirtError'> operation failed: could not query memory balloon allocation
Traceback (most recent call last):
 File "/usr/share/virt-manager/virtManager/create.py", line 1571, in do_install
   vm.startup()
 File "/usr/share/virt-manager/virtManager/domain.py", line 1297, in startup
   self._update_status()
 File "/usr/share/virt-manager/virtManager/domain.py", line 1902, in _update_status
   info = self.get_info()
 File "/usr/share/virt-manager/virtManager/domain.py", line 1212, in get_info
   return self._backend.info()
 File "/usr/lib/python2.6/dist-packages/libvirt.py", line 766, in info
   if ret is None: raise libvirtError ('virDomainGetInfo() failed', dom=self)
libvirtError: operation failed: could not query memory balloon allocation
'

問題解決了:

qemu 最多可以設置 4095 個記憶體

如果你想支持更多的記憶體,你也應該安裝包kvm,它與你的 debian 版本有關:要在 debian 7 (wheezy) 上安裝 kvm,你應該執行這個命令:

# apt-get install qemu-kvm libvirt-bin virtinst

但是要在 debian 6 (sqeeze) 上安裝 kvm,您應該執行以下命令:

# apt-get install kvm qemu-kvm libvirt-bin virtinst

引用自:https://serverfault.com/questions/329194