When we use qcow in hvm config file, like
disk=['tap:qcow:/img/qcow.img,hda,w',',hdc:cdrom,r'],
HVM guest restore would fail.
The patch fixes the issue by ignoring the null cdrom string.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
if o_dev_type == 'vbd' or o_dev_type == 'tap':
blkdev_file = blkdev_uname_to_file(dev_uname)
o_dev_uname = sxp.child_value(o_dev_info, 'uname')
+
+ # Ignore a null cdrom definition string
+ if o_dev_uname is None:
+ continue
+
o_blkdev_file = blkdev_uname_to_file(o_dev_uname)
if blkdev_file == o_blkdev_file:
raise XendConfigError('The file "%s" is already used' %