virtinst: prefer SATA bus for bhyve
Choose SATA as a default bus for bhyve as it doesn't support IDE. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
This commit is contained in:
parent
2d254f2815
commit
dab099d413
|
@ -18,7 +18,7 @@
|
|||
<emulator>bhyve</emulator>
|
||||
<disk type="file" device="disk">
|
||||
<source file="/var/lib/libvirt/images/foobhyve.img"/>
|
||||
<target dev="hda" bus="ide"/>
|
||||
<target dev="sda" bus="sata"/>
|
||||
</disk>
|
||||
<interface type="bridge">
|
||||
<source bridge="testsuitebr0"/>
|
||||
|
|
|
@ -408,6 +408,8 @@ class VirtinstConnection(object):
|
|||
def is_vz(self):
|
||||
return (self._uriobj.scheme.startswith("vz") or
|
||||
self._uriobj.scheme.startswith("parallels"))
|
||||
def is_bhyve(self):
|
||||
return self._uriobj.scheme.startswith("bhyve")
|
||||
|
||||
|
||||
#########################
|
||||
|
|
|
@ -972,6 +972,9 @@ class DeviceDisk(Device):
|
|||
return "sd"
|
||||
if guest.os.is_q35():
|
||||
return "sata"
|
||||
if self.conn.is_bhyve():
|
||||
# IDE bus is not supported by bhyve
|
||||
return "sata"
|
||||
return "ide"
|
||||
|
||||
def set_defaults(self, guest):
|
||||
|
|
Loading…
Reference in New Issue