Commit 5e6d16ab authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Thomas Thrainer
Browse files

KVM: reserve a PCI slot for the SCSI controller



Currently instances with disk_type=scsi are broken, because the SCSI
controller uses a PCI slot not accounted for in the PCI assignment
logic. We reserve a throw-away slot just for that.

This is a temporary workaround and will be reverted during the upcoming
refactoring.
Signed-off-by: default avatarApollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
parent a4bbd52a
...@@ -1377,6 +1377,10 @@ class KVMHypervisor(hv_base.BaseHypervisor): ...@@ -1377,6 +1377,10 @@ class KVMHypervisor(hv_base.BaseHypervisor):
_ = _GetFreeSlot(pci_reservations, reserve=True) _ = _GetFreeSlot(pci_reservations, reserve=True)
kvm_cmd.extend(["-soundhw", soundhw]) kvm_cmd.extend(["-soundhw", soundhw])
if hvp[constants.HV_DISK_TYPE] == constants.HT_DISK_SCSI:
# The SCSI controller requires another PCI slot.
_ = _GetFreeSlot(pci_reservations, reserve=True)
# Add id to ballon and place to the first available slot (3 or 4) # Add id to ballon and place to the first available slot (3 or 4)
addr = _GetFreeSlot(pci_reservations, reserve=True) addr = _GetFreeSlot(pci_reservations, reserve=True)
pci_info = ",bus=pci.0,addr=%s" % hex(addr) pci_info = ",bus=pci.0,addr=%s" % hex(addr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment