diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-15 09:19:26 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-15 09:19:26 +0100 |
commit | dae75267fdddb37833f994902949c25d9581ea43 (patch) | |
tree | 7154ede91c93e6cb947065ef5884d08b4bde89f8 | |
parent | b2e0105ec94258ba525034d4e30d5e6a8bf390c0 (diff) | |
download | xen-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.py | 5 |
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 |