Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Failed to create domU HVM Linux guest with Xen 3.3



Hello,

Im' trying to create a Linux HVM guest in Xen 3.3 using raw files as
disks, but there seems to be some problem with the devices and the
machine crashes, the config fle I'm using:
(ubuntu.img created with 'dd if=/dev/zero of=ubuntu.img bs=1m count=4096')

kernel = '/usr/pkg/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '2048'
device_model='/usr/pkg/libexec/qemu-dm'

disk = [ 'file:/home/xen/ubuntu.img,ioemu:hda,w',
          'file:/home/xen/ubuntu.iso,ioemu:hdb:cdrom,r', ]

# Hostname
name = "ubntu11"

vif = [ 'type=ioemu, bridge=bridge1' ]

boot= 'd'
vnc = 1
usbdevice = 'tablet' # Helps with mouse pointer positioning

The output from qemu is the following:

domid: 13
qemu: the number of cpus is 1
Watching /local/domain/0/device-model/13/logdirty/next-active
Watching /local/domain/0/device-model/13/command
qemu_map_cache_init nr_buckets = 10000 size 3145728
shared page at pfn 7fffe
buffered io page at pfn 7fffc
Time offset set 0
Register xen platform.
Done register platform.
I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0

And xm dmesg output the following:

(XEN) realmode.c:133:d13 Failed to emulate insn.
(XEN) realmode.c:175:d13 Real-mode emulation failed @ 0020:0000a82b:
0f 00 d0 b0 28 8e
(XEN) domain_crash called from realmode.c:176
(XEN) Domain 13 (vcpu#0) crashed on cpu#23:
(XEN) ----[ Xen-3.3.2  x86_64  debug=n  Not tainted ]----
(XEN) CPU:    23
(XEN) RIP:    0028:[<000000000000a82b>]
(XEN) RFLAGS: 0000000000000046   CONTEXT: hvm guest
(XEN) rax: 0000000000000000   rbx: 000000000000a815   rcx: 0000000000000000
(XEN) rdx: 00000000000110fa   rsi: 00000000001f00fa   rdi: 0000000000011105
(XEN) rbp: 000000000001d2f2   rsp: 0000000000001f92   r8:  0000000000000000
(XEN) r9:  0000000000000000   r10: 0000000000000000   r11: 0000000000000000
(XEN) r12: 0000000000000000   r13: 0000000000000000   r14: 0000000000000000
(XEN) r15: 0000000000000000   cr0: 0000000000000011   cr4: 0000000000000000
(XEN) cr3: 0000000000000000   cr2: 0000000000000000
(XEN) ds: 0020   es: 0020   fs: 0020   gs: 0020   ss: 0020   cs: 0028

And xend.log:

[2011-06-15 16:16:57 312] DEBUG (XendDomainInfo:111)
XendDomainInfo.create_from_dict({'vcpus_params': {'cap': 0, 'weight':
256}, 'PV_args': '', 'features': '', 'cpus': [[]], 'paused': 1,
'domid': 12, 'shutdown': 0, 'VCPUs_live': 1, 'PV_bootloader': '',
'actions_after_crash': 'restart', 'vbd_refs':
['b9b8e5d3-1723-347e-3946-59dd4b1490b9',
'390222d4-0447-cb8c-ef68-ee1cb468c024'], 'PV_ramdisk': '',
'is_control_domain': False, 'name_label': 'ubntu11',
'VCPUs_at_startup': 1, 'HVM_boot_params': {'order': 'd'}, 'platform':
{'hpet': 0, 'boot': 'd', 'guest_os_type': 'default', 'loader':
'/usr/pkg/lib/xen/boot/hvmloader', 'vncunused': 1, 'usb': 0,
'rtc_timeoffset': '0', 'monitor': 0, 'pci': [], 'pae': 1, 'stdvga': 0,
'hap': 1, 'acpi': 1, 'localtime': 0, 'timer_mode': 0, 'vnc': 1,
'nographic': 0, 'apic': 1, 'xauthority': '/root/.Xauthority',
'usbdevice': 'tablet', 'device_model': '/usr/pkg/libexec/qemu-dm',
'isa': 0}, 'PV_kernel': '', 'console_refs':
['90cc3cd9-35ed-3d17-b843-eecb53b9f312',
'b6d30436-7452-b67a-0cd4-6d26830afeb0'], 'online_vcpus': 1, 'blocked':
0, 'on_xend_stop': 'ignore', 'memory_static_min': 0,
'HVM_boot_policy': 'BIOS order', 'shutdown_reason': 3, 'VCPUs_max': 1,
'start_time': 1308147414.7159519, 'memory_static_max': 2147483648,
'actions_after_shutdown': 'destroy', 'on_xend_start': 'ignore',
'crashed': 1, 'memory_dynamic_max': 2147483648,
'actions_after_suspend': '', 'is_a_template': False,
'PV_bootloader_args': '', 'memory_dynamic_min': 2147483648, 'uuid':
'f3520630-dd11-e75f-3dd1-dd0ac6d54c04', 'cpu_time': 0.795306022,
'shadow_memory': 17, 'dying': 1, 'vcpu_avail': 1, 'notes':
{'SUSPEND_CANCEL': 1}, 'other_config': {}, 'running': 0,
'actions_after_reboot': 'restart', 'vif_refs':
['4b44f3d8-9618-9e78-d427-1dda56af799a'], 'target': 0, 'vtpm_refs':
[], 'devices': {'4b44f3d8-9618-9e78-d427-1dda56af799a': ('vif',
{'bridge': 'bridge1', 'mac': '00:16:3e:2e:39:94', 'devid': 0, 'type':
'ioemu', 'uuid': '4b44f3d8-9618-9e78-d427-1dda56af799a'}),
'390222d4-0447-cb8c-ef68-ee1cb468c024': ('vbd', {'uuid':
'390222d4-0447-cb8c-ef68-ee1cb468c024', 'bootable': 0, 'devid': 832,
'driver': 'ioemu', 'dev': 'ioemu:hdb:cdrom', 'uname':
'file:/home/xen/ubuntu.iso', 'mode': 'r'}),
'b6d30436-7452-b67a-0cd4-6d26830afeb0': ('console', {'other_config':
{}, 'protocol': 'vt100', 'uuid':
'b6d30436-7452-b67a-0cd4-6d26830afeb0', 'location': '3'}),
'b9b8e5d3-1723-347e-3946-59dd4b1490b9': ('vbd', {'uuid':
'b9b8e5d3-1723-347e-3946-59dd4b1490b9', 'bootable': 1, 'devid': 768,
'driver': 'ioemu', 'dev': 'ioemu:hda', 'uname':
'file:/home/xen/ubuntu.img', 'mode': 'w'}),
'90cc3cd9-35ed-3d17-b843-eecb53b9f312': ('vfb', {'vncunused': 1,
'other_config': {'vncunused': 1, 'type': 'vnc'}, 'uuid':
'90cc3cd9-35ed-3d17-b843-eecb53b9f312', 'devid': 0, 'location':
'localhost:5900', 'type': 'vnc'})}})
[2011-06-15 16:16:57 312] DEBUG (XendDomainInfo:2043)
XendDomainInfo.constructDomain
[2011-06-15 16:16:57 312] DEBUG (balloon:132) Balloon: 48733244 KiB
free; need 2048; done.
[2011-06-15 16:16:57 312] DEBUG (XendDomain:449) Adding Domain: 13
[2011-06-15 16:16:57 312] DEBUG (XendDomainInfo:2149)
XendDomainInfo.initDomain: 13 256
[2011-06-15 16:16:58 312] DEBUG (image:300) Stored a VNC password for vfb access
[2011-06-15 16:16:58 312] DEBUG (image:741) args: boot, val: d
[2011-06-15 16:16:58 312] DEBUG (image:741) args: fda, val: None
[2011-06-15 16:16:58 312] DEBUG (image:741) args: fdb, val: None
[2011-06-15 16:16:58 312] DEBUG (image:741) args: soundhw, val: None
[2011-06-15 16:16:58 312] DEBUG (image:741) args: localtime, val: 0
[2011-06-15 16:16:58 312] DEBUG (image:741) args: serial, val: None
[2011-06-15 16:16:58 312] DEBUG (image:741) args: std-vga, val: 0
[2011-06-15 16:16:58 312] DEBUG (image:741) args: isa, val: 0
[2011-06-15 16:16:58 312] DEBUG (image:741) args: acpi, val: 1
[2011-06-15 16:16:58 312] DEBUG (image:741) args: usb, val: 0
[2011-06-15 16:16:58 312] DEBUG (image:741) args: usbdevice, val: tablet
[2011-06-15 16:16:58 312] DEBUG (XendDomainInfo:2230)
_initDomain:shadow_memory=0x11, memory_static_max=0x80000000,
memory_static_min=0x0.
[2011-06-15 16:16:58 312] DEBUG (balloon:132) Balloon: 49011324 KiB
free; need 2130944; done.
[2011-06-15 16:16:58 312] INFO (image:166) buildDomain os=hvm dom=13 vcpus=1
[2011-06-15 16:16:58 312] DEBUG (image:793) domid          = 13
[2011-06-15 16:16:58 312] DEBUG (image:794) image          =
/usr/pkg/lib/xen/boot/hvmloader
[2011-06-15 16:16:58 312] DEBUG (image:795) store_evtchn   = 2
[2011-06-15 16:16:58 312] DEBUG (image:796) memsize        = 2048
[2011-06-15 16:16:58 312] DEBUG (image:797) vcpus          = 1
[2011-06-15 16:16:58 312] DEBUG (image:798) acpi           = 1
[2011-06-15 16:16:58 312] DEBUG (image:799) apic           = 1
[2011-06-15 16:16:58 312] INFO (XendDomainInfo:1907) createDevice: vfb
: {'vncunused': 1, 'other_config': {'vncunused': 1, 'type': 'vnc'},
'uuid': '90cc3cd9-35ed-3d17-b843-eecb53b9f312', 'devid': 0,
'location': 'localhost:5900', 'type': 'vnc'}
[2011-06-15 16:16:58 312] DEBUG (DevController:122) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/vfb/13/0'} to /local/domain/13/device/vfb/0.
[2011-06-15 16:16:58 312] DEBUG (DevController:124) DevController:
writing {'vncunused': '1', 'domain': 'ubntu11', 'frontend':
'/local/domain/13/device/vfb/0', 'uuid':
'90cc3cd9-35ed-3d17-b843-eecb53b9f312', 'state': '1', 'location':
'localhost:5900', 'online': '1', 'frontend-id': '13', 'type': 'vnc'}
to /local/domain/0/backend/vfb/13/0.
[2011-06-15 16:16:58 312] INFO (XendDomainInfo:1907) createDevice:
console : {'other_config': {}, 'protocol': 'vt100', 'uuid':
'b6d30436-7452-b67a-0cd4-6d26830afeb0', 'location': '3'}
[2011-06-15 16:16:58 312] DEBUG (DevController:122) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/console/13/0'} to
/local/domain/13/device/console/0.
[2011-06-15 16:16:58 312] DEBUG (DevController:124) DevController:
writing {'domain': 'ubntu11', 'frontend':
'/local/domain/13/device/console/0', 'uuid':
'b6d30436-7452-b67a-0cd4-6d26830afeb0', 'frontend-id': '13', 'state':
'1', 'location': '3', 'online': '1', 'protocol': 'vt100'} to
/local/domain/0/backend/console/13/0.
[2011-06-15 16:16:58 312] INFO (XendDomainInfo:1907) createDevice: vbd
: {'uuid': 'b9b8e5d3-1723-347e-3946-59dd4b1490b9', 'bootable': 1,
'devid': 768, 'driver': 'ioemu', 'dev': 'ioemu:hda', 'uname':
'file:/home/xen/ubuntu.img', 'mode': 'w'}
[2011-06-15 16:16:58 312] DEBUG (DevController:122) DevController:
writing {'backend-id': '0', 'virtual-device': '768', 'device-type':
'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/13/768'}
to /local/domain/13/device/vbd/768.
[2011-06-15 16:16:58 312] DEBUG (DevController:124) DevController:
writing {'domain': 'ubntu11', 'frontend':
'/local/domain/13/device/vbd/768', 'uuid':
'b9b8e5d3-1723-347e-3946-59dd4b1490b9', 'dev': 'hda', 'state': '1',
'params': '/home/xen/ubuntu.img', 'mode': 'w', 'online': '1',
'frontend-id': '13', 'type': 'file'} to
/local/domain/0/backend/vbd/13/768.
[2011-06-15 16:16:58 312] INFO (XendDomainInfo:1907) createDevice: vbd
: {'uuid': '390222d4-0447-cb8c-ef68-ee1cb468c024', 'bootable': 0,
'devid': 832, 'driver': 'ioemu', 'dev': 'ioemu:hdb:cdrom', 'uname':
'file:/home/xen/ubuntu.iso', 'mode': 'r'}
[2011-06-15 16:16:58 312] DEBUG (DevController:122) DevController:
writing {'backend-id': '0', 'virtual-device': '832', 'device-type':
'cdrom', 'state': '1', 'backend':
'/local/domain/0/backend/vbd/13/832'} to
/local/domain/13/device/vbd/832.
[2011-06-15 16:16:58 312] DEBUG (DevController:124) DevController:
writing {'domain': 'ubntu11', 'frontend':
'/local/domain/13/device/vbd/832', 'uuid':
'390222d4-0447-cb8c-ef68-ee1cb468c024', 'dev': 'hdb', 'state': '1',
'params': '/home/xen/ubuntu.iso', 'mode': 'r', 'online': '1',
'frontend-id': '13', 'type': 'file'} to
/local/domain/0/backend/vbd/13/832.
[2011-06-15 16:16:58 312] INFO (XendDomainInfo:1907) createDevice: vif
: {'bridge': 'bridge1', 'mac': '00:16:3e:2e:39:94', 'devid': 0,
'type': 'ioemu', 'uuid': '4b44f3d8-9618-9e78-d427-1dda56af799a'}
[2011-06-15 16:16:58 312] DEBUG (DevController:122) DevController:
writing {'state': '1', 'backend-id': '0', 'backend':
'/local/domain/0/backend/vif/13/0'} to /local/domain/13/device/vif/0.
[2011-06-15 16:16:58 312] DEBUG (DevController:124) DevController:
writing {'bridge': 'bridge1', 'domain': 'ubntu11', 'handle': '0',
'uuid': '4b44f3d8-9618-9e78-d427-1dda56af799a', 'script':
'/usr/pkg/etc/xen/scripts/vif-bridge', 'mac': '00:16:3e:2e:39:94',
'frontend-id': '13', 'state': '1', 'online': '1', 'frontend':
'/local/domain/13/device/vif/0', 'type': 'ioemu'} to
/local/domain/0/backend/vif/13/0.
[2011-06-15 16:16:58 312] INFO (image:373) spawning device models:
/usr/pkg/libexec/qemu-dm ['/usr/pkg/libexec/qemu-dm', '-d', '13',
'-domain-name', 'ubntu11', '-vnc', '0.0.0.0:0,password', '-vncunused',
'-vcpus', '1', '-boot', 'd', '-acpi', '-usbdevice', 'tablet', '-net',
'nic,vlan=1,macaddr=00:16:3e:2e:39:94,model=rtl8139', '-net',
'tap,vlan=1,ifname=tap13.0,bridge=bridge1', '-M', 'xenfv']
[2011-06-15 16:16:58 312] INFO (image:420) device model pid: 1818
[2011-06-15 16:16:58 312] INFO (image:509) waiting for sentinel_fifo
[2011-06-15 16:16:58 312] DEBUG (XendDomainInfo:2738) Storing VM
details: {'on_xend_stop': 'ignore', 'shadow_memory': '17', 'uuid':
'f3520630-dd11-e75f-3dd1-dd0ac6d54c04', 'on_reboot': 'restart',
'start_time': '1308147418.59', 'on_poweroff': 'destroy',
'bootloader_args': '', 'on_xend_start': 'ignore', 'on_crash':
'restart', 'xend/restart_count': '0', 'vcpus': '1', 'vcpu_avail': '1',
'bootloader': '', 'image': '(hvm (kernel ) (timer_mode 0) (vnc 1)
(nographic 0) (hpet 0) (rtc_timeoffset 0) (guest_os_type default)
(loader /usr/pkg/lib/xen/boot/hvmloader) (pci ()) (apic 1) (hap 1)
(monitor 0) (device_model /usr/pkg/libexec/qemu-dm) (boot d)
(usbdevice tablet) (pae 1) (stdvga 0) (usb 0) (xauthority
/root/.Xauthority) (isa 0) (acpi 1) (vncunused 1) (localtime 0) (notes
(SUSPEND_CANCEL 1)))', 'name': 'ubntu11'}
[2011-06-15 16:16:58 312] DEBUG (XendDomainInfo:1360) Storing domain
details: {'console/port': '3', 'name': 'ubntu11', 'console/limit':
'1048576', 'store/port': '2', 'vm':
'/vm/f3520630-dd11-e75f-3dd1-dd0ac6d54c04', 'domid': '13',
'image/suspend-cancel': '1', 'cpu/0/availability': 'online',
'memory/target': '2097152',
'control/platform-feature-multiprocessor-suspend': '1',
'store/ring-ref': '524285', 'console/type': 'ioemu'}
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices vif.
[2011-06-15 16:16:58 312] DEBUG (DevController:171) Waiting for 0.
[2011-06-15 16:16:58 312] DEBUG (XendDomainInfo:1450)
XendDomainInfo.handleShutdownWatch
[2011-06-15 16:16:58 312] DEBUG (DevController:656)
hotplugStatusCallback /local/domain/0/backend/vif/13/0/hotplug-status.
[2011-06-15 16:16:58 312] DEBUG (DevController:670) hotplugStatusCallback 1.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices vkbd.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices ioports.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices tap.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices console.
[2011-06-15 16:16:58 312] DEBUG (DevController:171) Waiting for 0.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices vscsi.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices vbd.
[2011-06-15 16:16:58 312] DEBUG (DevController:171) Waiting for 768.
[2011-06-15 16:16:58 312] DEBUG (DevController:656)
hotplugStatusCallback
/local/domain/0/backend/vbd/13/768/hotplug-status.
[2011-06-15 16:16:58 312] DEBUG (DevController:670) hotplugStatusCallback 1.
[2011-06-15 16:16:58 312] DEBUG (DevController:171) Waiting for 832.
[2011-06-15 16:16:58 312] DEBUG (DevController:656)
hotplugStatusCallback
/local/domain/0/backend/vbd/13/832/hotplug-status.
[2011-06-15 16:16:58 312] DEBUG (DevController:670) hotplugStatusCallback 1.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices irq.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices vfb.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices pci.
[2011-06-15 16:16:58 312] DEBUG (DevController:166) Waiting for devices vtpm.
[2011-06-15 16:17:00 312] WARNING (XendDomainInfo:1624) Domain has
crashed: name=ubntu11 id=13.
[2011-06-15 16:17:00 312] ERROR (XendDomainInfo:1762) VM ubntu11
restarting too fast (3.579519 seconds since the last restart).
Refusing to restart to avoid loops.
[2011-06-15 16:17:00 312] DEBUG (XendDomainInfo:2409)
XendDomainInfo.destroy: domid=13
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1946) Destroying device model
[2011-06-15 16:17:01 312] WARNING (image:470) domain ubntu11: device
model failure: no longer running; see /var/log/xen/qemu-dm-ubntu11.log
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1953) Releasing devices
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1966) Removing vif/0
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:910)
XendDomainInfo.destroyDevice: deviceClass = vif, device = vif/0
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1966) Removing console/0
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:910)
XendDomainInfo.destroyDevice: deviceClass = console, device =
console/0
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1966) Removing vbd/768
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:910)
XendDomainInfo.destroyDevice: deviceClass = None, device = vbd/768
[2011-06-15 16:17:01 312] ERROR (XendDomainInfo:1973) Device release
failed: ubntu11; None; vbd/768
Traceback (most recent call last):
  File "/usr/pkg/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 1967, in _releaseDevices
    self.destroyDevice(true_devclass, dev, False);
  File "/usr/pkg/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 924, in destroyDevice
    rc = self.getDeviceController(deviceClass).destroyDevice(devid, force)
  File "/usr/pkg/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 1988, in getDeviceController
    raise XendError("Unknown device type: %s" % name)
XendError: Unknown device type: None
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1966) Removing vbd/832
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:910)
XendDomainInfo.destroyDevice: deviceClass = None, device = vbd/832
[2011-06-15 16:17:01 312] ERROR (XendDomainInfo:1973) Device release
failed: ubntu11; None; vbd/832
Traceback (most recent call last):
  File "/usr/pkg/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 1967, in _releaseDevices
    self.destroyDevice(true_devclass, dev, False);
  File "/usr/pkg/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 924, in destroyDevice
    rc = self.getDeviceController(deviceClass).destroyDevice(devid, force)
  File "/usr/pkg/lib/python2.6/site-packages/xen/xend/XendDomainInfo.py",
line 1988, in getDeviceController
    raise XendError("Unknown device type: %s" % name)
XendError: Unknown device type: None
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1966) Removing vfb/0
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:910)
XendDomainInfo.destroyDevice: deviceClass = vfb, device = vfb/0
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1951) No device model
[2011-06-15 16:17:01 312] DEBUG (XendDomainInfo:1953) Releasing devices

Thanks for the help, Roger.


Home | Main Index | Thread Index | Old Index