* exception looking up device number f,or hda
@ 2005-08-05 19:34 Arun Sharma
2005-08-05 20:33 ` Anthony Liguori
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Arun Sharma @ 2005-08-05 19:34 UTC (permalink / raw)
To: Mike Wray; +Cc: xen-devel
Hi Mike,
I have the following line in my config file:
disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ]
and my host doesn't have a /dev/hda (it has a SATA disk which shows up
as /dev/sda).
But I would like the guest to see a /dev/hda. Sounds reasonable?
Now, when I try to create this domain, I get:
[2005-08-05 14:40:53 xend] DEBUG (blkif:24) exception looking up device
number for hda: [Errno 2] No such file or directory: '/dev/hda'
2005-08-05 14:40:53 xend] DEBUG (blkif:449) Destroying blkif domain=1
[2005-08-05 14:40:53 xend] DEBUG (blkif:337) Destroying vbd domain=1 id=0
The code in util/blkif.py that tries to convert name to device number
doesn't seem to be new, but I don't know why it started showing up suddenly.
I worked around by manually creating /dev/hda, but I don't think it's
reasonable to expect that host's /dev contains entries for all guest
devices.
Also, the effect of having a bad "disk=" line in xmdefconfig (such as
pointing to a non-existent file) results in a xend crash. We probably
need to add a few checks at the python level so that the user sees a
more useful stack trace.
-Arun
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: exception looking up device number f,or hda 2005-08-05 19:34 exception looking up device number f,or hda Arun Sharma @ 2005-08-05 20:33 ` Anthony Liguori 2005-08-05 21:20 ` Arun Sharma 2005-08-08 2:21 ` takebe_akio 2005-08-08 8:08 ` exception looking up device number f,or hda Mike Wray 2 siblings, 1 reply; 14+ messages in thread From: Anthony Liguori @ 2005-08-05 20:33 UTC (permalink / raw) To: Arun Sharma; +Cc: Mike Wray, xen-devel Hi Arun, I just pulled the latest unstable and could not reproduce. I have an identical scenario (no /dev/hda only /dev/sda due to SATA). Also, if the devno resolution code fails you should also get a vbd: Device not found exception in the logs. The exception you are seeing is not actually a problem, it just means that stat has failed. We should probably cleanup that error message. Can you post a more complete log file? I think the error is being caused somewhere else. Thanks, Anthony Liguori Arun Sharma wrote: > Hi Mike, > > I have the following line in my config file: > > disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] > > and my host doesn't have a /dev/hda (it has a SATA disk which shows up > as /dev/sda). > > But I would like the guest to see a /dev/hda. Sounds reasonable? > > Now, when I try to create this domain, I get: > > [2005-08-05 14:40:53 xend] DEBUG (blkif:24) exception looking up > device number for hda: [Errno 2] No such file or directory: '/dev/hda' > 2005-08-05 14:40:53 xend] DEBUG (blkif:449) Destroying blkif domain=1 > [2005-08-05 14:40:53 xend] DEBUG (blkif:337) Destroying vbd domain=1 id=0 > > The code in util/blkif.py that tries to convert name to device number > doesn't seem to be new, but I don't know why it started showing up > suddenly. > > I worked around by manually creating /dev/hda, but I don't think it's > reasonable to expect that host's /dev contains entries for all guest > devices. > > Also, the effect of having a bad "disk=" line in xmdefconfig (such as > pointing to a non-existent file) results in a xend crash. We probably > need to add a few checks at the python level so that the user sees a > more useful stack trace. > > -Arun > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number f,or hda 2005-08-05 20:33 ` Anthony Liguori @ 2005-08-05 21:20 ` Arun Sharma 0 siblings, 0 replies; 14+ messages in thread From: Arun Sharma @ 2005-08-05 21:20 UTC (permalink / raw) To: Anthony Liguori; +Cc: Mike Wray, xen-devel Anthony Liguori wrote: > Hi Arun, > > I just pulled the latest unstable and could not reproduce. I have an > identical scenario (no /dev/hda only /dev/sda due to SATA). > > Also, if the devno resolution code fails you should also get a vbd: > Device not found exception in the logs. The exception you are seeing is > not actually a problem, it just means that stat has failed. > > We should probably cleanup that error message. > > Can you post a more complete log file? I think the error is being > caused somewhere else. > Hi Anthony, You're probably not able to reproduce the problem because you're not using VMX domains? We're overloading the semantics of disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] to create a IDE hard drive for a VMX domain. So we want to take advantage of the config file parsing code from the VBD code path, but we don't want to do other tasks such as connecting the backend/frontend etc. The log from a successful VMX domain startup looks like: [2005-08-05 14:54:41 xend] INFO (XendRoot:126) EVENT> xend.domain.create ['fc3', 2] [2005-08-05 14:54:42 xend] ERROR (process:37) [block-file] ioctl: LOOP_SET_FD: Device or resource busy [2005-08-05 14:54:42 xend] DEBUG (blkif:81) Connecting blkif <BlkifBackend frontend=2 backend=0 id=0> [2005-08-05 14:54:42 xend] DEBUG (blkif:89) send_be_create <BlkifBackend frontend=2 backend=0 id=0> [2005-08-05 14:54:42 xend] DEBUG (image:293) args: cdrom, val: None [2005-08-05 14:54:42 xend] DEBUG (image:293) args: boot, val: c [2005-08-05 14:54:42 xend] DEBUG (image:293) args: fda, val: None [2005-08-05 14:54:42 xend] DEBUG (image:293) args: fdb, val: None [2005-08-05 14:54:42 xend] DEBUG (image:293) args: localtime, val: None [2005-08-05 14:54:42 xend] DEBUG (image:293) args: serial, val: None [2005-08-05 14:54:42 xend] DEBUG (image:293) args: std-vga, val: None [2005-08-05 14:54:42 xend] DEBUG (image:293) args: isa, val: None [2005-08-05 14:54:42 xend] INFO (image:352) spawning device models: /usr/lib/xen/bin/qemu-dm ['/usr/lib/xen/bin/qemu-dm', ' -vncconnect', '143.183.130.223:5502', '-d', '2', '-p', '19', '-m', '128', '-boot', 'c', '-hda', '/var/images/min-el3-i386.i mg', '-vnc', '-k', 'en-us', '-vncport', '5902'] i.e. we were doing things which we really shouldn't be doing, but it didn't hurt. But it started hurting today :) In the future, we're also planning to have a VBD driver for unmodified OSes running on VMX domains and I was thinking of a syntax such as: disk = [ 'file:/var/images/min-el3-i386.img,vhda,w' ] Any comments/suggestions on the syntax above to present emulated real devices as well as virtual devices to an unmodified OS? -Arun Complete log for the failed case: [2005-08-05 14:40:33 xend] INFO (SrvDaemon:300) Xend Daemon started [2005-08-05 14:40:33 xend] INFO (channel:148) Virq 3 on port 13 [2005-08-05 14:40:33 xend] DEBUG (XendDomainInfo:171) info={'vcpu_to_cpu': [0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'cpu_time': 20984020436L, 'ssidref': 0, 's hutdown_reason': 0, 'dying': 0, 'dom': 0, 'running': 1, 'maxmem_kb': -4, 'paused': 0, 'crashed': 0, 'vcpus': 1, 'shutdown': 0, 'mem_kb': 250880, 'cpumap': [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'blocked': 0} [2005-08-05 14:40:33 xend] DEBUG (XendDomainInfo:172) config='None' [2005-08-05 14:40:33 xend] INFO (SrvServer:63) unix path=/var/lib/xend/xend-socket [2005-08-05 14:40:33 xend] INFO (XendRoot:126) EVENT> xend.start 0 [2005-08-05 14:40:33 xend] INFO (process:35) [network] network start bridge=xen-br0 netdev=eth0 antispoof=no [2005-08-05 14:40:53 xend] DEBUG (image:135) initDomain: cpu=-1 mem_kb=131204 ssidref=-1 dom=1 [2005-08-05 14:40:53 xend] DEBUG (XendDomainInfo:673) init_domain> Created domain=1 name=ExampleVMXDomain memory=128 [2005-08-05 14:40:53 xend] INFO (XendRoot:126) EVENT> xend.domain.create ['ExampleVMXDomain', 1] [2005-08-05 14:40:53 xend] INFO (image:190) buildDomain os=vmx dom=1 vcpus=1 [2005-08-05 14:40:53 xend] INFO (image:259) VMX device model port: 3 [2005-08-05 14:40:53 xend] WARNING (XendDomainInfo:924) Unknown config field memmap [2005-08-05 14:40:53 xend] WARNING (XendDomainInfo:924) Unknown config field device_model [2005-08-05 14:40:53 xend] WARNING (XendDomainInfo:924) Unknown config field boot [2005-08-05 14:40:53 xend] WARNING (XendDomainInfo:924) Unknown config field vnc [2005-08-05 14:40:53 xend] WARNING (XendDomainInfo:924) Unknown config field display [2005-08-05 14:40:53 xend] DEBUG (blkif:24) exception looking up device number for hda: [Errno 2] No such file or directory : '/dev/hda' [2005-08-05 14:40:53 xend] DEBUG (blkif:449) Destroying blkif domain=1 [2005-08-05 14:40:53 xend] DEBUG (blkif:337) Destroying vbd domain=1 id=0 >>>> xend dies here <<< [2005-08-05 14:43:32 xend] INFO (SrvDaemon:300) Xend Daemon started ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number f,or hda 2005-08-05 19:34 exception looking up device number f,or hda Arun Sharma 2005-08-05 20:33 ` Anthony Liguori @ 2005-08-08 2:21 ` takebe_akio 2005-08-08 5:38 ` exception looking up device number for hda Arun Sharma 2005-08-08 8:08 ` exception looking up device number f,or hda Mike Wray 2 siblings, 1 reply; 14+ messages in thread From: takebe_akio @ 2005-08-08 2:21 UTC (permalink / raw) To: Arun Sharma, Mike Wray; +Cc: xen-devel Hi Arun >disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] Please test the following settings. disk = [ 'file:/var/images/min-el3-i386.img,hda1,w' ] And, it is necessary to rewrite /etc/fstab of domU. Thank, Akio ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-08 2:21 ` takebe_akio @ 2005-08-08 5:38 ` Arun Sharma 2005-08-08 14:48 ` Mark Williamson 0 siblings, 1 reply; 14+ messages in thread From: Arun Sharma @ 2005-08-08 5:38 UTC (permalink / raw) To: takebe_akio; +Cc: Mike Wray, xen-devel takebe_akio@jp.fujitsu.com wrote: > Hi Arun > > >>disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] > > Please test the following settings. > disk = [ 'file:/var/images/min-el3-i386.img,hda1,w' ] > > And, it is necessary to rewrite /etc/fstab of domU. > I'm not looking for configuration help for domU. I was looking for suggestions as to how: a) IDE hard drives for VMX domains should be configured b) VBD based devices for VMX domains should be configured and the bad failure mode for (a) when the user misconfigures it. -Arun ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-08 5:38 ` exception looking up device number for hda Arun Sharma @ 2005-08-08 14:48 ` Mark Williamson 2005-08-09 0:06 ` Arun Sharma 0 siblings, 1 reply; 14+ messages in thread From: Mark Williamson @ 2005-08-08 14:48 UTC (permalink / raw) To: xen-devel; +Cc: Arun Sharma, Mike Wray, takebe_akio > I was looking for suggestions as to how: > > a) IDE hard drives for VMX domains should be configured > b) VBD based devices for VMX domains should be configured Ah, I guess we have to distinguish the two... Hope about an optional: vbd:/emu: prefix (or similar) on the second part of the triplet for a disk? The default (for non VMX domains) could be "vbd" so existing behaviour would remain the same. If / when we move over to using "xvd" for VBDs I guess that could subsume this functionality (might still need it for non Linux guests, tho). Thoughts? Cheers, Mark > and the bad failure mode for (a) when the user misconfigures it. > > -Arun > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-08 14:48 ` Mark Williamson @ 2005-08-09 0:06 ` Arun Sharma 2005-08-09 1:25 ` David Hopwood ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Arun Sharma @ 2005-08-09 0:06 UTC (permalink / raw) To: Mark Williamson; +Cc: Mike Wray, xen-devel, takebe_akio Mark Williamson wrote: >>I was looking for suggestions as to how: >> >>a) IDE hard drives for VMX domains should be configured >>b) VBD based devices for VMX domains should be configured > > > Ah, I guess we have to distinguish the two... > > Hope about an optional: vbd:/emu: prefix (or similar) on the second part of > the triplet for a disk? The default (for non VMX domains) could be "vbd" so > existing behaviour would remain the same. Sounds good to me. How about: hda = VBD hda vbd://hda = VBD hda ioemu://hda = IDE hda The VBD patches are not ready yet - so I'd like to propose that we do: - self.create_configured_devices() + if self.image.ostype != 'vmx': + self.create_configured_devices() and - self.create_blkif() + if self.image.ostype != 'vmx': + self.create_blkif() When our VBD patches are ready, we'll revert this. -Arun ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-09 0:06 ` Arun Sharma @ 2005-08-09 1:25 ` David Hopwood 2005-08-09 1:49 ` Mark Williamson [not found] ` <mailman.1123552364.22306@unix-os.sc.intel.com> 2 siblings, 0 replies; 14+ messages in thread From: David Hopwood @ 2005-08-09 1:25 UTC (permalink / raw) To: xen-devel Arun Sharma wrote: > Sounds good to me. How about: > > hda = VBD hda > vbd://hda = VBD hda > ioemu://hda = IDE hda In URIs the // syntax indicates a global naming authority such as DNS (see RFC 2396 section 3.2). Here the scheme-specific-part is in a local namespace, so it should be just "vbd:hda", for example. -- David Hopwood <david.nospam.hopwood@blueyonder.co.uk> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-09 0:06 ` Arun Sharma 2005-08-09 1:25 ` David Hopwood @ 2005-08-09 1:49 ` Mark Williamson 2005-08-09 2:58 ` Xiaofeng Ling [not found] ` <mailman.1123552364.22306@unix-os.sc.intel.com> 2 siblings, 1 reply; 14+ messages in thread From: Mark Williamson @ 2005-08-09 1:49 UTC (permalink / raw) To: Arun Sharma; +Cc: Mike Wray, xen-devel, takebe_akio > > Hope about an optional: vbd:/emu: prefix (or similar) on the second part > > of the triplet for a disk? The default (for non VMX domains) could be > > "vbd" so existing behaviour would remain the same. > > Sounds good to me. How about: > > hda = VBD hda > vbd://hda = VBD hda > ioemu://hda = IDE hda Sounds fine but I think I'd actually ditch the // to fit in with the phy: and file: syntax we already have. (and as David said in another post, to avoid looking like a URL). > The VBD patches are not ready yet - so I'd like to propose that we do: > > - self.create_configured_devices() > + if self.image.ostype != 'vmx': > + self.create_configured_devices() > > and > > - self.create_blkif() > + if self.image.ostype != 'vmx': > + self.create_blkif() > > When our VBD patches are ready, we'll revert this. Is there still a need for these changes if the ioemu: prefix is implemented? Cheers, Mark ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-09 1:49 ` Mark Williamson @ 2005-08-09 2:58 ` Xiaofeng Ling 2005-08-09 18:19 ` Arun Sharma 0 siblings, 1 reply; 14+ messages in thread From: Xiaofeng Ling @ 2005-08-09 2:58 UTC (permalink / raw) To: Mark Williamson; +Cc: Arun Sharma, Mike Wray, xen-devel, takebe_akio [-- Attachment #1: Type: text/plain, Size: 797 bytes --] I've already made a patch when I doing para-driver debugging. see the attach patch. Does it fit the requirement? It will skip setupping up the loop device for ioemu image files, but by xm vbd-list, it can still see the file bind to hda. so this command is still useful. Mark Williamson wrote: >>>Hope about an optional: vbd:/emu: prefix (or similar) on the second part >>>of the triplet for a disk? The default (for non VMX domains) could be >>>"vbd" so existing behaviour would remain the same. >> >>Sounds good to me. How about: >> >>hda = VBD hda >>vbd://hda = VBD hda >>ioemu://hda = IDE hda > > > Sounds fine but I think I'd actually ditch the // to fit in with the phy: and > file: syntax we already have. (and as David said in another post, to avoid > looking like a URL). > > [-- Attachment #2: dm-config.patch --] [-- Type: text/x-patch, Size: 2381 bytes --] diff -r 48aed1403fe3 tools/examples/xmexample.vmx --- a/tools/examples/xmexample.vmx Fri Jul 22 16:44:33 2005 +++ b/tools/examples/xmexample.vmx Tue Aug 9 10:54:01 2005 @@ -46,7 +46,7 @@ # and MODE is r for read-only, w for read-write. #disk = [ 'phy:hda1,hda1,r' ] -disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] +disk = [ 'ioemu:/var/images/min-el3-i386.img,hda,w' ] #---------------------------------------------------------------------------- # Set the kernel command line for the new domain. diff -r 48aed1403fe3 tools/python/xen/xend/Blkctl.py --- a/tools/python/xen/xend/Blkctl.py Fri Jul 22 16:44:33 2005 +++ b/tools/python/xen/xend/Blkctl.py Tue Aug 9 10:54:01 2005 @@ -30,7 +30,7 @@ # Special case phy devices - they don't require any (un)binding # Parallax also doesn't need script-based binding. - if (type == 'phy') or (type == 'parallax'): + if (type == 'phy') or (type == 'parallax') or (type == 'ioemu'): return dets if script is None: diff -r 48aed1403fe3 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Fri Jul 22 16:44:33 2005 +++ b/tools/python/xen/xend/image.py Tue Aug 9 10:54:01 2005 @@ -287,12 +287,14 @@ device = sxp.child(self.vm.config, 'device') vbdinfo = sxp.child(device, 'vbd') if not vbdinfo: - raise VmError("vmx: missing vbd configuration") + continue uname = sxp.child_value(vbdinfo, 'uname') vbddev = sxp.child_value(vbdinfo, 'dev') (vbdtype, vbdparam) = string.split(uname, ':', 1) vbddev_list = ['hda', 'hdb', 'hdc', 'hdd'] - if vbdtype != 'file' or vbddev not in vbddev_list: + if vbdtype != 'ioemu': + continue + if vbddev not in vbddev_list: raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd") ret.append("-%s" % vbddev) ret.append("%s" % vbdparam) diff -r 48aed1403fe3 tools/python/xen/xend/server/blkif.py --- a/tools/python/xen/xend/server/blkif.py Fri Jul 22 16:44:33 2005 +++ b/tools/python/xen/xend/server/blkif.py Tue Aug 9 10:54:01 2005 @@ -243,6 +243,8 @@ pass else: node = Blkctl.block('bind', self.type, self.params) + if self.type == 'ioemu': + return self.setNode(node) self.attachBackend() if change: [-- Attachment #3: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-09 2:58 ` Xiaofeng Ling @ 2005-08-09 18:19 ` Arun Sharma 0 siblings, 0 replies; 14+ messages in thread From: Arun Sharma @ 2005-08-09 18:19 UTC (permalink / raw) To: Xiaofeng Ling; +Cc: takebe_akio, Mike Wray, xen-devel, Mark Williamson Xiaofeng Ling wrote: > I've already made a patch when I doing para-driver debugging. > see the attach patch. > Does it fit the requirement? > It will skip setupping up the loop device for ioemu image files, > but by xm vbd-list, it can still see the file bind to hda. > so this command is still useful. > -disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] > +disk = [ 'ioemu:/var/images/min-el3-i386.img,hda,w' ] The ioemu: prefix should be on the second element i.e: +disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w' ] and it should allow: +disk = [ 'phy:hdb,ioemu:hda,w' ] -Arun ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <mailman.1123552364.22306@unix-os.sc.intel.com>]
* Re: exception looking up device number for hda [not found] ` <mailman.1123552364.22306@unix-os.sc.intel.com> @ 2005-08-09 19:06 ` Arun Sharma 2005-08-09 19:18 ` Mark Williamson 0 siblings, 1 reply; 14+ messages in thread From: Arun Sharma @ 2005-08-09 19:06 UTC (permalink / raw) To: Mark Williamson; +Cc: xen-devel Mark Williamson wrote: > >>The VBD patches are not ready yet - so I'd like to propose that we do: >> >>- self.create_configured_devices() >>+ if self.image.ostype != 'vmx': >>+ self.create_configured_devices() >> >>and >> >>- self.create_blkif() >>+ if self.image.ostype != 'vmx': >>+ self.create_blkif() >> >>When our VBD patches are ready, we'll revert this. > > > Is there still a need for these changes if the ioemu: prefix is implemented? We'll implement the ioemu prefix ASAP - just trying to make sure that 3.0-testing ships with working VMX support :) -Arun ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number for hda 2005-08-09 19:06 ` Arun Sharma @ 2005-08-09 19:18 ` Mark Williamson 0 siblings, 0 replies; 14+ messages in thread From: Mark Williamson @ 2005-08-09 19:18 UTC (permalink / raw) To: Arun Sharma; +Cc: xen-devel > > Is there still a need for these changes if the ioemu: prefix is > > implemented? > > We'll implement the ioemu prefix ASAP - just trying to make sure that > 3.0-testing ships with working VMX support :) Sure thing :-) I wouldn't have thought the ioemu: prefix should be too hard to implement. If it looks like taking a while you could try submitting a patch with your workaround before the -testing release. Cheers, Mark ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: exception looking up device number f,or hda 2005-08-05 19:34 exception looking up device number f,or hda Arun Sharma 2005-08-05 20:33 ` Anthony Liguori 2005-08-08 2:21 ` takebe_akio @ 2005-08-08 8:08 ` Mike Wray 2 siblings, 0 replies; 14+ messages in thread From: Mike Wray @ 2005-08-08 8:08 UTC (permalink / raw) To: Arun Sharma; +Cc: xen-devel Arun Sharma wrote: > Hi Mike, > > I have the following line in my config file: > > disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ] > > and my host doesn't have a /dev/hda (it has a SATA disk which shows up > as /dev/sda). > > But I would like the guest to see a /dev/hda. Sounds reasonable? > > Now, when I try to create this domain, I get: > > [2005-08-05 14:40:53 xend] DEBUG (blkif:24) exception looking up device > number for hda: [Errno 2] No such file or directory: '/dev/hda' > 2005-08-05 14:40:53 xend] DEBUG (blkif:449) Destroying blkif domain=1 > [2005-08-05 14:40:53 xend] DEBUG (blkif:337) Destroying vbd domain=1 id=0 > > The code in util/blkif.py that tries to convert name to device number > doesn't seem to be new, but I don't know why it started showing up > suddenly. > > I worked around by manually creating /dev/hda, but I don't think it's > reasonable to expect that host's /dev contains entries for all guest > devices. No, and the blkdev_name_to_number() function should convert names like /dev/hda without the device existing. This code should be trapping the error: try: return os.stat(n).st_rdev except Exception, ex: log.debug("exception looking up device number for %s: %s", name, ex) pass The code then uses regexps to analyse the device name (though you will see the debug message in the log). What xen version are you using? > > Also, the effect of having a bad "disk=" line in xmdefconfig (such as > pointing to a non-existent file) results in a xend crash. We probably > need to add a few checks at the python level so that the user sees a > more useful stack trace. All errors during domain construction are intended to be trapped and returned to the caller - so maybe something got broken. Did you see anything in the xend log? Might be worth causing the error using xend with tracing on (xend trace_start) and having a look at the trace (/var/log/xend.trace). Mike ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-08-09 19:18 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 19:34 exception looking up device number f,or hda Arun Sharma
2005-08-05 20:33 ` Anthony Liguori
2005-08-05 21:20 ` Arun Sharma
2005-08-08 2:21 ` takebe_akio
2005-08-08 5:38 ` exception looking up device number for hda Arun Sharma
2005-08-08 14:48 ` Mark Williamson
2005-08-09 0:06 ` Arun Sharma
2005-08-09 1:25 ` David Hopwood
2005-08-09 1:49 ` Mark Williamson
2005-08-09 2:58 ` Xiaofeng Ling
2005-08-09 18:19 ` Arun Sharma
[not found] ` <mailman.1123552364.22306@unix-os.sc.intel.com>
2005-08-09 19:06 ` Arun Sharma
2005-08-09 19:18 ` Mark Williamson
2005-08-08 8:08 ` exception looking up device number f,or hda Mike Wray
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.