aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-15 09:19:26 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-15 09:19:26 +0100
commitdae75267fdddb37833f994902949c25d9581ea43 (patch)
tree7154ede91c93e6cb947065ef5884d08b4bde89f8
parentb2e0105ec94258ba525034d4e30d5e6a8bf390c0 (diff)
downloadxen-dae75267fdddb37833f994902949c25d9581ea43.tar.gz
xen-dae75267fdddb37833f994902949c25d9581ea43.tar.bz2
xen-dae75267fdddb37833f994902949c25d9581ea43.zip
[XEND] Check for and fail on non-existent floppy-drive file when starting HVM guest.
The qemu device model hangs when a non-existent floppy file is passed via 'fda' or 'fdb'. The attached patch checks whether the floppy file exists and raises an error if it does not. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
-rw-r--r--tools/python/xen/xend/image.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py
index 28a8952eec..fe416e2ba5 100644
--- a/tools/python/xen/xend/image.py
+++ b/tools/python/xen/xend/image.py
@@ -312,6 +312,11 @@ class HVMImageHandler(ImageHandler):
if v:
ret.append("-%s" % a)
ret.append("%s" % v)
+
+ if a in ['fda', 'fdb' ]:
+ if v:
+ if not os.path.isfile(v):
+ raise VmError("Floppy file %s does not exist." % v)
log.debug("args: %s, val: %s" % (a,v))
# Handle disk/network related options