我正在尝试在全新 AMD Phenom II X6 1090T 上设置 Xen。我已经安装了 ubuntu natty。
我已经设法让 Xen Dom0 使用内核 2.6.39.3 运行
但是在运行时:
xm 创建 xenwin7.cfg-c
我在 /var/log/xen/qemu-dm-xenwin7.log 中收到以下错误:
Using config file "./xenwin7.cfg".
Error: Domain 'xenwin7' does not exist.
在 /var/log/xen/xend.log 中:
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:103) XendDomainInfo.create(['vm', ['name', 'xenwin7'], ['memory', 1024], ['shadow_memory', 8], ['on_xend_
start', 'ignore'], ['on_xend_stop', 'ignore'], ['vcpus', 1], ['oos', 1], ['image', ['hvm', ['kernel', '/usr/lib/xen/boot/hvmloader'], ['videoram', 4], ['s
erial', 'pty'], ['args', 'console=hvc0'], ['acpi', 1], ['apic', 1], ['boot', 'dc'], ['cpuid', []], ['cpuid_check', []], ['device_model', '/usr/lib64/xen/b
in/qemu-dm'], ['fda', ''], ['fdb', ''], ['guest_os_type', 'default'], ['hap', 1], ['hpet', 0], ['isa', 0], ['keymap', ''], ['localtime', 0], ['nographic',
0], ['oos', 1], ['pae', 1], ['pci', []], ['pci_msitranslate', 1], ['pci_power_mgmt', 0], ['rtc_timeoffset', 0], ['sdl', 1], ['soundhw', ''], ['stdvga', 0
], ['timer_mode', 1], ['usb', 0], ['usbdevice', 'tablet'], ['vcpus', 1], ['vnc', 0], ['vncconsole', 0], ['vncunused', 1], ['viridian', 0], ['vpt_align', 1
], ['xauthority', '/home/xen/.Xauthority'], ['xen_platform_pci', 1], ['memory_sharing', 0], ['vncpasswd', 'XXXXXXXX'], ['tsc_mode', 0], ['nomigrate', 0]]
], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'file:/home/xen/xenwin7.img'], ['dev', 'hda'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/
home/xen/windows7.iso'], ['dev', 'hdc:cdrom'], ['mode', 'r']]], ['device', ['vif', ['bridge', 'xenbr0'], ['type', 'ioemu']]]])
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:2498) XendDomainInfo.constructDomain
[2011-08-02 16:09:48 3940] DEBUG (balloon:187) Balloon: 2226248 KiB free; need 16384; done.
[2011-08-02 16:09:48 3940] DEBUG (XendDomain:476) Adding Domain: 26
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:2836) XendDomainInfo.initDomain: 26 256
[2011-08-02 16:09:48 3940] DEBUG (image:852) cmdline = console=hvc0
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: boot, val: dc
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: fda, val: None
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: fdb, val: None
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: soundhw, val: None
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: localtime, val: 0
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: serial, val: ['pty']
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: std-vga, val: 0
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: isa, val: 0
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: acpi, val: 1
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: usb, val: 0
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: usbdevice, val: tablet
[2011-08-02 16:09:48 3940] DEBUG (image:891) args: gfx_passthru, val: None
[2011-08-02 16:09:48 3940] INFO (image:822) Need to create platform device.[domid:26]
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:2863) _initDomain:shadow_memory=0x8, memory_static_max=0x40000000, memory_static_min=0x0.
[2011-08-02 16:09:48 3940] INFO (image:182) buildDomain os=hvm dom=26 vcpus=1
[2011-08-02 16:09:48 3940] DEBUG (image:949) domid = 26
[2011-08-02 16:09:48 3940] DEBUG (image:950) image = /usr/lib/xen/boot/hvmloader
[2011-08-02 16:09:48 3940] DEBUG (image:951) store_evtchn = 2
[2011-08-02 16:09:48 3940] DEBUG (image:952) memsize = 1024
[2011-08-02 16:09:48 3940] DEBUG (image:953) target = 1024
[2011-08-02 16:09:48 3940] DEBUG (image:954) vcpus = 1
[2011-08-02 16:09:48 3940] DEBUG (image:955) vcpu_avail = 1
[2011-08-02 16:09:48 3940] DEBUG (image:956) acpi = 1
[2011-08-02 16:09:48 3940] DEBUG (image:957) apic = 1
[2011-08-02 16:09:48 3940] INFO (XendDomainInfo:2357) createDevice: vbd : {'uuid': '7e487eec-1ce3-bee9-089a-218be90c5476', 'bootable': 1, 'driver': 'parav
irtualised', 'dev': 'hda', 'uname': 'file:/home/xen/xenwin7.img', 'mode': 'w'}
[2011-08-02 16:09:48 3940] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk', 'state': '1
', 'backend': '/local/domain/0/backend/vbd/26/768'} to /local/domain/26/device/vbd/768.
[2011-08-02 16:09:48 3940] DEBUG (DevController:97) DevController: writing {'domain': 'xenwin7', 'frontend': '/local/domain/26/device/vbd/768', 'uuid': '7
e487eec-1ce3-bee9-089a-218be90c5476', 'bootable': '1', 'dev': 'hda', 'state': '1', 'params': '/home/xen/xenwin7.img', 'mode': 'w', 'online': '1', 'fronte
nd-id': '26', 'type': 'file'} to /local/domain/0/backend/vbd/26/768.
[2011-08-02 16:09:48 3940] INFO (XendDomainInfo:2357) createDevice: vbd : {'uuid': 'b04587f2-8e66-9661-074e-4eab538f4c69', 'bootable': 0, 'driver': 'parav
irtualised', 'dev': 'hdc:cdrom', 'uname': 'file:/home/xen/windows7.iso', 'mode': 'r'}
[2011-08-02 16:09:48 3940] DEBUG (DevController:95) DevController: writing {'backend-id': '0', 'virtual-device': '5632', 'device-type': 'cdrom', 'state':
'1', 'backend': '/local/domain/0/backend/vbd/26/5632'} to /local/domain/26/device/vbd/5632.
[2011-08-02 16:09:48 3940] DEBUG (DevController:97) DevController: writing {'domain': 'xenwin7', 'frontend': '/local/domain/26/device/vbd/5632', 'uuid': '
b04587f2-8e66-9661-074e-4eab538f4c69', 'bootable': '0', 'dev': 'hdc', 'state': '1', 'params': '/home/xen/windows7.iso', 'mode': 'r', 'online': '1', 'fron
tend-id': '26', 'type': 'file'} to /local/domain/0/backend/vbd/26/5632.
[2011-08-02 16:09:48 3940] INFO (XendDomainInfo:2357) createDevice: vif : {'bridge': 'xenbr0', 'mac': '00:16:3e:42:8a:69', 'type': 'ioemu', 'uuid': 'b69e3
0c8-f984-5e63-872d-fbb895f4a127'}
[2011-08-02 16:09:48 3940] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/vif/26/0'
} to /local/domain/26/device/vif/0.
[2011-08-02 16:09:48 3940] DEBUG (DevController:97) DevController: writing {'bridge': 'xenbr0', 'domain': 'xenwin7', 'handle': '0', 'uuid': 'b69e30c8-f984
-5e63-872d-fbb895f4a127', 'script': '/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:42:8a:69', 'frontend-id': '26', 'state': '1', 'online': '1', 'frontend
': '/local/domain/26/device/vif/0', 'type': 'ioemu'} to /local/domain/0/backend/vif/26/0.
[2011-08-02 16:09:48 3940] INFO (image:418) spawning device models: /usr/lib64/xen/bin/qemu-dm ['/usr/lib64/xen/bin/qemu-dm', '-d', '26', '-domain-name',
'xenwin7', '-videoram', '4', '-sdl', '-vcpus', '1', '-vcpu_avail', '0x1', '-append', 'console=hvc0', '-boot', 'dc', '-serial', 'pty', '-acpi', '-usbdevice
', 'tablet', '-net', 'nic,vlan=1,macaddr=00:16:3e:42:8a:69,model=rtl8139', '-net', 'tap,vlan=1,ifname=tap26.0,bridge=xenbr0', '-M', 'xenfv']
[2011-08-02 16:09:48 3940] INFO (image:467) device model pid: 16361
[2011-08-02 16:09:48 3940] INFO (image:590) waiting for sentinel_fifo
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:3420) Storing VM details: {'on_xend_stop': 'ignore', 'pool_name': 'Pool-0', 'shadow_memory': '9', 'uuid':
'131255fa-f125-7fa9-29a4-6ab7db8d6f68', 'on_reboot': 'restart', 'start_time': '1312258188.76', 'on_poweroff': 'destroy', 'bootloader_args': '', 'on_xend_
s tart': 'ignore', 'on_crash': 'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1', 'bootloader': '', 'image': "(hvm (kernel '') (args 'c
onsole=hvc0') (superpages 0) (videoram 4) (hpet 0) (stdvga 0) (loader /usr/lib/xen/boot/hvmloader) (xen_platform_pci 1) (rtc_timeoffset 0) (pci ()) (hap 1
) (localtime 0) (timer_mode 1) (pci_msitranslate 1) (oos 1) (apic 1) (sdl 1) (usbdevice tablet) (vpt_align 1) (vncconsole 0) (serial pty) (vncunused 1) (b
oot dc) (pae 1) (viridian 0) (acpi 1) (vnc 0) (nographic 0) (nomigrate 0) (usb 0) (tsc_mode 0) (guest_os_type default) (device_model /usr/lib64/xen/bin/qe
mu-dm) (pci_power_mgmt 0) (xauthority /home/xen/.Xauthority) (isa 0) (notes (SUSPEND_CANCEL 1)))", 'name': 'xenwin7'}
[2011-08-02 16:09:48 3940] WARNING (image:552) domain xenwin7: device model failure: pid 16361: malfunctioning (closed sentinel), killed; see /var/log/xen
/qemu-dm-xenwin7.log
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:1794) Storing domain details: {'console/port': '3', 'description': '', 'console/limit': '1048576', 'store
/port': '2', 'vm': '/vm/131255fa-f125-7fa9-29a4-6ab7db8d6f68', 'domid': '26', 'image/suspend-cancel': '1', 'cpu/0/availability': 'online', 'memory/target'
: '1048576', 'control/platform-feature-multiprocessor-suspend': '1', 'store/ring-ref': '1044476', 'console/type': 'ioemu', 'name': 'xenwin7'}
[2011-08-02 16:09:48 3940] WARNING (XendDomainInfo:2061) Domain has crashed: name=xenwin7 id=26.
[2011-08-02 16:09:48 3940] DEBUG (DevController:95) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/console/2
6/0'} to /local/domain/26/device/console/0.
[2011-08-02 16:09:48 3940] DEBUG (DevController:97) DevController: writing {'domain': 'xenwin7', 'frontend': '/local/domain/26/device/console/0', 'uuid':
'c41c5605-484a-ebb8-4cb4-220a2431845f', 'frontend-id': '26', 'state': '1', 'location': '3', 'online': '1', 'protocol': 'vt100'} to /local/domain/0/backend
/console/26/0.
[2011-08-02 16:09:48 3940] ERROR (XendDomainInfo:2195) VM xenwin7 restarting too fast (Elapsed time: 0.059331 seconds). Refusing to restart to avoid loops
.
[2011-08-02 16:09:48 3940] DEBUG (XendDomainInfo:3071) XendDomainInfo.destroy: domid=26
[2011-08-02 16:09:48 3940] WARNING (XendDomainInfo:2061) Domain has crashed: name=xenwin7 id=26.
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:2401) Destroying device model
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:2408) Releasing devices
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:2414) Removing vif/0
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:2414) Removing console/0
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = console, device = console/0
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:2414) Removing vbd/768
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/768
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:2414) Removing vbd/5632
[2011-08-02 16:09:49 3940] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/5632
[2011-08-02 16:11:50 3940] DEBUG (SrvServer:77) SrvServer.cleanup()
[2011-08-02 16:11:50 3940] DEBUG (XMLRPCServer:251) XMLRPCServer.cleanup()
[2011-08-02 16:11:50 3940] DEBUG (XMLRPCServer:251) XMLRPCServer.cleanup()
[2011-08-02 16:11:50 3940] DEBUG (XendDomain:644) cleanup_domains
[2011-08-02 16:11:50 3939] INFO (SrvDaemon:220) Xend exited with status 0.
文件 /var/log/xen/qemu-dm-xenwin7.log 显示
domid: 16
-append only allowed with -kernel option
怎样让win7启动?
以下是 sudo xm info 的输出:
host : xen
release : 2.6.39.3
version : #1 SMP Tue Aug 2 12:47:33 NZST 2011
machine : x86_64
nr_cpus : 6
nr_nodes : 1
cores_per_socket : 6
threads_per_core : 1
cpu_mhz : 3210
hw_caps : 178bf3ff:efd3fbff:00000000:00001310:00802001:00000000:000037ff:00000000
virt_caps : hvm hvm_directio
total_memory : 8190
free_memory : 2174
free_cpus : 0
xen_major : 4
xen_minor : 1
xen_extra : .1
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
p latform_params : virt_start=0xffff800000000000
xen_changeset : unavailable
xen_commandline : placeholder
cc_compiler : gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Mon Aug 1 15:34:58 NZST 2011
xend_config_format : 4
点击此链接: http://www.virtuatopia.com/index.php/Installing_and_Running_Windows_7_as_a_Xen_HVM_domainU_Guest
我的 xenwin7.cfg 文件:
import os, re
arch = os.uname()[4]
if re.search('64', arch):
arch_libdir = 'lib64'
else:
arch_libdir = 'lib'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 1024
# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
shadow_memory = 8
name = "xenwin7"
vif = [ 'type=ioemu, bridge=xenbr0' ]
acpi = 1
apic = 1
disk = [ 'file:/home/xen/xenwin7.img,hda,w', 'file:/home/xeb/windows7.iso,hdc:cdrom,r' ]
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
#-----------------------------------------------------------------------------
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot="dc"
sdl=0
vnc=1
vncconsole=1
vncpasswd=''
serial='pty'
usbdevice='tablet'
extra='xencons=tty'
extra="console=hvc0"
答案1
我怀疑这两行是有问题的:
extra='xencons=tty'
extra="console=hvc0"
难道不能直接放
xencons=tty
console=hvc0
来xenwin7.cfg
代替?
答案2
我认为您不能像向 Linux 内核传递选项那样向 Windows 内核传递选项。这些“额外”选项就是这样。我认为您应该删除它们。
此外,“xm create” 的“-c”选项确实没有意义...或者 Windows 有串行控制台吗?我认为没有,但不确定。
先尝试修复上述问题,然后尝试查看 Windows 操作系统是否能够启动。如果可以,您可以使用以下方式连接到它:虚拟网络计算机或者虚拟查看器而不是串行控制台。
您的日志中有以下消息:
[2011-08-02 16:09:48 3940] ERROR (XendDomainInfo:2195) VM xenwin7 restarting too fast (Elapsed time: 0.059331 seconds). Refusing to restart to avoid loops.
...表示您的虚拟机在启动后很快崩溃或关闭。这可能是由于上述问题,也可能是其他问题,但目前无法确定。通常,此消息表示引导加载程序存在早期问题。