Fix reboot and reconfigure of HVM guests when they are configured with an

empty CD-ROM drive.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-08-30 02:53:48 +01:00
1 parent aab843f487
commit 01fa1a0693
2 files changed
+13 -5

No files matched your search

+1 -1
View File
@@ -305,7 +305,7 @@ class HVMImageHandler(ImageHandler):
for (name, info) in deviceConfig:
if name == 'vbd':
uname = sxp.child_value(info, 'uname')
if 'file:' in uname:
if uname is not None and 'file:' in uname:
(_, vbdparam) = string.split(uname, ':', 1)
if not os.path.isfile(vbdparam):
raise VmError('Disk image does not exist: %s' %
+12 -4
View File
@@ -52,10 +52,18 @@ class BlkifController(DevController):
except ValueError:
dev_type = "disk"
try:
(typ, params) = string.split(uname, ':', 1)
except ValueError:
(typ, params) = ("", "")
if uname is None:
if dev_type == 'cdrom':
(typ, params) = ("", "")
else:
raise VmError(
'Block device must have physical details specified')
else:
try:
(typ, params) = string.split(uname, ':', 1)
except ValueError:
(typ, params) = ("", "")
back = { 'dev' : dev,
'type' : typ,
'params' : params,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.