BIOS boots from first disk. If we enable hotplug in disk/0
it will added at the end of PCI address space (slot 31). If
another disk gets added then it will be added just before and
BIOS will try to boot from an non bootable device and the
instance will hung.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
if lu.hotplug_info is not None:
idx = getattr(lu.hotplug_info, dev_type)
setattr(lu.hotplug_info, dev_type, idx+1)
+ if dev_type == 'disks' and idx == 0:
+ lu.LogInfo("Disk 0 cannot be hotpluggable.")
+ return None, None
pci = lu.hotplug_info.pci_pool.pop()
lu.LogInfo("Choosing pci slot %d" % pci)
return idx, pci