Skip to content

Commit c8d6e50

Browse files
VMware: add support for 8.0b (8.0.0.2), 8.0c (8.0.0.3) (#7380)
* VMware: add support for 8.0b (8.0.0.2) * VMware 8: add new guest os mappings in VirtualMachineGuestOsIdentifier The full list can be found at https://developer.vmware.com/apis/1355/vsphere * VMware: get guest os mappings of parent version * VMware8: remove guest os mappings for 8.0.0.2 * VMware8: fix code smells * vmware: remove annotations in VmwareVmImplementerTest which caused 0.0% code coverage * VMware8: add a unit test case * VMware: add support for 8.0c (8.0.0.3) * VMware8: move to CloudStackVersion.getVMwareParentVersion * VMware: add support for 8.0u1 (8.0.1.0) * Copy engine/schema/src/main/java/com/cloud/upgrade/GuestOsMapper.java from PR 6979 * Copy engine/schema/src/main/java/com/cloud/storage/dao/GuestOSHypervisorDao.java from PR 6979 * VMware: ignore the last number in VMware versions * VMware: copy guest os mapping from 8.0 to 8.0.1 * VMware: add unit tests in VmwareVmImplementerTest.java * Copy engine/schema/src/test/java/com/cloud/upgrade/GuestOsMapperTest.java from PR 6979 * VMware8: retry vm poweron if fails due to exception "File system specific implementation of Ioctl[file] failed" This fixes a weird issue on vmware8. When power on a vm, sometimes it fails due to error 2023-04-27 07:04:43,207 ERROR [c.c.h.v.r.VmwareResource] (DirectAgent-442:ctx-cdd42b03 10.0.32.133, job-105/job-106, cmd: StartCommand) (logid:8a24a607) StartCommand failed due to [Exception: java.lang.RuntimeException Message: File system specific implementation of Ioctl[file] failed ]. java.lang.RuntimeException: File system specific implementation of Ioctl[file] failed at com.cloud.hypervisor.vmware.util.VmwareClient.waitForTask(VmwareClient.java:426) at com.cloud.hypervisor.vmware.mo.VirtualMachineMO.powerOn(VirtualMachineMO.java:288) in vmware.log on ESXi host, it shows 2023-04-27T09:20:41.713Z In(05)+ vmx - Power on failure messages: File system specific implementation of Ioctl[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of Ioctl[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of LookupAndOpen[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of Ioctl[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - File system specific implementation of Ioctl[file] failed 2023-04-27T09:20:41.713Z In(05)+ vmx - Failed to lock the file 2023-04-27T09:20:41.713Z In(05)+ vmx - Cannot open the disk '/vmfs/volumes/7b29c876-ac102328/i-2-167-VM/ROOT-167.vmdk' or one of the snapshot disks it depends on. 2023-04-27T09:20:41.713Z In(05)+ vmx - Module 'Disk' power on failed. 2023-04-27T09:20:41.713Z In(05)+ vmx - Failed to start the virtual machine. There is a KB article for it, but I still do not know why and how to fix it. https://kb.vmware.com/s/article/1004232 * VMware: extract to method powerOnVM * vmware: fix mistake in logs * vmware8: use curl instead of wget to fix test failures Traceback (most recent call last): File "/root/test_internal_lb.py", line 555, in test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 self.execute_internallb_roundrobin_tests(vpc_offering) File "/root/test_internal_lb.py", line 641, in execute_internallb_roundrobin_tests client_vm, applb.sourceipaddress, max_http_requests) File "/root/test_internal_lb.py", line 497, in run_ssh_test_accross_hosts (e, clienthost.public_ip)) AssertionError: list index out of range: SSH failed for VM with IP Address: 10.0.52.187 and sshClient: DEBUG: {Cmd: /usr/bin/wget -T3 -qO- --user=admin --password=password http://10.1.2.253:8081/admin?stats via Host: 10.0.52.188} {returns: ["/usr/bin/wget: '/usr/lib/libpcre.so.1' is not an ELF file", "/usr/bin/wget: can't load library 'libpcre.so.1'"]} * VMware: correct guest OS names in hypervisor mappings for VMware 8.0 el9 and variants were introduced by #7059 they are supported with guest os identifiers since VMware 8.0 see https://vdc-repo.vmware.com/vmwb-repository/dcr-public/c476b64b-c93c-4b21-9d76-be14da0148f9/04ca12ad-59b9-4e1c-8232-fd3d4276e52c/SDK/vsphere-ws/docs/ReferenceGuide/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html * VMware: add Ubuntu 20.04 and 22.04 support for vmware 7.0+ * PR7380: only add guest os mappings for Ubuntu 20.04 * PR7380: Correct RHEL9 guest os names and others for VMware 8.0 * PR7380: correct guest os names on 8.0.0.1 as well * PR7380: remove Windows 12 and Windows Server 2025 which are not released yet
1 parent e8b4911 commit c8d6e50

File tree

13 files changed

+393
-14
lines changed

13 files changed

+393
-14
lines changed

engine/schema/src/main/java/com/cloud/hypervisor/dao/HypervisorCapabilitiesDaoImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.ArrayList;
2020
import java.util.List;
2121

22+
import org.apache.cloudstack.utils.CloudStackVersion;
2223
import org.apache.commons.lang3.StringUtils;
2324
import org.apache.log4j.Logger;
2425
import org.springframework.stereotype.Component;
@@ -73,6 +74,12 @@ public HypervisorCapabilitiesVO findByHypervisorTypeAndVersion(HypervisorType hy
7374
SearchCriteria<HypervisorCapabilitiesVO> sc = HypervisorTypeAndVersionSearch.create();
7475
sc.setParameters("hypervisorType", hypervisorType);
7576
sc.setParameters("hypervisorVersion", hypervisorVersion);
77+
HypervisorCapabilitiesVO result = findOneBy(sc);
78+
if (result != null || !HypervisorType.VMware.equals(hypervisorType) ||
79+
CloudStackVersion.getVMwareParentVersion(hypervisorVersion) == null) {
80+
return result;
81+
}
82+
sc.setParameters("hypervisorVersion", CloudStackVersion.getVMwareParentVersion(hypervisorVersion));
7683
return findOneBy(sc);
7784
}
7885

engine/schema/src/main/java/com/cloud/storage/dao/GuestOSHypervisorDao.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ List<GuestOSHypervisorVO> listByOsNameAndHypervisorMinimumVersion(String guestOs
4040
String minHypervisorVersion);
4141

4242
List<String> listHypervisorSupportedVersionsFromMinimumVersion(String hypervisorType, String hypervisorVersion);
43+
44+
List<GuestOSHypervisorVO> listByHypervisorTypeAndVersion(String hypervisorType, String hypervisorVersion);
4345
}

engine/schema/src/main/java/com/cloud/storage/dao/GuestOSHypervisorDaoImpl.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class GuestOSHypervisorDaoImpl extends GenericDaoBase<GuestOSHypervisorVO
3939
protected final SearchBuilder<GuestOSHypervisorVO> userDefinedMappingSearch;
4040
protected final SearchBuilder<GuestOSHypervisorVO> guestOsNameSearch;
4141
protected final SearchBuilder<GuestOSHypervisorVO> availableHypervisorVersionSearch;
42+
protected final SearchBuilder<GuestOSHypervisorVO> hypervisorTypeAndVersionSearch;
4243

4344
public GuestOSHypervisorDaoImpl() {
4445
guestOsSearch = createSearchBuilder();
@@ -73,6 +74,11 @@ public GuestOSHypervisorDaoImpl() {
7374
availableHypervisorVersionSearch.select(null, SearchCriteria.Func.DISTINCT,
7475
availableHypervisorVersionSearch.entity().getHypervisorVersion());
7576
availableHypervisorVersionSearch.done();
77+
78+
hypervisorTypeAndVersionSearch = createSearchBuilder();
79+
hypervisorTypeAndVersionSearch.and("hypervisor_type", hypervisorTypeAndVersionSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ);
80+
hypervisorTypeAndVersionSearch.and("hypervisor_version", hypervisorTypeAndVersionSearch.entity().getHypervisorVersion(), SearchCriteria.Op.EQ);
81+
hypervisorTypeAndVersionSearch.done();
7682
}
7783

7884
@Override
@@ -176,4 +182,11 @@ public List<String> listHypervisorSupportedVersionsFromMinimumVersion(String hyp
176182
return versions;
177183
}
178184

185+
@Override
186+
public List<GuestOSHypervisorVO> listByHypervisorTypeAndVersion(String hypervisorType, String hypervisorVersion) {
187+
SearchCriteria<GuestOSHypervisorVO> sc = hypervisorTypeAndVersionSearch.create();
188+
sc.setParameters("hypervisor_type", hypervisorType);
189+
sc.setParameters("hypervisor_version", hypervisorVersion);
190+
return listIncludingRemovedBy(sc);
191+
}
179192
}

engine/schema/src/main/java/com/cloud/upgrade/GuestOsMapper.java

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.cloud.upgrade;
1818

1919
import org.apache.commons.collections.CollectionUtils;
20+
import org.apache.commons.lang3.StringUtils;
2021
import org.apache.log4j.Logger;
2122

2223
import java.sql.Connection;
@@ -26,6 +27,7 @@
2627

2728
import javax.inject.Inject;
2829

30+
import com.cloud.hypervisor.Hypervisor.HypervisorType;
2931
import com.cloud.storage.GuestOSHypervisorMapping;
3032
import com.cloud.storage.GuestOSHypervisorVO;
3133
import com.cloud.storage.GuestOSVO;
@@ -94,7 +96,7 @@ public void addGuestOsAndHypervisorMappings(long categoryId, String displayName,
9496
}
9597
}
9698

97-
private boolean addGuestOs(long categoryId, String displayName) {
99+
public boolean addGuestOs(long categoryId, String displayName) {
98100
LOG.debug("Adding guest OS with category id: " + categoryId + " and display name: " + displayName);
99101
GuestOSVO guestOS = new GuestOSVO();
100102
guestOS.setCategoryId(categoryId);
@@ -116,7 +118,7 @@ private void addGuestOsHypervisorMapping(GuestOSHypervisorMapping mapping, long
116118
return;
117119
}
118120

119-
LOG.debug("Adding guest OS hypervisor mapping - " + mapping.toString());
121+
LOG.debug("Adding guest OS hypervisor mapping - " + mapping.toString() + ", for guest OS with id - " + guestOsId);
120122
GuestOSHypervisorVO guestOsMapping = new GuestOSHypervisorVO();
121123
guestOsMapping.setHypervisorType(mapping.getHypervisorType());
122124
guestOsMapping.setHypervisorVersion(mapping.getHypervisorVersion());
@@ -198,4 +200,49 @@ private boolean isValidGuestOSHypervisorMapping(GuestOSHypervisorMapping mapping
198200
LOG.warn("Invalid Guest OS hypervisor mapping");
199201
return false;
200202
}
203+
204+
/**
205+
* Copies guest OS mappings from src version to dest version for the hypervisor (use this to copy all mappings from older version to newer version during upgrade)
206+
* @return true if copied successfully, else false.
207+
*/
208+
public boolean copyGuestOSHypervisorMappings(HypervisorType hypervisorType, String srcVersion, String destVersion) {
209+
if (hypervisorType == HypervisorType.None || hypervisorType == HypervisorType.Any) {
210+
LOG.warn("Unable to copy, invalid hypervisor");
211+
return false;
212+
}
213+
214+
if (StringUtils.isBlank(srcVersion) || StringUtils.isBlank(destVersion)) {
215+
LOG.warn("Unable to copy, invalid hypervisor version details");
216+
return false;
217+
}
218+
219+
List<GuestOSHypervisorVO> guestOSHypervisorMappingsForSrcVersion = guestOSHypervisorDao.listByHypervisorTypeAndVersion(hypervisorType.toString(), srcVersion);
220+
if (CollectionUtils.isEmpty(guestOSHypervisorMappingsForSrcVersion)) {
221+
LOG.warn(String.format("Unable to copy, couldn't find guest OS mappings for hypervisor: %s and src version: %s", hypervisorType.toString(), srcVersion));
222+
return false;
223+
}
224+
225+
LOG.debug(String.format("Adding guest OS mappings for hypervisor: %s and version: %s, from version: %s ", hypervisorType.toString(), destVersion, srcVersion));
226+
for (GuestOSHypervisorVO guestOSHypervisorMapping : guestOSHypervisorMappingsForSrcVersion) {
227+
GuestOSHypervisorMapping mapping = new GuestOSHypervisorMapping(hypervisorType.toString(), destVersion, guestOSHypervisorMapping.getGuestOsName());
228+
addGuestOsHypervisorMapping(mapping, guestOSHypervisorMapping.getGuestOsId());
229+
}
230+
return true;
231+
}
232+
233+
public void updateGuestOsNameInHypervisorMapping(long categoryId, String displayName, GuestOSHypervisorMapping mapping) {
234+
if (!isValidGuestOSHypervisorMapping(mapping)) {
235+
return;
236+
}
237+
238+
long guestOsId = getGuestOsId(categoryId, displayName);
239+
if (guestOsId == 0) {
240+
LOG.error(String.format("no guest os found for category %d and name %s, skipping mapping it to %s/%s", guestOsId, displayName, mapping.getHypervisorType(), mapping.getHypervisorVersion()));
241+
return;
242+
}
243+
244+
GuestOSHypervisorVO guestOsMapping = guestOSHypervisorDao.findByOsIdAndHypervisor(guestOsId, mapping.getHypervisorType(), mapping.getHypervisorVersion());
245+
guestOsMapping.setGuestOsName(mapping.getGuestOsName());
246+
guestOSHypervisorDao.update(guestOsMapping.getId(), guestOsMapping);
247+
}
201248
}

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41800to41810.java

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
// under the License.
1717
package com.cloud.upgrade.dao;
1818

19+
import com.cloud.hypervisor.Hypervisor;
20+
import com.cloud.storage.GuestOSHypervisorMapping;
21+
import com.cloud.upgrade.GuestOsMapper;
1922
import com.cloud.upgrade.SystemVmTemplateRegistration;
2023
import com.cloud.utils.exception.CloudRuntimeException;
2124
import org.apache.log4j.Logger;
@@ -58,6 +61,8 @@ public InputStream[] getPrepareScripts() {
5861
@Override
5962
public void performDataMigration(Connection conn) {
6063
fixForeignKeyNames(conn);
64+
updateGuestOsMappings(conn);
65+
copyGuestOsMappingsToVMware80u1();
6166
}
6267

6368
@Override
@@ -86,6 +91,115 @@ public void updateSystemVmTemplates(Connection conn) {
8691
}
8792
}
8893

94+
private void updateGuestOsMappings(Connection conn) {
95+
LOG.debug("Updating guest OS mappings");
96+
97+
GuestOsMapper guestOsMapper = new GuestOsMapper();
98+
List<GuestOSHypervisorMapping> mappings = new ArrayList<>();
99+
100+
LOG.debug("Adding Ubuntu 20.04 support for VMware 6.5+");
101+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "6.5", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
102+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "6.7", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
103+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "6.7.1", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
104+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "6.7.2", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
105+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "6.7.3", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
106+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "7.0", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
107+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "7.0.1.0", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
108+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "7.0.2.0", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
109+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "7.0.3.0", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
110+
guestOsMapper.addGuestOsHypervisorMapping(new GuestOSHypervisorMapping("VMware", "8.0", "ubuntu64Guest"), 10, "Ubuntu 20.04 LTS");
111+
112+
LOG.debug("Adding Ubuntu 22.04 support for KVM and VMware 6.5+");
113+
mappings.add(new GuestOSHypervisorMapping("KVM", "default", "Ubuntu 22.04 LTS"));
114+
mappings.add(new GuestOSHypervisorMapping("VMware", "6.5", "ubuntu64Guest"));
115+
mappings.add(new GuestOSHypervisorMapping("VMware", "6.7", "ubuntu64Guest"));
116+
mappings.add(new GuestOSHypervisorMapping("VMware", "6.7.1", "ubuntu64Guest"));
117+
mappings.add(new GuestOSHypervisorMapping("VMware", "6.7.2", "ubuntu64Guest"));
118+
mappings.add(new GuestOSHypervisorMapping("VMware", "6.7.3", "ubuntu64Guest"));
119+
mappings.add(new GuestOSHypervisorMapping("VMware", "7.0", "ubuntu64Guest"));
120+
mappings.add(new GuestOSHypervisorMapping("VMware", "7.0.1.0", "ubuntu64Guest"));
121+
mappings.add(new GuestOSHypervisorMapping("VMware", "7.0.2.0", "ubuntu64Guest"));
122+
mappings.add(new GuestOSHypervisorMapping("VMware", "7.0.3.0", "ubuntu64Guest"));
123+
mappings.add(new GuestOSHypervisorMapping("VMware", "8.0", "ubuntu64Guest"));
124+
guestOsMapper.addGuestOsAndHypervisorMappings(10, "Ubuntu 22.04 LTS", mappings);
125+
mappings.clear();
126+
127+
LOG.debug("Correcting guest OS names in hypervisor mappings for VMware 8.0 ad 8.0.0.1");
128+
final String hypervisorVMware = Hypervisor.HypervisorType.VMware.name();
129+
final String hypervisorVersionVmware8 = "8.0";
130+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "AlmaLinux 9", new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "almalinux_64Guest"));
131+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Oracle Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "oracleLinux9_64Guest"));
132+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Rocky Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "rockylinux_64Guest"));
133+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "AlmaLinux 9", new GuestOSHypervisorMapping(hypervisorVMware, "8.0.0.1", "almalinux_64Guest"));
134+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Oracle Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "8.0.0.1", "oracleLinux9_64Guest"));
135+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Rocky Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "8.0.0.1", "rockylinux_64Guest"));
136+
137+
LOG.debug("Correcting guest OS names in hypervisor mappings for Red Hat Enterprise Linux 9");
138+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Red Hat Enterprise Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "7.0", "rhel9_64Guest"));
139+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Red Hat Enterprise Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "7.0.1.0", "rhel9_64Guest"));
140+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Red Hat Enterprise Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "7.0.2.0", "rhel9_64Guest"));
141+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Red Hat Enterprise Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "7.0.3.0", "rhel9_64Guest"));
142+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Red Hat Enterprise Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "rhel9_64Guest"));
143+
guestOsMapper.updateGuestOsNameInHypervisorMapping(1, "Red Hat Enterprise Linux 9", new GuestOSHypervisorMapping(hypervisorVMware, "8.0.0.1", "rhel9_64Guest"));
144+
145+
LOG.debug("Adding new guest OS ids in hypervisor mappings for VMware 8.0");
146+
// Add support for darwin22_64Guest from VMware 8.0
147+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "darwin22_64Guest"));
148+
guestOsMapper.addGuestOsAndHypervisorMappings(7, "macOS 13 (64-bit)", mappings);
149+
mappings.clear();
150+
151+
// Add support for darwin23_64Guest from VMware 8.0
152+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "darwin23_64Guest"));
153+
guestOsMapper.addGuestOsAndHypervisorMappings(7, "macOS 14 (64-bit)", mappings);
154+
mappings.clear();
155+
156+
// Add support for debian12_64Guest from VMware 8.0
157+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "debian12_64Guest"));
158+
guestOsMapper.addGuestOsAndHypervisorMappings(2, "Debian GNU/Linux 12 (64-bit)", mappings);
159+
mappings.clear();
160+
161+
// Add support for debian12Guest from VMware 8.0
162+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "debian12Guest"));
163+
guestOsMapper.addGuestOsAndHypervisorMappings(2, "Debian GNU/Linux 12 (32-bit)", mappings);
164+
mappings.clear();
165+
166+
// Add support for freebsd14_64Guest from VMware 8.0
167+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "freebsd14_64Guest"));
168+
guestOsMapper.addGuestOsAndHypervisorMappings(9, "FreeBSD 14 (64-bit)", mappings);
169+
mappings.clear();
170+
171+
// Add support for freebsd14Guest from VMware 8.0
172+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "freebsd14Guest"));
173+
guestOsMapper.addGuestOsAndHypervisorMappings(9, "FreeBSD 14 (32-bit)", mappings);
174+
mappings.clear();
175+
176+
// Add support for other6xLinux64Guest from VMware 8.0
177+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "other6xLinux64Guest"));
178+
guestOsMapper.addGuestOsAndHypervisorMappings(7, "Linux 6.x Kernel (64-bit)", mappings);
179+
mappings.clear();
180+
181+
// Add support for other6xLinuxGuest from VMware 8.0
182+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "other6xLinuxGuest"));
183+
guestOsMapper.addGuestOsAndHypervisorMappings(7, "Linux 6.x Kernel (32-bit)", mappings);
184+
mappings.clear();
185+
186+
// Add support for vmkernel8Guest from VMware 8.0
187+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "vmkernel8Guest"));
188+
guestOsMapper.addGuestOsAndHypervisorMappings(7, "VMware ESXi 8.0", mappings);
189+
mappings.clear();
190+
191+
// Add support for windows11_64Guest from VMware 8.0
192+
mappings.add(new GuestOSHypervisorMapping(hypervisorVMware, hypervisorVersionVmware8, "windows11_64Guest"));
193+
guestOsMapper.addGuestOsAndHypervisorMappings(6, "Windows 11 (64-bit)", mappings);
194+
mappings.clear();
195+
}
196+
197+
private void copyGuestOsMappingsToVMware80u1() {
198+
LOG.debug("Copying guest OS mappings from VMware 8.0 to VMware 8.0.1");
199+
GuestOsMapper guestOsMapper = new GuestOsMapper();
200+
guestOsMapper.copyGuestOSHypervisorMappings(Hypervisor.HypervisorType.VMware, "8.0", "8.0.1");
201+
}
202+
89203
private void fixForeignKeyNames(Connection conn) {
90204
//Alter foreign key name for user_vm table from fk_user_data_id to fk_user_vm__user_data_id (if exists)
91205
List<String> keys = new ArrayList<String>();

engine/schema/src/main/resources/META-INF/db/schema-41800to41810.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
-- Schema upgrade from 4.18.0.0 to 4.18.1.0
2020
--;
2121

22+
-- Add support for VMware 8.0u1 (8.0.1.x)
23+
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities` (uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, max_hosts_per_cluster, storage_motion_supported, vm_snapshot_enabled) values (UUID(), 'VMware', '8.0.1', 1024, 0, 59, 64, 1, 1);
24+
2225
-- Update conserve_mode of the default network offering for Tungsten Fabric (this fixes issue #7241)
2326
UPDATE `cloud`.`network_offerings` SET conserve_mode = 0 WHERE unique_name ='DefaultTungstenFarbicNetworkOffering';
2427

0 commit comments

Comments
 (0)