Repository navigation
Remove Hyper-V support from core code - #14554
DaanHoogland wants to merge 5 commits into
Conversation
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>
There was a problem hiding this comment.
🟡 Changes recommended
Removing the ServerResource exclusion breaks the root RAT license check because remaining files lack required license headers, even when their Maven modules are disabled.
1 open issue
What changed in this PR
Removes legacy Hyper-V handling from CloudStack’s core, following the plugin build removal in #12500. It preserves the deprecated hypervisor type for existing database records and leaves the console-proxy RDP path intact.
Changes:
- Removes Hyper-V-specific networking, storage, migration, HA, and system VM behavior.
- Deprecates and ignores traffic-label inputs, removes the response field, and deletes obsolete configuration settings.
- Updates plugin packaging, template downloads, API descriptions, and related tests.
| File | Description |
|---|---|
| services/secondary-storage/controller/src/test/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerTest.java | Updates management-NIC expectations. |
| services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java | Removes Hyper-V SSH NIC selection. |
| services/console-proxy/rdpconsole/src/main/java/common/Client.java | Removes Hyper-V CLI mode and options. |
| server/src/test/java/com/cloud/server/ManagementServerImplTest.java | Removes Hyper-V from migration test cases. |
| server/src/test/java/com/cloud/api/ApiResponseHelperTest.java | Updates traffic-label response assertions. |
| server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | Removes Hyper-V migration support. |
| server/src/main/java/com/cloud/storage/StorageManagerImpl.java | Removes Hyper-V pool and template handling. |
| server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java | Removes Hyper-V host connection handling. |
| server/src/main/java/com/cloud/server/ManagementServerImpl.java | Excludes Hyper-V from live migration. |
| server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java | Removes Hyper-V from supported VPC hypervisors. |
| server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java | Removes Hyper-V router settings and boot arguments. |
| server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java | Removes the Hyper-V router template setting. |
| server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java | Removes Hyper-V router template mapping. |
| server/src/main/java/com/cloud/network/NetworkModelImpl.java | Removes Hyper-V traffic-label lookups. |
| server/src/main/java/com/cloud/network/guru/ControlNetworkGuru.java | Restricts special control-NIC handling to VMware. |
| server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java | Removes Hyper-V-specific HA exclusions. |
| server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java | Removes Hyper-V SSH NIC override. |
| server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java | Updates the valid-hypervisor documentation comment. |
| server/src/main/java/com/cloud/configuration/Config.java | Removes obsolete settings and the Hyper-V default entry. |
| server/src/main/java/com/cloud/api/ApiResponseHelper.java | Stops populating the Hyper-V traffic label. |
| server/src/main/java/com/cloud/api/ApiDBUtils.java | Removes Hyper-V inference for VHD volumes. |
| pom.xml | Removes Hyper-V license-check exclusions. |
| plugins/pom.xml | Disables Hyper-V and UCS Maven modules. |
| plugins/network-elements/internal-loadbalancer/src/main/java/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java | Removes Hyper-V load-balancer template selection. |
| packaging/package.sh | Removes Hyper-V from template-option help. |
| engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java | Removes Hyper-V migration endpoint special handling. |
| engine/schema/templateConfig.sh | Removes the Hyper-V template download entry. |
| engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java | Removes the Hyper-V guest OS assertion. |
| engine/schema/src/main/resources/META-INF/db/schema-42300to2400.sql | Deletes obsolete Hyper-V and UCS settings. |
| engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java | Removes Hyper-V system VM registration mappings. |
| engine/schema/src/main/java/com/cloud/network/dao/PhysicalNetworkTrafficTypeDaoImpl.java | Removes Hyper-V network-tag selection. |
| engine/schema/pom.xml | Removes Hyper-V template download and checksum handling. |
| engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java | Removes Hyper-V volume-format handling. |
| engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java | Removes Hyper-V sequencing and HA exceptions. |
| client/pom.xml | Removes Hyper-V and UCS plugin dependencies. |
| api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java | Removes the Hyper-V label response field. |
| api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java | Deprecates and ignores Hyper-V label input. |
| api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java | Deprecates and ignores Hyper-V label input. |
| api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java | Removes Hyper-V from parameter documentation. |
| api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java | Removes Hyper-V from parameter documentation. |
| api/src/main/java/org/apache/cloudstack/api/ApiConstants.java | Removes UCS API constants. |
| api/src/main/java/com/cloud/hypervisor/Hypervisor.java | Deprecates Hyper-V while preserving database compatibility. |
| .github/boring-cyborg.yml | Removes automatic Hyper-V component labeling. |
Review effort: Balanced
| <exclude>plugins/hypervisors/hyperv/conf/agent.properties</exclude> | ||
| <exclude>plugins/hypervisors/hyperv/conf/uefi.properties</exclude> | ||
| <exclude>plugins/hypervisors/hyperv/DotNet/ServerResource/**</exclude> | ||
| <exclude>scripts/installer/windows/acs_license.rtf</exclude> |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14554 +/- ##
============================================
+ Coverage 20.76% 20.85% +0.08%
- Complexity 21903 21906 +3
============================================
Files 6496 6470 -26
Lines 591612 589089 -2523
Branches 72585 72223 -362
============================================
- Hits 122851 122845 -6
+ Misses 455424 452908 -2516
+ Partials 13337 13336 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 26.02% |
| Branch coverage | 20.30% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run



Description
Removes Hyper-V support from core code now that the Hyper-V plugin is no longer built (see #12500). This is the first PR of a stack on
main:The first four commits are #12500 ported to
main, so this branch builds without the plugins. Once 4.22 is merged forward they become empty.Behaviour / API changes
listTrafficTypes,addTrafficTypeandupdateTrafficTyperesponses no longer includehypervnetworklabel. Thehypervnetworklabelrequest parameter is@Deprecatedand ignored.router.template.hyperv,hyperv.public.network.device,hyperv.private.network.deviceandhyperv.guest.network.device.schema-42300to2400.sqldeletes them, along withucs.sync.blade.interval.hypervisor.listdefault no longer containsHyperv. Existing values set by admins are left untouched.Deliberately kept
HypervisorType.Hyperv(now@Deprecated).HypervisorTypeConverterusesvalueOf(), which throws on unknown names, and existing installations haveHypervrows (for example the seededguest_os_hypervisormappings). Removing the constant would make loading those rows fail.Upgrade41500to41510,schema-410to420.sql,schema-41520to41600.sql) are unchanged.-9, not off the hypervisor type, and the new Hyper-V extension (extensions/HyperV) may rely on it.Possible follow-ups (not in this PR): UI Hyper-V options,
hyperv_network_labelcolumn andNetworkServicelabel parameters, appliance build scripts, marvin test data,setup/db/templates.sql.Types of changes
How Has This Been Tested?
Unit tests updated:
ApiResponseHelperTest,SystemVmTemplateRegistrationTest,SecondaryStorageManagerTest,ManagementServerImplTest.🤖 Generated with Claude Code