check for cdrom file on device reconfigure
A message that is not in the archive (sent off-list or not yet received): 372543940.373181288078681968.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com
PATCH 1/1 check for cdrom file on device reconfigure
When guest is started with non-existing file specified as cdrom device, error is reported. However, when we try to use block-configure to change cdrom to non-existing file, command is executed successfully although qemu can't open this file.
Following patch checks if we can read specified file and raise error when this is not possible.
--
tools/python/xen/xend/server/blkif.py +5 -0
@@ -130,6 +130,11 @@ if (dev_type == 'cdrom' and new_front['device-type'] == 'cdrom' and dev == new_back['dev'] and mode == 'r'): + + # check if can't access device file + if not os.access(new_back['params'],os.R_OK): + raise VmError("Can't open file %s" % new_back['params']) + # dummy device self.writeBackend(devid, 'type', new_back['type'],
Signature · 2 lines
Miroslav Rezanina Software Engineer - Virtualization Team - XEN kernel
Miroslav Rezanina writes ("[Xen-devel] [PATCH] check for cdrom file on device reconfigure"):
Quoted 4 lines
When guest is started with non-existing file specified as cdrom device, error is reported. However, when we try to use block-configure to change cdrom to non-existing file, command is executed successfully although qemu can't open this file.
I'm not convinced that this is the right approach. Surely what should happen is that errors that qemu experiences trying to open the cdrom should be propagated through xenstore and back through the toolstack to the user.
Ian.