Skip to contentSkip to conversation

Error report from attempt to run an HVM instance

DISCUSSION Michael Litchard 4 participants 9 messages Aug 23, 2008 – Aug 26, 2008

lore
Share & tools
lore
#0 lore raw

Tried to run an HVM instance, here's the error report I got.

# /usr/pkg/sbin/xm create -c /usr/pkg/share/examples/xen/hvm-netbsd
Using config file "/usr/pkg/share/examples/xen/hvm-netbsd".
Started domain hvm-netbsd
Unexpected error: exceptions.OSError

Please report to [email protected]
Traceback (most recent call last):
File "/usr/pkg/sbin/xm", line 10, in ?
main.main(sys.argv)
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line 2497, in main

    _, rc = _run_cmd(cmd, cmd_name, args)

File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line
2521, in _run_cmd
return True, cmd(args)
File "<string>", line 1, in <lambda>
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line
1299, in xm_importcommand
cmd.main([command] + args)
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/create.py", line
1298, in main

    do_console(sxp.child_value(config, 'name', -1))

File "/usr/pkg/lib/python2.4/site-packages/xen/xm/create.py", line
1323, in do_console
(p, rv) = os.waitpid(cpid, os.WNOHANG)
OSError: [Errno 10] No child processes

kernel = "/usr/pkg/lib/xen/boot/hvmloader"

builder='hvm'

# Initial memory allocation (in megabytes) for the new domain. memory = 256

# A name for your domain. All domains must have different names. name = "hvm-netbsd"

#Network interface. By default emules a realtek 8139. For a NetBSD guest you

# have to disable re(4) and let rtk attach to use it.
# ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0
# pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with
# pcn(4) under NetBSD.
#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=ne2k_pci' ]
#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=pcnet' ]
vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu' ]

#----------------------------------------------------------------------------

# device model to use: only qemu-dm available for now
device_model = '/usr/pkg/libexec/qemu-dm'

# Define the disk devices you want the domain to have access to, and

# what you want them accessible as.
# Each disk entry is of the form phy:UNAME,DEV,MODE
# where UNAME is the device, DEV is the device name the domain will see,
# and MODE is r for read-only, w for read-write.
# For hvm domains you can only use hda to hdd. You can set extra types
# (e.g. cdrom)

disk = [ 'file:/sys/domains/domU3/amd64cd.iso,ioemu:hdc:cdrom,r' ]

disk = ['phy:/dev/wd0i,ioemu:hdb,w']

# floppy images; this doesn't seem to work currently. Use a iso image instead.
#fda = '/home/domains/boot1.fs'
# boot device: a = floppy, c= hard drive, d= cdrom (with the disk entry
# before)# for the virtal framebuffer. You can have the virtal
framebuffer in vnc
# instead, and connect using a vnc client (using localhost:$vncdisplay)
# If vncunused is set to 1 (this is the default value), vncdisplay
# will be set to the first unused port; so it's recommended to
#vnc = 1
#vncdisplay = 0
#vncunused = 0

#Xen emulates a PS/2 mouse, but the pointer in the guest has difficulties

# tracking the absolute position. Xen can emulate a USB tablet in addition
# to the mouse which will report the absolute position of the pointer,
# and make the mouse much easier to use.
#
usb=1
usbdevice='tablet'
#usbdevice='mouse'

Here's my kernel info
NetBSD logos 4.99.72 NetBSD 4.99.72 (XEN3_DOM0) #0: Sat Aug 9
17:34:05 PDT 2008 builds@wb30:/home/builds/ab/HEAD/amd64/200808090002Z-obj/home/builds/ab/HEAD/src/sys/arch/amd64/compile/XEN3_DOM0 amd64

Any feedback helping me troubleshoot this would be appreciate this. Thanks.

Michael Litchard

#1 lore raw
Quoted 3 lines · Michael Litchard

Tried to run an HVM instance, here's the error report I got.

# /usr/pkg/sbin/xm create -c /usr/pkg/share/examples/xen/hvm-netbsd
                            ^^
Quoted 19 lines

Using config file "/usr/pkg/share/examples/xen/hvm-netbsd". Started domain hvm-netbsd
Unexpected error: exceptions.OSError

Please report to [email protected]
Traceback (most recent call last):
File "/usr/pkg/sbin/xm", line 10, in ?
main.main(sys.argv)
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line 2497, in main

    _, rc = _run_cmd(cmd, cmd_name, args)

File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line
2521, in _run_cmd
return True, cmd(args)
File "<string>", line 1, in <lambda>
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line
1299, in xm_importcommand
cmd.main([command] + args)
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/create.py", line
1298, in main

Quoted 5 lines
    do_console(sxp.child_value(config, 'name', -1))

File "/usr/pkg/lib/python2.4/site-packages/xen/xm/create.py", line
1323, in do_console
(p, rv) = os.waitpid(cpid, os.WNOHANG)
OSError: [Errno 10] No child processes

Could it be because you're trying to connect to a serial console, while you have none configured ?

Signature · 3 lines
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--
#2 lore raw

I'm not intending to, I used the hvm script that came with pkgsrc. I can't find any
line in the script that suggests trying to connect to a serial console. If there is a line, could you point it out to me?

Michael Litchard

Quoted 38 lines · Manuel Bouyer
Quoted 3 lines · Michael Litchard

Tried to run an HVM instance, here's the error report I got.

# /usr/pkg/sbin/xm create -c /usr/pkg/share/examples/xen/hvm-netbsd
                           ^^
Quoted 19 lines

Using config file "/usr/pkg/share/examples/xen/hvm-netbsd". Started domain hvm-netbsd
Unexpected error: exceptions.OSError

Please report to [email protected]
Traceback (most recent call last):
File "/usr/pkg/sbin/xm", line 10, in ?
main.main(sys.argv)
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line 2497, in main

    _, rc = _run_cmd(cmd, cmd_name, args)

File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line
2521, in _run_cmd
return True, cmd(args)
File "<string>", line 1, in <lambda>
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/main.py", line
1299, in xm_importcommand
cmd.main([command] + args)
File "/usr/pkg/lib/python2.4/site-packages/xen/xm/create.py", line
1298, in main

Quoted 5 lines
    do_console(sxp.child_value(config, 'name', -1))

File "/usr/pkg/lib/python2.4/site-packages/xen/xm/create.py", line
1323, in do_console
(p, rv) = os.waitpid(cpid, os.WNOHANG)
OSError: [Errno 10] No child processes

Could it be because you're trying to connect to a serial console, while you have none configured ?

--
Manuel Bouyer <[email protected]>
NetBSD: 26 ans d'experience feront toujours la difference
--

#3 lore raw
Quoted 4 lines · Michael Litchard

I'm not intending to, I used the hvm script that came with pkgsrc. I can't find any
line in the script that suggests trying to connect to a serial console. If there is a line, could you point it out to me?

You're using 'xm create -c'
-c instructs to connect to console

Signature · 3 lines
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--
#4 lore raw
In reply to Michael Litchard
Quoted 2 lines · Michael Litchard

Tried to run an HVM instance, here's the error report I got.

[...]

Quoted 31 lines

kernel = "/usr/pkg/lib/xen/boot/hvmloader"

builder='hvm'

# Initial memory allocation (in megabytes) for the new domain. memory = 256

# A name for your domain. All domains must have different names. name = "hvm-netbsd"

#Network interface. By default emules a realtek 8139. For a NetBSD guest you

# have to disable re(4) and let rtk attach to use it.
# ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0
# pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with
# pcn(4) under NetBSD.
#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=ne2k_pci' ]
#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=pcnet' ]
vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu' ]

#----------------------------------------------------------------------------

# device model to use: only qemu-dm available for now
device_model = '/usr/pkg/libexec/qemu-dm'

# Define the disk devices you want the domain to have access to, and

# what you want them accessible as.
# Each disk entry is of the form phy:UNAME,DEV,MODE
# where UNAME is the device, DEV is the device name the domain will see,
# and MODE is r for read-only, w for read-write.
# For hvm domains you can only use hda to hdd. You can set extra types
# (e.g. cdrom)
Quoted 3 lines

disk = [ 'file:/sys/domains/domU3/amd64cd.iso,ioemu:hdc:cdrom,r' ]

disk = ['phy:/dev/wd0i,ioemu:hdb,w']

Replace these two disk lines by this:

disk = [ 'phy:/dev/wd0i,ioemu:hdb,w', 'file:/sys/domains/domU3/amd64cd.iso,ioemu:hdc:cdrom,r' ]

Christoph

#5 lore raw

okay the instance is created

# /usr/pkg/sbin/xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1024     1     r-----     57.3
hvm-netbsd                                   1   256     1     r-----    237.2

but when I did a xm create -c I got this error, and again when I tried to attach to the console

# /usr/pkg/sbin/xm console hvm-netbsd
xenconsole: Could not read tty from store: No such file or directory

I'm close. The config file is the same except the changes christoph suggested. What can I do now?

Quoted 52 lines · Christoph Egger
Quoted 3 lines · Michael Litchard

Tried to run an HVM instance, here's the error report I got.

[...]

Quoted 35 lines

kernel = "/usr/pkg/lib/xen/boot/hvmloader"

builder='hvm'

# Initial memory allocation (in megabytes) for the new domain. memory = 256

# A name for your domain. All domains must have different names. name = "hvm-netbsd"

#Network interface. By default emules a realtek 8139. For a NetBSD guest you

# have to disable re(4) and let rtk attach to use it.
# ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0
# pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with
# pcn(4) under NetBSD.
#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu,
model=ne2k_pci' ]
#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=pcnet'
]
vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu' ]

#----------------------------------------------------------------------------

# device model to use: only qemu-dm available for now
device_model = '/usr/pkg/libexec/qemu-dm'

# Define the disk devices you want the domain to have access to, and

# what you want them accessible as.
# Each disk entry is of the form phy:UNAME,DEV,MODE
# where UNAME is the device, DEV is the device name the domain will see,
# and MODE is r for read-only, w for read-write.
# For hvm domains you can only use hda to hdd. You can set extra types
# (e.g. cdrom)
Quoted 3 lines

disk = [ 'file:/sys/domains/domU3/amd64cd.iso,ioemu:hdc:cdrom,r' ]

disk = ['phy:/dev/wd0i,ioemu:hdb,w']

Replace these two disk lines by this:

disk = [ 'phy:/dev/wd0i,ioemu:hdb,w', 'file:/sys/domains/domU3/amd64cd.iso,ioemu:hdc:cdrom,r' ]

Christoph

#6 lore raw
Quoted 11 lines · Michael Litchard

okay the instance is created

# /usr/pkg/sbin/xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  1024     1     r-----     57.3
hvm-netbsd                                   1   256     1     r-----    237.2

but when I did a xm create -c I got this error, and again when I tried to attach to the console

# /usr/pkg/sbin/xm console hvm-netbsd
xenconsole: Could not read tty from store: No such file or directory

This is not the way you connect to a HVM console, unless you configured the HVM guest to use a serial console. By default it's the HVM's virtual framebuffer.

The virtual framebuffer can be displayed in 2 ways, depending on the config file:
1) using the SDL library. qemu-dm will open a X window on the $DISPLAY from which xm create was run. If $DISPLAY isn't valid, I think the guest will start without console display.
2) qemu-dm act as a vnc server. You connect to the console using vncviewer on localhost. As you only have one guest, I guess it''ll be vncviewer localhost:0

Signature · 3 lines
Manuel Bouyer <[email protected]>
     NetBSD: 26 ans d'experience feront toujours la difference
--
#7 lore raw
In reply to Michael Litchard

Michael Litchard writes ("[Xen-devel] Error report from attempt to run an HVM instance"):

Quoted 1 line

Tried to run an HVM instance, here's the error report I got.

Can we see your xend.log ?

Ian.

#8 lore raw

I started to cut and paste, but it's a big honking file. Here's what I managed to paste. The entire thing is attached

Michael Litchard

[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:451) XendDomainInfo.shutdown(poweroff)
[2008-08-24 16:08:05 177] INFO (XendDomainInfo:469) HVM save:remote shutdown dom 14!
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:998) XendDomainInfo.handleShutdownWatch
[2008-08-24 16:08:05 177] INFO (XendDomainInfo:1192) Domain has
shutdown: name=hvm-netbsd
id=14 reason=poweroff.
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1779) XendDomainInfo.destroy: domid=14
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1798) XendDomainInfo.destroyDomain(14)
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1444) Removing vif/0 [2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:574) XendDomainInfo.destroyDevice: deviceC
lass = vif, device = vif/0
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1444) Removing vbd/832 [2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:574) XendDomainInfo.destroyDevice: deviceC
lass = vbd, device = vbd/832
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1444) Removing vbd/5632 [2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:574) XendDomainInfo.destroyDevice: deviceC
lass = vbd, device = vbd/5632
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1444) Removing vfb/0 [2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:574) XendDomainInfo.destroyDevice: deviceC
lass = vfb, device = vfb/0
[2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:1444) Removing console/0 [2008-08-24 16:08:05 177] DEBUG (XendDomainInfo:574) XendDomainInfo.destroyDevice: deviceC
lass = console, device = console/0
[2008-08-24 16:08:10 177] DEBUG (XendDomainInfo:84) XendDomainInfo.create(['vm', ['name',
'hvm-netbsd'], ['memory', 256], ['vcpus', 1], ['on_xend_start', 'ignore'], ['on_xend_stop'
, 'ignore'], ['image', ['hvm', ['kernel', '/usr/pkg/lib/xen/boot/hvmloader'], ['device_mod
el', '/usr/pkg/libexec/qemu-dm'], ['pae', 1], ['vcpus', 1], ['boot', 'd'], ['fda', ''], ['
fdb', ''], ['timer_mode', 0], ['localtime', 0], ['serial', 'pty'], ['stdvga', 0], ['isa',
0], ['nographic', 0], ['soundhw', ''], ['vncunused', 1], ['display', ':0.0'], ['xauthority
', '/sys/.Xauthority'], ['rtc_timeoffset', '0'], ['monitor', 0], ['acpi', 1], ['apic', 1],
['usb', 1], ['usbdevice', 'tablet'], ['keymap', '']]], ['device',
['vbd', ['uname', 'phy:
/dev/wd0i'], ['dev', 'ioemu:hdb'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'file:/sy
s/domains/domU3/i386cd.iso'], ['dev', 'ioemu:hdc:cdrom'], ['mode', 'r']]], ['device', ['vi
f', ['bridge', 'bridge0'], ['mac', '00:16:3e:00:00:13'], ['type', 'ioemu']]]]) [2008-08-24 16:08:10 177] DEBUG (XendDomainInfo:1520) XendDomainInfo.constructDomain
[2008-08-24 16:08:10 177] DEBUG (balloon:115) Balloon: 1003332 KiB free; need 2048; done.
[2008-08-24 16:08:10 177] DEBUG (XendDomain:434) Adding Domain: 15 [2008-08-24 16:08:10 177] DEBUG (XendDomainInfo:1580) XendDomainInfo.initDomain: 15 256
[2008-08-24 16:08:10 177] DEBUG (image:337) args: boot, val: d [2008-08-24 16:08:10 177] DEBUG (image:337) args: fda, val: None [2008-08-24 16:08:10 177] DEBUG (image:337) args: fdb, val: None [2008-08-24 16:08:10 177] DEBUG (image:337) args: soundhw, val: None [2008-08-24 16:08:10 177] DEBUG (image:337) args: localtime, val: 0 [2008-08-24 16:08:10 177] DEBUG (image:337) args: serial, val: pty [2008-08-24 16:08:10 177] DEBUG (image:337) args: std-vga, val: 0 [2008-08-24 16:08:10 177] DEBUG (image:337) args: isa, val: 0 [2008-08-24 16:08:10 177] DEBUG (image:337) args: acpi, val: 1 [2008-08-24 16:08:10 177] DEBUG (image:337) args: usb, val: 1 [2008-08-24 16:08:10 177] DEBUG (image:337) args: usbdevice, val: tablet [2008-08-24 16:08:10 177] DEBUG (image:337) args: k, val: None [2008-08-24 16:08:10 177] DEBUG (XendDomainInfo:1614) _initDomain:shadow_memory=0x0, memor
y_static_max=0x10000000, memory_static_min=0x0.
[2008-08-24 16:08:10 177] DEBUG (balloon:115) Balloon: 1002296 KiB free; need 273408; done