From 389f49265f60a84739ec122d87a702a7fc613f9a Mon Sep 17 00:00:00 2001 From: Edison Su Date: Thu, 23 Feb 2012 11:40:22 -0800 Subject: [PATCH] bug 13958: enable virtio for all the centos/fedora/ubuntu guests. status 13958: resolved fixed. Reviewed-by: frank --- .../resource/computing/KVMGuestOsMapper.java | 18 ++++++++++-------- .../computing/LibvirtComputingResource.java | 8 ++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/agent/src/com/cloud/agent/resource/computing/KVMGuestOsMapper.java b/agent/src/com/cloud/agent/resource/computing/KVMGuestOsMapper.java index b03ab934b2b..4132d145be2 100644 --- a/agent/src/com/cloud/agent/resource/computing/KVMGuestOsMapper.java +++ b/agent/src/com/cloud/agent/resource/computing/KVMGuestOsMapper.java @@ -95,20 +95,22 @@ public class KVMGuestOsMapper { s_mapper.put("Fedora 8", "Fedora 8"); s_mapper.put("Ubuntu 10.04 (32-bit)", "Ubuntu 10.04"); s_mapper.put("Ubuntu 10.04 (64-bit)", "Ubuntu 10.04"); + s_mapper.put("Ubuntu 10.10 (32-bit)", "Ubuntu 10.10"); + s_mapper.put("Ubuntu 10.10 (64-bit)", "Ubuntu 10.10"); s_mapper.put("Ubuntu 9.10 (32-bit)", "Ubuntu 9.10"); s_mapper.put("Ubuntu 9.10 (64-bit)", "Ubuntu 9.10"); s_mapper.put("Ubuntu 9.04 (32-bit)", "Ubuntu 9.04"); s_mapper.put("Ubuntu 9.04 (64-bit)", "Ubuntu 9.04"); s_mapper.put("Ubuntu 8.10 (32-bit)", "Ubuntu 8.10"); s_mapper.put("Ubuntu 8.10 (64-bit)", "Ubuntu 8.10"); - s_mapper.put("Ubuntu 8.04 (32-bit)", "Ubuntu 8.04"); - s_mapper.put("Ubuntu 8.04 (64-bit)", "Ubuntu 8.04"); - s_mapper.put("Debian GNU/Linux 5.0 (32-bit)", "Debian GNU/Linux 5"); - s_mapper.put("Debian GNU/Linux 5.0 (64-bit)", "Debian GNU/Linux 5"); - s_mapper.put("Debian GNU/Linux 4.0 (32-bit)", "Debian GNU/Linux 4"); - s_mapper.put("Debian GNU/Linux 4.0 (64-bit)", "Debian GNU/Linux 4"); - s_mapper.put("Debian GNU/Linux 6.0 (64-bit)", "Debian GNU/Linux 6"); - s_mapper.put("Debian GNU/Linux 6.0 (32-bit)", "Debian GNU/Linux 6"); + s_mapper.put("Ubuntu 8.04 (32-bit)", "Other Linux"); + s_mapper.put("Ubuntu 8.04 (64-bit)", "Other Linux"); + s_mapper.put("Debian GNU/Linux 5(32-bit)", "Debian GNU/Linux 5"); + s_mapper.put("Debian GNU/Linux 5(64-bit)", "Debian GNU/Linux 5"); + s_mapper.put("Debian GNU/Linux 4(32-bit)", "Debian GNU/Linux 4"); + s_mapper.put("Debian GNU/Linux 4(64-bit)", "Debian GNU/Linux 4"); + s_mapper.put("Debian GNU/Linux 6(64-bit)", "Debian GNU/Linux 6"); + s_mapper.put("Debian GNU/Linux 6(32-bit)", "Debian GNU/Linux 6"); s_mapper.put("Other 2.6x Linux (32-bit)", "Other 2.6x Linux"); s_mapper.put("Other 2.6x Linux (64-bit)", "Other 2.6x Linux"); s_mapper.put("Other Linux (32-bit)", "Other Linux"); diff --git a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java index a43df2f3d37..3c31eebd415 100755 --- a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java +++ b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java @@ -3614,9 +3614,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements return false; } String guestOSName = KVMGuestOsMapper.getGuestOsName(guestOS); - if (guestOSName.startsWith("Ubuntu 10.04") - || guestOSName.startsWith("Ubuntu 9") - || guestOSName.startsWith("Ubuntu 8.10") + if (guestOS.startsWith("Ubuntu") || guestOSName.startsWith("Fedora 13") || guestOSName.startsWith("Fedora 12") || guestOSName.startsWith("Fedora 11") @@ -3625,11 +3623,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements || guestOSName.startsWith("CentOS 5.3") || guestOSName.startsWith("CentOS 5.4") || guestOSName.startsWith("CentOS 5.5") + || guestOS.startsWith("CentOS") + || guestOS.startsWith("Fedora") || guestOSName.startsWith("Red Hat Enterprise Linux 5.3") || guestOSName.startsWith("Red Hat Enterprise Linux 5.4") || guestOSName.startsWith("Red Hat Enterprise Linux 5.5") || guestOSName.startsWith("Red Hat Enterprise Linux 6") - || guestOSName.startsWith("Debian GNU/Linux") + || guestOS.startsWith("Debian GNU/Linux") || guestOSName.startsWith("Other PV")) { return true; } else {