mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
[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>
This commit is contained in:
1 parent
b2e0105ec9
commit
dae75267fd
1 file changed
+5
@@ -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
|
||||
|
||||