-
Notifications
You must be signed in to change notification settings - Fork 3
Changes for AksIot #8
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
base: addPropertiesCheck
Are you sure you want to change the base?
Conversation
manuelh-dev
commented
Feb 2, 2022
- To enable dynamic deployment scenarios, only require a gateway when there is routes defined
- To enable deployment of Windows VM (which do not use vsock), extend the CreateVirtualMachineSpec interface
Use the endpoint name instead of id to ensure the resource path remains constant across VM reboots. Otherwise, e.g. Windows VMs will recognize a different network adapter (leading to loss of static IP config)
|
@johnsonshih @madhanrm @nagiesek @jagadishmurugan @raghavendra-nataraj @seanyen I cannot add reviewers |
| // Hot detach an endpoint from the compute system | ||
| request := hcsschema.ModifySettingRequest{ | ||
| RequestType: requesttype.Remove, | ||
| ResourcePath: path.Join("VirtualMachine/Devices/NetworkAdapters", endpoint.Id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the original motivation to change it from Id to Name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use the ID, the ID changes every time the VM is rebooted. This is a problem for the Windows VM because it detects a different physical network adapter and loses its networking configuration.
I.e. if we use the ID, a different physical network adapter is mapped into the VM each time the VM restarts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an optional input parameter to allow caller specify resource name, if caller specify resource name, use it, otherwise use ID to ensure no conflict to existing resource name.
Same for hotAttachEndpoint
| // Ensure the VM has access, we use opts.Id to create VM | ||
| if err := wclayer.GrantVmAccess(opts.Id, opts.VhdPath); err != nil { | ||
| return nil, err | ||
| return nil, fmt.Errorf("Failed to grant VM access to VHD file, error: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
| if err := wclayer.GrantVmAccess(opts.Id, opts.IsoPath); err != nil { | ||
| return nil, err | ||
| return nil, fmt.Errorf("Failed to grant VM access to ISO file, error: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| for _, subnet := range ipam.Subnets { | ||
| if subnet.IpAddressPrefix != "" { | ||
| hasDefault := false | ||
| needsDefault := false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.