-
Notifications
You must be signed in to change notification settings - Fork 695
feature/hyperv-api-backend: VM & VM Factory Implementation #4080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
xmkg
wants to merge
76
commits into
feature/hyperv-api-backend-hcs-hcn
Choose a base branch
from
feature/hyperv-api-backend-virtual-machine
base: feature/hyperv-api-backend-hcs-hcn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feature/hyperv-api-backend: VM & VM Factory Implementation #4080
xmkg
wants to merge
76
commits into
feature/hyperv-api-backend-hcs-hcn
from
feature/hyperv-api-backend-virtual-machine
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nt settings It's a remnant from the original WSL2 traces. It works just as fine without the IpConfigurations settings.
- [vm] take network guid as a constructor argument - [vm] add ability to resolve hostname to retrieve IP address - [vm-start] distinguish between paused and stopped state and act accordingly - [vm-stop] take ShutdownPolicy into consideration - [vm-ssh-hostname] return the automatic ".mshome.net" hostname - [vm-ipv4-ipv6] return the resolved ip's for .mshome.net hostname Signed-off-by: Mustafa Kemal Gilor <[email protected]>
resolve_ip_addresses: simplify the wsa_init_wrapper
Hyper-V API has been the umbrella term to call the technology behind this feature, but it might be misleading because there's actually a real Hyper-V API and the feature does not use that. Instead, the feature utilizes Host Compute System and Host Compute Network API's. It's better to call this backend as what it actually is.
- api wrappers are now constructed at factory - factory and vm now use the interface types instead of concrete wrappers - switched to <> style includes - moved exception types to hcs_virtual_machine_exception.h
Implement the host-side of the Plan9 shares. It needs an agent to be running on the guest system, which will be implemented later. Add support for the graceful shutdown using guest hv_utils linux kernel driver, if present.
There are nothing to remove since everything is neatly packed into the instance folder. Removal of the instance folder is already taken care of by the base class, so only thing left is to ensure that the compute system is terminated. Set log level of open_compute_system failure and operation_failure to debug() instead of error() since these functions may fail in normal operation workflow (i.e. check if a VM exists).
simple implementation, vhdx clone only. - [hcs_api_wrapper] normalize file paths for api calls - [virtdisk_wrapper] enable clone functionality for CreateVirtualDisk
Re-implement the get_network_interfaces_info using native API in order to avoid relying on Powershell.
MSVC has started to complain, which is fixed by passing the /bigobj flag. C:\multipass-private\build\gen\multipass\rpc\multipass.grpc.pb.cc : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
the create_network implementation was only good for spawning ICS networks which is not sufficient for other needs, such as creating a transparent network. the following changes has been made in order to properly handle creation of different kind of networks: - Added the following types, representing HCN network object structure: - HcnNetworkType - HcnIpam - HcnIpamType - HcnNetworkPolicy - HcnSubnet - HcnNetworkFlags - HcnNetworkPolicyNetAdapterName - HcnNetworkPolicyType - HcnRoute - The code now uses "ipams" style network declarations - Added proper formatter/renderers for the new types - Updated the test code - Switched to named format arguments
- move GUID formatter to the platform_win.h header - update unit test usages
- Introduce two new types, HcsScsiDevice & HcsScsiDeviceType - Provide proper formatting for the HcsScsiDevice - Remove vhdx_path & cloudinit_iso_path variables from create params - Introduce scsi_devices paraneter to create params - Update the code that refers to the vhdx_path & cloudinit_iso_path
- replace "endpoints" with "network_adapters" in create params - Introduce new HcsNetworkAdapter type - Implement proper JSON formatter for HcsNetworkAdapter - Update relevant references in code
- add_endpoint function now takes compute system name as the rest of the API does - Updated code references
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/hyperv-api-backend-hcs-hcn #4080 +/- ##
======================================================================
- Coverage 89.50% 89.45% -0.05%
======================================================================
Files 259 259
Lines 14740 14749 +9
======================================================================
+ Hits 13193 13194 +1
- Misses 1547 1555 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
to simplify the interaction between the smart pointers and the C API a lean out_ptr type is implemented based on P1132R6 paper, which is already accepted into the C++23 standard. - open_host_compute_system and create_host_compute system now uses the out_ptr to avoid creating a temporary raw pointer for the API calls.
- update one more location that has been missed
4bf7b08
to
4c503b2
Compare
modify_compute_system is the generic function for doing runtime CS modification.
7170db6
to
5707e3a
Compare
1235fb8
to
28ea377
Compare
HcsPath is a std::filesystem::path wrapper for ensuring proper path formatting for the Host Compute System API.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.