We just got a nutanix cluster and i'm trying to write a script that will migrate a machine from Hyper-V to AHV using powershell.
I have used blog from: https://dsronnie.wordpress.com/2017/07/05/migrate-hyper-v-to-nutanix-ahv/ as input for creating the PowerShell script
I can't get it to work.... i'm stuck at importing the image. I'm trying to do a "ImageImportSpec" in powershell but i can't figure out. Here's my code:
$ImgCreateSpec = New-NTNXObject -Name ImageImportSpecDTO$ContainerID = (Get-NTNXContainer -SearchString "Container Name").id
$ImgCreateSpec.containerid = $ContainerID.Substring($ContainerID.IndexOf(":")+2)$ImgCreateSpec.url = "nfs://127.0.0.1/migration/Test_DISK01.VHDX"
New-NTNXImage -Name "Test" -ImageType DISK_IMAGE -ImageImportSpec $ImgCreateSpec
I recieve a task-UUID, but in the web console ImageCreate task is failed almost immediatly. Bucnh of errors in create_task.py and modify_task.py.
I will share my powershell script once I got it working
Best answer by sandeepmp
or from powershell.
Check the file permission and set it to 777.
After changing the permission try again and image should get created without any issues.
Let us know if you still face any issues.