[PTLsim-devel] Problems with devices for domU

Stephan Diestelhorst
Tue Oct 9 12:42:31 EDT 2007


Hi,
  I've been playing around with the options for root-devices for a domU in 
PTLsim/X and finally have found only the way with tap.aio usable, using the 
ptlsim.img from the webpage.

Ideally I'd like to have my domU's root mounted over NFS, but mounting a 
physical partition would be nice too.

If I use the attached xm-config file, (xm create ptlvm-smp.sda1 -c) the domain 
will eventually time-out and just state 

# Error: Device 769 (vbd) could not be connected. Hotplug scripts not working.

looking around in /etc/xen/xend.log, I can however find the appropriate 

[2007-10-09 18:02:41 4228] DEBUG (DevController:538) 
hotplugStatusCallback /local/domain/0/backend/vbd/8/769/hotplug-status.

(for a full, relevant trace see attachement).

/var/log/xen/xend-debug.log doesn't have any associated lines.

This is on a openSUSE 10.2 dom0 root image, mounted over NFS. OpenSUSE just 
uses udev for anything hotplug related and I have checked for the udev rules 
with

# udevtest /sys/devices/xen-backend/vbd-1-769/
This program is for debugging only, it does not create any node,
or run any program specified by a RUN key. It may show incorrect results,
if rules match against subsystem specfic kernel event variables.

main: looking at device '/devices/xen-backend/vbd-1-769' from 
subsystem 'xen-backend'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/etc/xen/scripts/block add'
main: run: 'socket:/org/kernel/udev/monitor'

which suggests that the udev scripts are processed correctly.
I'm (still) using PTLsim's 219 revision, as I have heavily changed the core 
models and have not yet found the time to do a merge. As a kernel I use the 
provided 2.6.20.3-mtyrel-64bit-xen kernel sources and rebuilt them myself. I 
have also rebuitl and reinstalled the xentools inside my dom0.

As this is a custom kernel, I was wondering if anybody else has experienced 
similar issues? I've tried different things and queried google and the 
mailing lists for days now, but nothing really seems to give any clue on the 
problem. 

I suspect that some hotplug events are not created properly, but can't nail 
that down to anything particular.

I'm happy about any suggestion from your side!

Big thanks in advance!

Stephan

-- 
Stephan Diestelhorst, AMD Operating System Research Center
stephan.diestelhorst at amd.com, Tel.   (AMD: 8-4903)

AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, 
Deutschland
Registergericht Dresden: HRA 4896

vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, 
Delaware, USA)
Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
-------------- next part --------------
#  -*- mode: python; -*-
#
# PTLsim Xen configuration file
#
# Put this in /etc/xen/ptlvm and run "xm create ptlvm -c".
#

name = "ptlvm-smp"
kernel = "/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen"
initrd = "/boot/initrd-2.6.20.3-mtyrel-64bit-xen" 
builder='linux'
memory = 128
#vcpus = 4
vcpus = 8

#disk = [ 'tap:aio:/local_scratch/ptlsim.img,hda1,w' ]
extra = "nousb noide xencons=ttyS console=ttyS0"
disk=[ 'phy:/dev/sda1,hda1,w']
#disk=['file:/local_scratch/ptlsim.img,hda1,w']

root       = '/dev/hda1'
#nfs_server = '165.204.85.14' #loge
#nfs_root   = '/vol/osrc_data/nfsroot/openSUSE-10.2-64-PTLsim-Xen-sdiestel-guest' 

# Networking options (if desired)
#vif = [ ' ', 'bridge=xenbr0' ]
#dhcp='dhcp'
#
# Reboot behavior:
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'destroy'
-------------- next part --------------
[2007-10-09 18:02:37 4228] DEBUG (XendDomainInfo:75) XendDomainInfo.create(['vm', ['name', 'ptlvm-smp'], ['memory', 128], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'destroy'], ['vcpus', 8], ['on_xend_s
tart', 'ignore'], ['on_xend_stop', 'ignore'], ['image', ['linux', ['kernel', '/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen'], ['args', 'nousb noide xencons=ttyS console=ttyS0']]], ['device', ['vbd', ['uname', 'phy:sda1'], ['dev', '
hda1'], ['mode', 'w']]]])
[2007-10-09 18:02:37 4228] DEBUG (XendConfig:620) _sxp_to_xapi(['vm', ['name', 'ptlvm-smp'], ['memory', 128], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'destroy'], ['vcpus', 8], ['on_xend_start', 'igno
re'], ['on_xend_stop', 'ignore'], ['image', ['linux', ['kernel', '/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen'], ['args', 'nousb noide xencons=ttyS console=ttyS0']]], ['device', ['vbd', ['uname', 'phy:sda1'], ['dev', 'hda1'], ['mo
de', 'w']]]])
[2007-10-09 18:02:37 4228] DEBUG (XendConfig:555) XendConfig: reading device: {}
[2007-10-09 18:02:37 4228] DEBUG (XendConfig:1378) update_with_image_sxp(['linux', ['kernel', '/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen'], ['args', 'nousb noide xencons=ttyS console=ttyS0']])
[2007-10-09 18:02:37 4228] DEBUG (XendConfig:703) _sxp_to_xapi_unsupported(['vm', ['name', 'ptlvm-smp'], ['memory', 128], ['on_poweroff', 'destroy'], ['on_reboot', 'restart'], ['on_crash', 'destroy'], ['vcpus', 8], ['on_xend_s
tart', 'ignore'], ['on_xend_stop', 'ignore'], ['image', ['linux', ['kernel', '/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen'], ['args', 'nousb noide xencons=ttyS console=ttyS0']]], ['device', ['vbd', ['uname', 'phy:sda1'], ['dev', '
hda1'], ['mode', 'w']]]])
[2007-10-09 18:02:37 4228] DEBUG (XendConfig:324) XendConfig.init: {'vcpus_params': {}, 'PV_args': 'nousb noide xencons=ttyS console=ttyS0', 'features': '', 'image': {'type': 'linux'}, 'cpus': [], 'devices': {'e2cd37a5-002c-5e
54-d868-e0cd0e122d34': ('vbd', {'uuid': 'e2cd37a5-002c-5e54-d868-e0cd0e122d34', 'bootable': 1, 'driver': 'paravirtualised', 'dev': 'hda1', 'uname': 'phy:sda1', 'mode': 'w'})}, 'PV_bootloader': '', 'actions_after_crash': 'destr
oy', 'platform_std_vga': False, 'vbd_refs': ['e2cd37a5-002c-5e54-d868-e0cd0e122d34'], 'PV_ramdisk': '', 'name_label': 'ptlvm-smp', 'HVM_boot_params': {}, 'cpu_weight': 256, 'console_refs': [], 'cpu_cap': 0, 'on_xend_stop': 'ig
nore', 'memory_static_min': 128, 'HVM_boot_policy': '', 'memory_actual': 0, 'memory_static_max': 128, 'actions_after_shutdown': 'destroy', 'on_xend_start': 'ignore', 'memory_dynamic_max': 128, 'vcpus_number': 8, 'actions_after
_suspend': '', 'memory_dynamic_min': 128, 'PV_kernel': '/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen', 'shadow_memory': 0, 'PV_bootloader_args': '', 'other_config': {}, 'actions_after_reboot': 'restart', 'platform_serial': '', 'pla
tform_localtime': False, 'vif_refs': [], 'platform_enable_audio': False, 'vtpm_refs': [], 'security': None}
[2007-10-09 18:02:37 4228] DEBUG (XendDomainInfo:1386) XendDomainInfo.constructDomain
[2007-10-09 18:02:37 4228] DEBUG (XendDomain:427) Adding Domain: 8
[2007-10-09 18:02:37 4228] DEBUG (XendDomainInfo:1435) XendDomainInfo.initDomain: 8 256
[2007-10-09 18:02:37 4228] DEBUG (XendDomainInfo:1472) _initDomain:shadow_memory=0x0, memory_static_max=0x80, memory_static_min=0x80.
[2007-10-09 18:02:37 4228] DEBUG (balloon:127) Balloon: 131388 KiB free; need 131072; done.
[2007-10-09 18:02:37 4228] INFO (image:130) buildDomain os=linux dom=8 vcpus=8
[2007-10-09 18:02:37 4228] DEBUG (image:199) domid          = 8
[2007-10-09 18:02:37 4228] DEBUG (image:200) memsize        = 128
[2007-10-09 18:02:37 4228] DEBUG (image:201) image          = /boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen
[2007-10-09 18:02:37 4228] DEBUG (image:202) store_evtchn   = 1
[2007-10-09 18:02:37 4228] DEBUG (image:203) console_evtchn = 2
[2007-10-09 18:02:37 4228] DEBUG (image:204) cmdline        = nousb noide xencons=ttyS console=ttyS0
[2007-10-09 18:02:37 4228] DEBUG (image:205) ramdisk        =
[2007-10-09 18:02:37 4228] DEBUG (image:206) vcpus          = 8
[2007-10-09 18:02:37 4228] DEBUG (image:207) features       =
[2007-10-09 18:02:37 4228] INFO (XendDomainInfo:1288) createDevice: vbd : {'uuid': 'e2cd37a5-002c-5e54-d868-e0cd0e122d34', 'bootable': 1, 'driver': 'paravirtualised', 'dev': 'hda1', 'uname': 'phy:sda1', 'mode': 'w'}
[2007-10-09 18:02:37 4228] DEBUG (DevController:115) DevController: writing {'backend-id': '0', 'virtual-device': '769', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/8/769'} to /local/domain/8/d
evice/vbd/769.
[2007-10-09 18:02:37 4228] DEBUG (DevController:117) DevController: writing {'domain': 'ptlvm-smp', 'frontend': '/local/domain/8/device/vbd/769', 'uuid': 'e2cd37a5-002c-5e54-d868-e0cd0e122d34', 'dev': 'hda1', 'state': '1', 'pa
rams': 'sda1', 'mode': 'w', 'online': '1', 'frontend-id': '8', 'type': 'phy'} to /local/domain/0/backend/vbd/8/769.
[2007-10-09 18:02:38 4228] DEBUG (XendDomainInfo:1937) Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0', 'uuid': 'b557f493-2a09-ff86-66e4-b413c56ec96b', 'name': 'ptlvm-smp', 'on_reboot': 'restart', 'start_ti
me': '1191945758.24', 'on_poweroff': 'destroy', 'on_xend_start': 'ignore', 'on_crash': 'destroy', 'xend/restart_count': '0', 'vcpus': '8', 'vcpu_avail': '255', 'memory': '128', 'image': "(linux (kernel /boot/vmlinuz-2.6.20.3-m
tyrel-64bit-xen) (args 'nousb noide xencons=ttyS console=ttyS0') (notes (FEATURES 'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel') (VIRT_BASE 184467440715620
67968) (GUEST_VERSION 2.6) (PADDR_OFFSET 18446744071562067968) (GUEST_OS linux) (HYPERCALL_PAGE 18446744071563141120) (LOADER generic) (ENTRY 18446744071563116544) (XEN_VERSION xen-3.0)))", 'maxmem': '128'}
[2007-10-09 18:02:38 4228] DEBUG (XendDomainInfo:814) Storing domain details: {'console/ring-ref': '4249012', 'image/entry': '18446744071563116544', 'console/port': '2', 'cpu/3/availability': 'online', 'store/ring-ref': '42490
13', 'image/loader': 'generic', 'image/features/writable-page-tables': '1', 'vm': '/vm/b557f493-2a09-ff86-66e4-b413c56ec96b', 'control/platform-feature-multiprocessor-suspend': '1', 'cpu/2/availability': 'online', 'cpu/1/avail
ability': 'online', 'image/features/writable-descriptor-tables': '1', 'cpu/7/availability': 'online', 'image/virt-base': '18446744071562067968', 'memory/target': '131072', 'image/guest-version': '2.6', 'image/features/supervis
or-mode-kernel': '1', 'cpu/4/availability': 'online', 'image/guest-os': 'linux', 'console/limit': '1048576', 'image/paddr-offset': '18446744071562067968', 'image/hypercall-page': '18446744071563141120', 'cpu/5/availability': '
online', 'cpu/0/availability': 'online', 'image/features/pae-pgdir-above-4gb': '1', 'cpu/6/availability': 'online', 'image/features/auto-translated-physmap': '1', 'name': 'ptlvm-smp', 'domid': '8', 'image/xen-version': 'xen-3.
0', 'store/port': '1'}
[2007-10-09 18:02:40 4228] DEBUG (DevController:115) DevController: writing {'state': '1', 'backend-id': '0', 'backend': '/local/domain/0/backend/console/8/0'} to /local/domain/8/device/console/0.
[2007-10-09 18:02:40 4228] DEBUG (DevController:117) DevController: writing {'domain': 'ptlvm-smp', 'protocol': 'vt100', 'uuid': 'f63c79f8-4214-dc24-3260-8a85b0630130', 'frontend': '/local/domain/8/device/console/0', 'state':
'1', 'location': '2', 'online': '1', 'frontend-id': '8'} to /local/domain/0/backend/console/8/0.
[2007-10-09 18:02:41 4228] DEBUG (XendConfig:1378) update_with_image_sxp(['linux', ['kernel', '/boot/vmlinuz-2.6.20.3-mtyrel-64bit-xen'], ['args', 'nousb noide xencons=ttyS console=ttyS0'], ['notes', ['FEATURES', 'writable_pag
e_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'], ['VIRT_BASE', '18446744071562067968'], ['GUEST_VERSION', '2.6'], ['PADDR_OFFSET', '18446744071562067968'], ['GUEST_OS',
'linux'], ['HYPERCALL_PAGE', '18446744071563141120'], ['LOADER', 'generic'], ['ENTRY', '18446744071563116544'], ['XEN_VERSION', 'xen-3.0']]])
[2007-10-09 18:02:41 4228] DEBUG (XendDomainInfo:814) Storing domain details: {'console/ring-ref': '4249012', 'image/entry': '18446744071563116544', 'console/port': '2', 'cpu/3/availability': 'online', 'store/ring-ref': '42490
13', 'image/loader': 'generic', 'image/features/writable-page-tables': '1', 'vm': '/vm/b557f493-2a09-ff86-66e4-b413c56ec96b', 'control/platform-feature-multiprocessor-suspend': '1', 'cpu/2/availability': 'online', 'cpu/1/avail
ability': 'online', 'image/features/writable-descriptor-tables': '1', 'cpu/7/availability': 'online', 'image/virt-base': '18446744071562067968', 'memory/target': '131072', 'image/guest-version': '2.6', 'image/features/supervis
or-mode-kernel': '1', 'cpu/4/availability': 'online', 'image/guest-os': 'linux', 'console/limit': '1048576', 'image/paddr-offset': '18446744071562067968', 'image/hypercall-page': '18446744071563141120', 'cpu/5/availability': '
online', 'cpu/0/availability': 'online', 'image/features/pae-pgdir-above-4gb': '1', 'cpu/6/availability': 'online', 'image/features/auto-translated-physmap': '1', 'name': 'ptlvm-smp', 'domid': '8', 'image/xen-version': 'xen-3.
0', 'store/port': '1'}
[2007-10-09 18:02:41 4228] DEBUG (DevController:148) Waiting for devices vif.
[2007-10-09 18:02:41 4228] DEBUG (DevController:148) Waiting for devices usb.
[2007-10-09 18:02:41 4228] DEBUG (DevController:148) Waiting for devices vbd.
[2007-10-09 18:02:41 4228] DEBUG (DevController:153) Waiting for 769.
[2007-10-09 18:02:41 4228] DEBUG (XendDomainInfo:881) XendDomainInfo.handleShutdownWatch
[2007-10-09 18:02:41 4228] DEBUG (DevController:538) hotplugStatusCallback /local/domain/0/backend/vbd/8/769/hotplug-status.
[2007-10-09 18:04:21 4228] DEBUG (XendDomainInfo:1633) XendDomainInfo.destroy: domid=8
[2007-10-09 18:04:21 4228] DEBUG (XendDomainInfo:1644) XendDomainInfo.destroyDomain(8)


More information about the PTLsim-devel mailing list