Adding Hyper-V host to Move 3.4.0 | Nutanix Community
Skip to main content

I am trying to add Hyper-V host to Move to migrate the VMs.

 

But after adding the host, VM inventory are not loading(Shows 0 VMs) . When i try to refresh i get below error:

 

Failed to get inventory for source ' '. .ApiName="Get VM", HypervisorErr="=Cmd="Get-VM | Select-Object -ExpandProperty DVDDrives | Select ControllerType, ControllerNumber, ControllerLocation, Path, SupportPersistentReservations, VMName, VMId | ConvertTo-Json -Compress | Out-File -FilePath C:\Users\xtract\AppData\Local\Temp\executeCmd385362813\Ouput.json", ErrorMsg="exit status 1", Location="/root/workspace/xtract_vm_qcow2_builder_prod/go/src/hypervisor/hyperv/hyperv_agent/utils.go:96", Stderr="#< CLIXML <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><S S="Error">Get-VM : The term 'Get-VM' is not recognized as the name of a cmdlet, function, script file, or _x000D__x000A_</S><S S="Error">operable program. Check the spelling of the name, or if a path was included, verify that the path _x000D__x000A_</S><S S="Error">is correct and try again._x000D__x000A_</S><S S="Error">At line:1 char:1_x000D__x000A_</S><S S="Error">+ Get-VM | Select-Object -ExpandProperty DVDDrives | Select ControllerT ..._x000D__x000A_</S><S S="Error">+ ~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (Get-VM:String) )], CommandNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>"] Powershell command failed on HyperV machine. (error=0x8008)", Location="/hermes/go/src/hypervisor/hyperv/hyperv_agent_impl.go:1309"] Failed to execute Hyper-V API. (error=0x8001)

Deploying the Move Agent on Hyper-V Host

You can manually or automatically deploy the Move agent on the source Hyper-V host.

Manual Deployment

To download and install the Move agent on each of the source Hyper-V host machine to support VM discovery and migrations, do the following:

  1. In the Hyper-V host, download move-agent-installer.exe from http://<nutanix-move-ip>/downloads/agents/move-agent-installer.exe .

    Replace <nutanix-move-ip> with the IP address of the Move VM.

  2. Go to the location where you have downloaded the agent, and copy or move the downloaded file under C:\users\Administrator.
  3. Launch the command prompt with Run as Administrator to run the following command from C:\users\Administrator.
    move-agent-installer.exe -o eoperation] -ip tmove ip] -u vuser]

    Example: move-agent-installer.exe -o install -ip 10.5.244.55 -u user

    User can be either a domain or local user with administrator privileges.

Note:
  • By default, the Move agent is installed in the user directory. If you want to change the location, use the -d option.
  • To uninstall the Move agent, use the command move-agent-installer.exe -o remove.
  • Enter help along with any command for information to display options for that command.
  • Move agent service installation will add inbound firewall rule to open port 8087, which is required for Move VM and Hyper-V interactions. The Move Hyper-V agent service running on Hyper-V uses the 8087 port for interactions with Move. This service requires only the 8087 port and you cannot customize this service to use any other port.
  • Ensure that the service manager console is not opened during installation or removal of the Move agent.

Issue was related Powershell features not enabled. Once i enabled i was able to retrieve the VM inventory.

 

Thank you.