Subject: port-xen/34198: xenconsole: Could not read tty from store
To: None <port-xen-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <ace@netlinx.de>
List: netbsd-bugs
Date: 08/14/2006 15:25:00
>Number:         34198
>Category:       port-xen
>Synopsis:       xenconsole: Could not read tty from store
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-xen-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 14 15:25:00 +0000 2006
>Originator:     Friedrich Holzapfel
>Release:        NetBSD 4.0_BETA
>Organization:
>Environment:
NetBSD lunatiq 4.0_BETA NetBSD 4.0_BETA (XEN3_DOM0) #0: Sat Aug 12 19:10:28 CEST 2006  ace@lunatiq:/usr/obj/sys/arch/i386/compile/XEN3_DOM0 i386
>Description:

lunatiq# xm create dom1 -c
Using config file "/usr/pkg/etc/xen/dom1".
Started domain dom1
xenconsole: Could not read tty from store: No such file or directory
lunatiq# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      256     1 r-----    32.9
dom1                               1       64     1 ------    85.2
lunatiq# xm console 1
xenconsole: Could not read tty from store: No such file or directory



########################
# /usr/pkg/etc/xen/dom1:
########################

#kernel = "/usr/src/..obj/releasedir/i386/binary/kernel/netbsd-INSTALL_XEN3_DOMU.gz"
kernel = "/netbsd-INSTALL_XEN3_DOMU"
memory = 64
name = "dom1"
vif = [ 'mac=aa:00:00:50:01:f0, bridge=bridge0' ]
disk = [ 'phy:/dev/wd0g,0x03,w','file:/usr/src/../obj/releasedir/i386/installation/cdrom/netbsd-i386.iso,0x04,r' ]
root = "/dev/wd0d"



####################
# /var/log/xend.log:
####################

[2006-08-14 16:47:11 xend] INFO (SrvDaemon:278) Xend Daemon started
[2006-08-14 16:47:11 xend] INFO (SrvDaemon:282) Xend changeset: Thu Apr 13 15:18:37 2006 +0100 9617:5802713c159b.
[2006-08-14 16:47:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:200) XendDomainInfo.recreate({'paused': 0, 'cpu_time': 9748897096L, 'ssidref': 0, 'handle': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'shutdown_reason': 0, 'dying': 0, 'dom': 0, 'mem_kb': 262144, 'maxmem_kb': -4, 'max_vcpu_id': 0, 'crashed': 0, 'running': 1, 'shutdown': 0, 'online_vcpus': 1, 'blocked': 0})
[2006-08-14 16:47:11 xend.XendDomainInfo] INFO (XendDomainInfo:212) Recreating domain 0, UUID 00000000-0000-0000-0000-000000000000.
[2006-08-14 16:47:11 xend.XendDomainInfo] WARNING (XendDomainInfo:234) No vm path in store for existing domain 0
[2006-08-14 16:47:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:671) Storing VM details: {'ssidref': '0', 'uuid': '00000000-0000-0000-0000-000000000000', 'on_reboot': 'restart', 'on_poweroff': 'destroy', 'name': 'Domain-0', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '256', 'on_crash': 'restart', 'maxmem': '256'}
[2006-08-14 16:47:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:696) Storing domain details: {'cpu/0/availability': 'online', 'memory/target': '262144', 'name': 'Domain-0', 'console/limit': '1048576', 'vm': '/vm/00000000-0000-0000-0000-000000000000', 'domid': '0'}
[2006-08-14 16:47:11 xend] DEBUG (XendDomain:152) number of vcpus to use is 0
[2006-08-14 16:47:11 xend] INFO (SrvServer:116) unix path=/var/run/xend/xend-socket
[2006-08-14 16:47:11 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch
[2006-08-14 16:48:41 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) XendDomainInfo.create(['vm', ['name', 'dom1'], ['memory', 64], ['vcpus', 1], ['image', ['linux', ['kernel', '/netbsd-INSTALL_XEN3_DOMU'], ['root', '/dev/wd0d']]], ['device', ['vbd', ['uname', 'phy:/dev/wd0g'], ['dev', '0x03'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/usr/src/../obj/releasedir/i386/installation/cdrom/netbsd-i386.iso'], ['dev', '0x04'], ['mode', 'r']]], ['device', ['vif', ['bridge', 'bridge0'], ['mac', 'aa:00:00:50:01:f0']]]])
[2006-08-14 16:48:41 xend.XendDomainInfo] DEBUG (XendDomainInfo:284) parseConfig: config is ['vm', ['name', 'dom1'], ['memory', 64], ['vcpus', 1], ['image', ['linux', ['kernel', '/netbsd-INSTALL_XEN3_DOMU'], ['root', '/dev/wd0d']]], ['device', ['vbd', ['uname', 'phy:/dev/wd0g'], ['dev', '0x03'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/usr/src/../obj/releasedir/i386/installation/cdrom/netbsd-i386.iso'], ['dev', '0x04'], ['mode', 'r']]], ['device', ['vif', ['bridge', 'bridge0'], ['mac', 'aa:00:00:50:01:f0']]]]
[2006-08-14 16:48:41 xend.XendDomainInfo] DEBUG (XendDomainInfo:380) parseConfig: result is {'ssidref': None, 'uuid': None, 'on_crash': None, 'on_reboot': None, 'image': ['linux', ['kernel', '/netbsd-INSTALL_XEN3_DOMU'], ['root', '/dev/wd0d']], 'on_poweroff': None, 'cpus': None, 'name': 'dom1', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'vcpu_avail': None, 'memory': 64, 'device': [('vbd', ['vbd', ['uname', 'phy:/dev/wd0g'], ['dev', '0x03'], ['mode', 'w']]), ('vbd', ['vbd', ['uname', 'file:/usr/src/../obj/releasedir/i386/installation/cdrom/netbsd-i386.iso'], ['dev', '0x04'], ['mode', 'r']]), ('vif', ['vif', ['bridge', 'bridge0'], ['mac', 'aa:00:00:50:01:f0']])], 'bootloader': None, 'cpu': None, 'maxmem': None}
[2006-08-14 16:48:41 xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct: None 0
[2006-08-14 16:48:41 xend.XendDomainInfo] DEBUG (XendDomainInfo:1196) XendDomainInfo.initDomain: 1 1.0
[2006-08-14 16:48:41 xend] DEBUG (balloon:126) Balloon: free 237; need 65; done.
[2006-08-14 16:48:41 xend] INFO (image:135) buildDomain os=linux dom=1 vcpus=1
[2006-08-14 16:48:41 xend] DEBUG (image:173) dom            = 1
[2006-08-14 16:48:41 xend] DEBUG (image:174) image          = /netbsd-INSTALL_XEN3_DOMU
[2006-08-14 16:48:41 xend] DEBUG (image:175) store_evtchn   = 1
[2006-08-14 16:48:41 xend] DEBUG (image:176) console_evtchn = 2
[2006-08-14 16:48:41 xend] DEBUG (image:177) cmdline        =  root=/dev/wd0d
[2006-08-14 16:48:41 xend] DEBUG (image:178) ramdisk        =
[2006-08-14 16:48:41 xend] DEBUG (image:179) vcpus          = 1
[2006-08-14 16:48:41 xend] DEBUG (image:180) features       =
[2006-08-14 16:48:41 xend] DEBUG (blkif:24) exception looking up device number for 0x03: [Errno 2] No such file or directory: '/dev/0x03'
[2006-08-14 16:48:41 xend] DEBUG (DevController:103) DevController: writing {'virtual-device': '3', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vbd/1/3'} to /local/domain/1/device/vbd/3.
[2006-08-14 16:48:41 xend] DEBUG (DevController:105) DevController: writing {'domain': 'dom1', 'frontend': '/local/domain/1/device/vbd/3', 'dev': '0x03', 'state': '1', 'params': '/dev/wd0g', 'mode': 'w', 'frontend-id': '1', 'type': 'phy'} to /local/domain/0/backend/vbd/1/3.
[2006-08-14 16:48:41 xend] DEBUG (blkif:24) exception looking up device number for 0x04: [Errno 2] No such file or directory: '/dev/0x04'
[2006-08-14 16:48:41 xend] DEBUG (DevController:103) DevController: writing {'virtual-device': '4', 'backend-id': '0', 'state': '1', 'backend': '/local/domain/0/backend/vbd/1/4'} to /local/domain/1/device/vbd/4.
[2006-08-14 16:48:41 xend] DEBUG (DevController:105) DevController: writing {'domain': 'dom1', 'frontend': '/local/domain/1/device/vbd/4', 'dev': '0x04', 'state': '1', 'params': '/usr/src/../obj/releasedir/i386/installation/cdrom/netbsd-i386.iso', 'mode': 'r', 'frontend-id': '1', 'type': 'file'} to /local/domain/0/backend/vbd/1/4.
[2006-08-14 16:48:41 xend] DEBUG (DevController:103) DevController: writing {'backend-id': '0', 'mac': 'aa:00:00:50:01:f0', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/1/0'} to /local/domain/1/device/vif/0.
[2006-08-14 16:48:41 xend] DEBUG (DevController:105) DevController: writing {'bridge': 'bridge0', 'domain': 'dom1', 'handle': '0', 'script': '/usr/pkg/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend': '/local/domain/1/device/vif/0', 'mac': 'aa:00:00:50:01:f0', 'frontend-id': '1'} to /local/domain/0/backend/vif/1/0.
[2006-08-14 16:48:42 xend.XendDomainInfo] DEBUG (XendDomainInfo:671) Storing VM details: {'ssidref': '0', 'uuid': '4e5b7b21-0758-7588-4fc2-97bfcde79024', 'on_reboot': 'restart', 'start_time': '1155566922.09', 'on_poweroff': 'destroy', 'name': 'dom1', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '64', 'on_crash': 'restart', 'image': '(linux (kernel /netbsd-INSTALL_XEN3_DOMU) (root /dev/wd0d))', 'maxmem': '64'}
[2006-08-14 16:48:42 xend.XendDomainInfo] DEBUG (XendDomainInfo:696) Storing domain details: {'console/ring-ref': '58995', 'console/port': '2', 'name': 'dom1', 'console/limit': '1048576', 'vm': '/vm/4e5b7b21-0758-7588-4fc2-97bfcde79024', 'domid': '1', 'cpu/0/availability': 'online', 'memory/target': '65536', 'store/ring-ref': '58996', 'store/port': '1'}
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices vif.
[2006-08-14 16:48:42 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch
[2006-08-14 16:48:42 xend] DEBUG (DevController:138) Waiting for 0.
[2006-08-14 16:48:42 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vif/1/0/hotplug-status.
[2006-08-14 16:48:42 xend] DEBUG (DevController:417) hotplugStatusCallback 1.
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices usb.
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices vbd.
[2006-08-14 16:48:42 xend] DEBUG (DevController:138) Waiting for 3.
[2006-08-14 16:48:42 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vbd/1/3/hotplug-status.
[2006-08-14 16:48:42 xend] DEBUG (DevController:417) hotplugStatusCallback 1.
[2006-08-14 16:48:42 xend] DEBUG (DevController:138) Waiting for 4.
[2006-08-14 16:48:42 xend] DEBUG (DevController:403) hotplugStatusCallback /local/domain/0/backend/vbd/1/4/hotplug-status.
[2006-08-14 16:48:42 xend] DEBUG (DevController:417) hotplugStatusCallback 1.
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices irq.
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices pci.
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices ioports.
[2006-08-14 16:48:42 xend] DEBUG (DevController:132) Waiting for devices vtpm.
[2006-08-14 16:48:42 xend] INFO (XendDomain:363) Domain dom1 (1) unpaused.


There are two more things that i don't really get:
  [2006-08-14 16:48:41 xend] INFO (image:135) buildDomain os=linux dom=1 vcpus=1
    --> should i set somewhere os=NetBSD ?
  [2006-08-14 16:48:41 xend] DEBUG (blkif:24) exception looking up device number for 0x03: [Errno 2] No such file or directory: '/dev/0x03'
    --> Setting "disk = [ 'phy:/dev/wd0g,wd0d,r' ]" causes the error:
    Error: Device 3 (vbd) could not be connected. Hotplug scripts not working.
    (just ignore the former error?)



>How-To-Repeat:
Install
  sysutils/xenkernel30/ (xenkernel30-3.0.2.2 
  sysutils/xentools30/  (xentools30-3.0.2.2)

In order to get rid of the python error messages, install
  textproc/py-expat/  (py24-expat-0nb4)
>Fix: