Choose SATA as a default bus for bhyve as it doesn't support IDE. Signed-off-by: Roman Bogorodskiy <bogorodskiy@xxxxxxxxx> --- tests/data/cli/compare/virt-install-bhyve-default-f27.xml | 2 +- virtinst/connection.py | 2 ++ virtinst/devices/disk.py | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/data/cli/compare/virt-install-bhyve-default-f27.xml b/tests/data/cli/compare/virt-install-bhyve-default-f27.xml index a0106888..0afe1d58 100644 --- a/tests/data/cli/compare/virt-install-bhyve-default-f27.xml +++ b/tests/data/cli/compare/virt-install-bhyve-default-f27.xml @@ -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"/> diff --git a/virtinst/connection.py b/virtinst/connection.py index 9c561e3d..24df9621 100644 --- a/virtinst/connection.py +++ b/virtinst/connection.py @@ -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") ######################### diff --git a/virtinst/devices/disk.py b/virtinst/devices/disk.py index 4d63b283..a8971581 100644 --- a/virtinst/devices/disk.py +++ b/virtinst/devices/disk.py @@ -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): -- 2.30.0