Skip to content

Commit 2431feb

Browse files
DaanHooglandclaude
andauthored
remove Hyper-V support from core code
Hyper-V plugin is no longer built. HypervisorType.Hyperv is kept (deprecated) so existing DB records still convert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7141d6c commit 2431feb

40 files changed

Lines changed: 40 additions & 216 deletions

File tree

‎.github/boring-cyborg.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ labelPRBasedOnFilePath:
4646
"component:dpdk":
4747
- server/src/main/java/com/cloud/hypervisor/kvm/dpdk/*
4848
- plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/dpdk/*
49-
"component:hyperv":
50-
- plugins/hypervisors/hyperv/*
5149
"component:integration-test":
5250
- test/integration/*
5351
"component:ipv6":

‎api/src/main/java/com/cloud/hypervisor/Hypervisor.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public enum Functionality {
4747
public static final HypervisorType XenServer = new HypervisorType("XenServer", ImageFormat.VHD, EnumSet.of(RootDiskSizeOverride, VmStorageMigration));
4848
public static final HypervisorType KVM = new HypervisorType("KVM", ImageFormat.QCOW2, EnumSet.of(DirectDownloadTemplate, RootDiskSizeOverride, VmStorageMigration));
4949
public static final HypervisorType VMware = new HypervisorType("VMware", ImageFormat.OVA, EnumSet.of(RootDiskSizeOverride, VmStorageMigration, VmStorageMigrationWithSnapshots));
50+
/** Hyper-V support has been removed; kept so existing database records can still be read. */
51+
@Deprecated
5052
public static final HypervisorType Hyperv = new HypervisorType("Hyperv");
5153
public static final HypervisorType VirtualBox = new HypervisorType("VirtualBox");
5254
public static final HypervisorType Parralels = new HypervisorType("Parralels");

‎api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class AddClusterCmd extends BaseCmd {
6565
@Parameter(name = ApiConstants.HYPERVISOR,
6666
type = CommandType.STRING,
6767
required = true,
68-
description = "Hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3,External")
68+
description = "Hypervisor type of the cluster: XenServer,KVM,VMware,BareMetal,Simulator,Ovm3,External")
6969
private String hypervisor;
7070

7171
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,

‎api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class ListHostsCmd extends BaseListCmd {
104104
@Parameter(name = ApiConstants.HA_HOST, type = CommandType.BOOLEAN, description = "If true, list only hosts dedicated to HA")
105105
private Boolean haHost;
106106

107-
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of host: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator")
107+
@Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of host: XenServer,KVM,VMware,BareMetal,Simulator")
108108
private String hypervisor;
109109

110110
@Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server", since="4.21.0")

‎api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd {
6767
description = "The network name label of the physical device dedicated to this traffic on a VMware host")
6868
private String vmwareLabel;
6969

70+
@Deprecated
7071
@Parameter(name = ApiConstants.HYPERV_NETWORK_LABEL,
7172
type = CommandType.STRING,
7273
description = "The network name label of the physical device dedicated to this traffic on a Hyperv host")
@@ -108,10 +109,6 @@ public String getVmwareLabel() {
108109
return vmwareLabel;
109110
}
110111

111-
public String getHypervLabel() {
112-
return hypervLabel;
113-
}
114-
115112
public String getSimulatorLabel() {
116113
//simulators will have no labels
117114
return null;
@@ -163,7 +160,7 @@ public void execute() {
163160
public void create() throws ResourceAllocationException {
164161
PhysicalNetworkTrafficType result =
165162
_networkService.addTrafficTypeToPhysicalNetwork(getPhysicalNetworkId(), getTrafficType(), getIsolationMethod(), getXenLabel(), getKvmLabel(), getVmwareLabel(),
166-
getSimulatorLabel(), getVlan(), getHypervLabel(), getOvm3Label());
163+
getSimulatorLabel(), getVlan(), null, getOvm3Label());
167164
if (result != null) {
168165
setEntityId(result.getId());
169166
setEntityUuid(result.getUuid());

‎api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class UpdateTrafficTypeCmd extends BaseAsyncCmd {
5757
description = "The network name label of the physical device dedicated to this traffic on a VMware host")
5858
private String vmwareLabel;
5959

60+
@Deprecated
6061
@Parameter(name = ApiConstants.HYPERV_NETWORK_LABEL,
6162
type = CommandType.STRING,
6263
description = "The network name label of the physical device dedicated to this traffic on a Hyperv host")
@@ -87,10 +88,6 @@ public String getVmwareLabel() {
8788
return vmwareLabel;
8889
}
8990

90-
public String getHypervLabel() {
91-
return hypervLabel;
92-
}
93-
9491
public String getOvm3Label() {
9592
return ovm3Label;
9693
}
@@ -106,7 +103,7 @@ public long getEntityOwnerId() {
106103

107104
@Override
108105
public void execute() {
109-
PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType(getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), getHypervLabel(), getOvm3Label());
106+
PhysicalNetworkTrafficType result = _networkService.updatePhysicalNetworkTrafficType(getId(), getXenLabel(), getKvmLabel(), getVmwareLabel(), null, getOvm3Label());
110107
if (result != null) {
111108
TrafficTypeResponse response = _responseGenerator.createTrafficTypeResponse(result);
112109
response.setResponseName(getCommandName());

‎api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ public class TrafficTypeResponse extends BaseResponse {
5252
@Param(description = "The Network name label of the physical device dedicated to this traffic on a VMware host")
5353
private String vmwareNetworkLabel;
5454

55-
@SerializedName(ApiConstants.HYPERV_NETWORK_LABEL)
56-
@Param(description = "The Network name label of the physical device dedicated to this traffic on a HyperV host")
57-
private String hypervNetworkLabel;
58-
5955
@SerializedName(ApiConstants.VLAN)
6056
@Param(description = "The VLAN id to be used for Management traffic by VMware host")
6157
private String vlan;
@@ -105,18 +101,10 @@ public String getKvmLabel() {
105101
return kvmNetworkLabel;
106102
}
107103

108-
public String getHypervLabel() {
109-
return hypervNetworkLabel;
110-
}
111-
112104
public void setXenLabel(String xenLabel) {
113105
this.xenNetworkLabel = xenLabel;
114106
}
115107

116-
public void setHypervLabel(String hypervLabel) {
117-
this.hypervNetworkLabel = hypervLabel;
118-
}
119-
120108
public void setKvmLabel(String kvmLabel) {
121109
this.kvmNetworkLabel = kvmLabel;
122110
}

‎engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ public boolean getExecuteInSequence(final HypervisorType hypervisorType) {
20752075
return ExecuteInSequence.value();
20762076
}
20772077

2078-
if (Set.of(HypervisorType.KVM, HypervisorType.XenServer, HypervisorType.Hyperv, HypervisorType.LXC).contains(hypervisorType)) {
2078+
if (Set.of(HypervisorType.KVM, HypervisorType.XenServer, HypervisorType.LXC).contains(hypervisorType)) {
20792079
return false;
20802080
} else if (hypervisorType.equals(HypervisorType.VMware)) {
20812081
return StorageManager.shouldExecuteInSequenceOnVmware();
@@ -5548,8 +5548,7 @@ private void handlePowerOffReportWithNoPendingJobsOnVM(final VMInstanceVO vm) {
55485548
, vm, vm.getState(), vm.getPowerState());
55495549
if((HighAvailabilityManager.ForceHA.value() || vm.isHaEnabled()) && vm.getState() == State.Running
55505550
&& HaVmRestartHostUp.value()
5551-
&& vm.getHypervisorType() != HypervisorType.VMware
5552-
&& vm.getHypervisorType() != HypervisorType.Hyperv) {
5551+
&& vm.getHypervisorType() != HypervisorType.VMware) {
55535552
logger.info("Detected out-of-band stop of a HA enabled VM {}, will schedule restart.", vm);
55545553
if (!_haMgr.hasPendingHaWork(vm.getId())) {
55555554
_haMgr.scheduleRestart(vm, true);

‎engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,8 +1328,6 @@ private ImageFormat getSupportedImageFormatForCluster(HypervisorType hyperType)
13281328
return ImageFormat.OVA;
13291329
} else if (hyperType == HypervisorType.Ovm) {
13301330
return ImageFormat.RAW;
1331-
} else if (hyperType == HypervisorType.Hyperv) {
1332-
return ImageFormat.VHDX;
13331331
} else {
13341332
return null;
13351333
}
@@ -1350,16 +1348,7 @@ protected ImageFormat getSupportedImageFormatForCluster(HypervisorType hyperType
13501348
}
13511349

13521350
private boolean isSupportedImageFormatForCluster(VolumeInfo volume, HypervisorType rootDiskHyperType) {
1353-
ImageFormat volumeFormat = volume.getFormat();
1354-
if (rootDiskHyperType == HypervisorType.Hyperv) {
1355-
if (volumeFormat.equals(ImageFormat.VHDX) || volumeFormat.equals(ImageFormat.VHD)) {
1356-
return true;
1357-
} else {
1358-
return false;
1359-
}
1360-
} else {
1361-
return volume.getFormat().equals(getSupportedImageFormatForCluster(rootDiskHyperType));
1362-
}
1351+
return volume.getFormat().equals(getSupportedImageFormatForCluster(rootDiskHyperType));
13631352
}
13641353

13651354
private VolumeInfo copyVolume(StoragePool rootDiskPool, VolumeInfo volumeInfo, VirtualMachine vm, VirtualMachineTemplate rootDiskTmplt, DataCenter dcVO, Pod pod, DiskOffering diskVO,

‎engine/schema/pom.xml‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-vmware")
111111
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-xen")
112112
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-ovm")
113-
templateList.add("systemvmtemplate-${csVersion}.${patch}-x86_64-hyperv")
114113
File file = new File("./engine/schema/dist/systemvm-templates/sha512sum.txt")
115114
def lines = file.readLines()
116115
for (template in templateList) {
@@ -340,41 +339,5 @@
340339
</plugins>
341340
</build>
342341
</profile>
343-
<profile>
344-
<id>download-hyperv-systemvm-template</id>
345-
<activation>
346-
<property>
347-
<name>systemvm-hyperv</name>
348-
</property>
349-
</activation>
350-
<build>
351-
<plugins>
352-
<plugin>
353-
<groupId>org.apache.maven.plugins</groupId>
354-
<artifactId>maven-resources-plugin</artifactId>
355-
<version>${cs.resources-plugin.version}</version>
356-
</plugin>
357-
<plugin>
358-
<groupId>com.googlecode.maven-download-plugin</groupId>
359-
<artifactId>download-maven-plugin</artifactId>
360-
<version>1.6.3</version>
361-
<executions>
362-
<execution>
363-
<id>download-hyperv-template</id>
364-
<goals>
365-
<goal>wget</goal>
366-
</goals>
367-
<configuration>
368-
<checkSignature>true</checkSignature>
369-
<url>${project.systemvm.template.location}/${cs.version}/systemvmtemplate-${cs.version}.${patch.version}-x86_64-hyperv.vhd.zip</url>
370-
<outputDirectory>${basedir}/dist/systemvm-templates/</outputDirectory>
371-
<sha512>${hyperv.checksum}</sha512>
372-
</configuration>
373-
</execution>
374-
</executions>
375-
</plugin>
376-
</plugins>
377-
</build>
378-
</profile>
379342
</profiles>
380343
</project>

0 commit comments

Comments
 (0)