0

I am trying to set up Xen on a brand new AMD Phenom II X6 1090T. I have ubuntu natty installed.

I've managed to get Xen Dom0 running now with kernel 2.6.39.3

However when running:

xm create xenwin7.cfg -c

I get the following error in /var/log/xen/qemu-dm-xenwin7.log:

Using config file "./xenwin7.cfg".
Error: Domain 'xenwin7' does not exist.

And in /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.

The file /var/log/xen/qemu-dm-xenwin7.log shows

domid: 16
-append only allowed with -kernel option

How do I get win7 to boot up?

Here is the output from 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

Following this link: http://www.virtuatopia.com/index.php/Installing_and_Running_Windows_7_as_a_Xen_HVM_domainU_Guest

My xenwin7.cfg file:

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"
2
  • Can you make sure the AMD-V/IOMMU is enabled in your BIOS settings ?
    – DrGkill
    Aug 2, 2011 at 15:00
  • Yes IOMMU is enabled.
    – hookenz
    Aug 2, 2011 at 21:34

2 Answers 2

0

I suspect that these two lines are guilty:

extra='xencons=tty'
extra="console=hvc0"

Isn't it possible to just put

xencons=tty
console=hvc0

to xenwin7.cfg instead?

3
  • Nope. That is not possible and should not be done. These "extra" options are passed to a kernel, which in this case is defined at kernel = "/usr/lib/xen/boot/hvmloader" (which is not a real kernel but just a loader stub which is used in HVM mode to bootstrap the system in a similar way as a PC BIOS does).
    – snap
    Aug 2, 2011 at 15:55
  • oh that is the issue... anyhow I've trashed the whole thing because it wasn't behaving right... so start over.
    – hookenz
    Aug 3, 2011 at 2:20
  • Actually I removed those two lines and it was ok. But, there were other issues which I have worked out. So I managed to get it to run.
    – hookenz
    Aug 3, 2011 at 2:21
0

I do not think you can pass options to the Windows kernel like you can to Linux kernel. These "extra" options are exactly that. I think you should remove them.

Also the "-c" option to "xm create" does not really make sense... or does Windows have a serial console? I think not but unsure.

Try fixing the above first and try to see if your Windows OS starts after that. If it does, you can connect to it with VNC or virt-viewer instead of serial console.

The following message in your log:

[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.

...indicates that your virtual machine is crashing or shutting down very quickly after boot. It could be because of the above mentioned issues, or you might have some additional problem, but it is impossible to say at this point. Often this message indicates an early problem with the boot loader.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .