Skip to content

Conversation

@neerajdixit-msft2
Copy link
Member

Problem Statement

Customers need the ability to move VMs between different or same Azure Local cluster. The detailed PM document is at PM 2 Pager Document

Related PRs

[Cloud agent] VM Reconnect changes by neerajdixit-msft2 · Pull Request #1609 · microsoft/wssdclouda…

[Node agent] VM Reconnect changes by neerajdixit-msft2 · Pull Request #1440 · microsoft/wssdagent

[Node sdk] VM reconnect changes by neerajdixit-msft2 · Pull Request #339 · microsoft/wssd-sdk-for-go

[Cloud SDK] VM reconnect changes by neerajdixit-msft2 · Pull Request #356 · microsoft/moc-sdk-for-go

[moccli] VM Reconnect changes by neerajdixit-msft2 · Pull Request #346 · microsoft/moccli

Pull request 13831808: [Testing] VM reconnect changes - Repos

Summary of changes

These PRs accomplish the following:

  1. Implement new logic for disk hydrate and VM hydrate in wssdagent and wssdcloudagent
  2. Change the disk hydrate function signature in wssd-sdk-for-go and moc-sdk-for-go
  3. Modify the input arguments for nodectl and mocctl commands
  4. Change the MOC cicd tests to use the updated commands

Testing

Automated testing via MOC cicd - Run pending

Manual testing

[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe storage vhd hydrate --name vm9-dd1 --path "C:\ClusterStorage\UserStorage_1\ea8b5cdca853200\vm9\Virtual Hard Disks\vm9dd1.vhdx" --group Default_Group
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe storage vhd show --name vm9-dd1_subscription-id_resource-group --group Default_Group -o yaml
ID: 3ebbf3d84d0a332
name: vm9-dd1_subscription-id_resource-group
properties:
    blocksizebytes: 3.3554432e+07
    containername: UserStorage1-ee84cc9099db49659e7a3f0568e46487-17ee8ecb-b995-4a26-b4d5-c281538f9a99-edgeci-registration-hc1n35r0928-ugvuobii
    controllerlocation: 0
    controllernumber: 0
    diskSizeGB: 1.073741824e+09
    disknumber: 0
    dynamic: false
    logicalsectorbytes: 512
    path: c:\clusterstorage\userstorage_1\ea8b5cdca853200\vm9\virtual hard disks\vm9dd1.vhdx
    physicalsectorbytes: 4096
    scsipath: ""
    statuses:
        DownloadStatus: ""
        Error: ""
        HealthState: currentState:OK previousState:OK
        PlacementStatus: ""
        ProvisionState: currentState:CREATED previousState:CREATING
        UploadStatus: ""
        Version: "1761264018514989600"
    virtualmachinename: ""
tags: {}
version: "1761264018514989600"

[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe compute vm hydrate --name vm9-display --local-vm-name vm9 --data-disk-uris "vm9-dd1_subscription-id_resource-group" --group Default_Group
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe compute vm show --name vm9-display-subscription-id-resource-group --group Default_Group -o yaml
ID: 1641e076bb0324d
location: MocLocation
name: vm9-display-subscription-id-resource-group
tags:
    DecoratedResourceName: vm9-display-subscription-id-resource-group
    ResourceGroup: resource-group
    ResourceName: vm9
    Subscription: subscription-id
    VM-Name: vm9
version: "1761264114342154300"
virtualmachineproperties:
    disableHighAvailability: false
    guestAgentProfile:
        enabled: false
    hardwareprofile:
        customsize:
            cpucount: 4
            memorymb: 8192
        vmsize: Custom
    host:
        id: v-host2
    networkprofile:
        networkinterfaces: []
    osprofile:
        computername: ndixitrehome555
        osType: Windows
        osbootstrapengine: WindowsAnswerFiles
    provisioningState: CREATED
    securityProfile:
        enableTPM: false
        uefiSettings:
            secureBootEnabled: true
    statuses:
        DownloadStatus: ""
        Error: ""
        HealthState: currentState:OK previousState:OK
        PlacementStatus: ""
        PowerState: Running
        ProvisionState: currentState:CREATED previousState:CREATING
        UploadStatus: ""
        Version: "1761264114342154300"
    storageprofile:
        datadisks:
            - vhd:
                uri: vm9-dd1_subscription-id_resource-group
        imagereference:
            name: ""
        osdisk:
            vhd:
                uri: vm9-OsDisk
        vmConfigContainerName: UserStorage1-ee84cc9099db49659e7a3f0568e46487-17ee8ecb-b995-4a26-b4d5-c281538f9a99-edgeci-registration-hc1n35r0928-ugvuobii
    validationStatus: null
    vmType: Tenant

[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe compute vm stop --name vm9-display-subscription-id-resource-group --group Default_Group
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe compute vm delete --name vm9-display-subscription-id-resource-group --group Default_Group
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe storage vhd delete --name vm9-dd1_subscription-id_resource-group --group Default_Group
[v-host1]: PS C:\Program Files\AksHci> .\mocctl.exe storage vhd delete --name vm9-OsDisk --group Default_Group
[v-host1]: PS C:\Program Files\AksHci>
[v-host1]: PS C:\Program Files\AksHci>

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new gRPC method HasHyperVVm to the VirtualMachineAgent service to check if a Hyper-V VM exists by name. The changes include new protobuf message definitions and their corresponding generated Go code.

  • Introduces VirtualMachineHyperVVmRequest and VirtualMachineHyperVVmResponse messages
  • Adds HasHyperVVm RPC method to VirtualMachineAgent service
  • Updates dependency google.golang.org/genproto/googleapis/rpc to a newer version

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
rpc/nodeagent/compute/virtualmachine/moc_nodeagent_virtualmachine.proto Adds new protobuf messages and RPC method for checking Hyper-V VM existence
rpc/nodeagent/compute/moc_nodeagent_virtualmachine.pb.go Auto-generated Go code from protobuf definitions
go.mod Updates genproto/googleapis/rpc dependency version
go.sum Updates checksums for the updated dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@neerajdixit-msft2
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neerajdixit-msft2 neerajdixit-msft2 merged commit 2e4d6fc into main Oct 29, 2025
13 checks passed
@neerajdixit-msft2 neerajdixit-msft2 deleted the users/ndixit/DiskHydrateChanges branch October 29, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants