我一直在尝试让 xen 在没有 GUI 的远程机器上工作。在机器上安装了 XEN 管理程序并在该内核中启动。尝试使用 virt-manager 创建 VM。我尝试通过 X11 转发 (ssh -X) 访问 virt-manager,但我仍然无法使用它创建 VM。是否有解决方案。
细节:
使用的模拟器:usr/lib/xen-default/bin/qemu-dm
virsh version
输出:
info : libvirt version: 0.9.8
Compiled against library: libvir 0.9.8
Using library: libvir 0.9.8
Using API: Xen 0.9.8 j
Running hypervisor: Xen 4.1.0
在为磁盘分配空间后使用 virt-manger 显示以下错误
无法完成安装:'POST 操作失败:xend_post:来自 xen 守护程序的错误:'
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/python2.7/dist-packages/virtinst/Guest.py", line 1236, in start_install
noboot)
File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 1304, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2166, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: <Fault 3: 'VM'>
我厌倦了使用virt-install --name=hello --ram=512 --file-size 10 --location=/home/admin/ubuntu-12.04-server-amd64.iso --file=/VMA/new/123
但它的显示
**ERROR Couldn't find xen kernel for Ubuntu tree.**
这是 grub 配置,它直接引导到这里的第一个选项
submenu "Xen 4.1-amd64" {
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
它直接引导到此处的第一个选项,但uname -a
显示
Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
grub.cfg:
set default="0"
### BEGIN /etc/grub.d/20_linux_xen ###
submenu "Xen 4.1-amd64" {
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0
echo 'Loading Xen 4.1-amd64 ...'
multiboot /xen-4.1-amd64.gz placeholder
echo 'Loading Linux 3.2.0-23-generic ...'
module /vmlinuz-3.2.0-23-generic placeholder root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro
echo 'Loading initial ramdisk ...'
module /initrd.img-3.2.0-23-generic
}
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0
echo 'Loading Xen 4.1-amd64 ...'
multiboot /xen-4.1-amd64.gz placeholder
echo 'Loading Linux 3.2.0-23-generic ...'
module /vmlinuz-3.2.0-23-generic placeholder root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro single
echo 'Loading initial ramdisk ...'
module /initrd.img-3.2.0-23-generic
}
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0
linux /vmlinuz-3.2.0-23-generic root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro
initrd /initrd.img-3.2.0-23-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root a24dc20d-d11a-465a-a040-839468167da0
echo 'Loading Linux 3.2.0-23-generic ...'
linux /vmlinuz-3.2.0-23-generic root=UUID=870d5785-bf0b-4af9-bf15-1b8e891e793a ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.2.0-23-generic
}
这解决了这个问题..
mkdir /usr/lib64/xen -p
cp /usr/lib/xen-4.1/* -r /usr/lib64/xen/
cp -r /usr/share/qemu-linaro/ /usr/share/qemu