Skip to content

Commit 37d2b85

Browse files
authored
kvm: Enable virtio drivers based on guest os display name (#3879)
When we add new guest os, sometimes we missed the records in guest_os_hypervisor. However, the guest disk model (virtio/ide) is determined by record in the table. It causes the issue that some new guest os(eg Debian 8/9) uses e1000 instead of virtio nic, and ide disk instead of virtio disk. To fix the issue permanantly, pass the guest os name in guest_os if the record for kvm is not found in guest_os_hypervisor. Related commit:7ac9f00eeeb4cd37ec39efeba066e799b581b1a0
1 parent 649ed45 commit 37d2b85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/hypervisor/KVMGuru.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public VirtualMachineTO implement(VirtualMachineProfile vm) {
132132
guestOsMapping = _guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), getHypervisorType().toString(), host.getHypervisorVersion());
133133
}
134134
if (guestOsMapping == null || host == null) {
135-
to.setPlatformEmulator("Other");
135+
to.setPlatformEmulator(guestOS.getDisplayName() == null ? "Other" : guestOS.getDisplayName());
136136
} else {
137137
to.setPlatformEmulator(guestOsMapping.getGuestOsName());
138138
}

0 commit comments

Comments
 (0)