在 Debian Squeeze 中创建虚拟机时遇到问题。主机是配备 Xeon 处理器的 Dell Poweredge,运行 Debian Squeeze - 内核 3.2.0-4-amd64
当我尝试通过 virt-manager 创建虚拟机时,错误消息是:
Unable to complete install: 'internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/ /usr/bin/kvm -no-user-config -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,? -device scsi-disk,?) status unexpected: exit status 1'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 1909, in do_install
guest.start_install(False, meter=meter)
File "/usr/lib/pymodules/python2.7/virtinst/Guest.py", line 1239, in start_install
noboot)
File "/usr/lib/pymodules/python2.7/virtinst/Guest.py", line 1307, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2475, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/ /usr/bin/kvm -no-user-config -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,? -device scsi-disk,?) status unexpected: exit status 1
然后我通过命令行尝试:
virt-install --connect qemu:///system
-n test -r 1024 --vcpus=2
--disk /data/virtualmachines/test.img
-c /home/foobar/debian-7.1.0-amd64-netinst.iso
--vnc --ost-type linux --accelerate
--network=bridge:br0 --hvm
并得到以下内容:
ERROR internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/ /usr/bin/kvm -no-user-config -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,? -device scsi-disk,?) status unexpected: exit status 1
Domain installation does not appear to have been successful.
我在跑步:
- Debian Squeeze
- kvm = 1.1.2
- virt-manager = 0.9.1
- libvirt = 0.9.12
- kvm 模块已在 lsmod 中正确列出
有什么想法或指点吗?
答案1
似乎您没有使用 kvm 映像的默认位置。您是否查看过 apparmor 是否阻止了对该资源的访问?在您的 dmesg 日志中查找 DENIED 条目,如果是,则将以下行添加到 /etc/apparmor.d/abstractions/libvirt-qemu:
/data/virtualmachines/** rw,
(或者您用于 kvm 镜像的任何其他路径)