Ubuntu
在 ubuntu 12.04 上通過 virt-manager 管理 XEN
我一直試圖讓 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