StarWind iSCSI SAN
StarWind Native SAN for Hyper-V

Azure VM from Converted VHD

VM image converter (VMDK, VHD, VHDX, IMG, RAW, QCOW and QCOW2), P2V migrator

Moderators: art (staff), anton (staff), Anatoly (staff), Max (staff)

Azure VM from Converted VHD

Postby mcooling » Tue Oct 01, 2019 12:44 am

Hi there,

My first ever post and i'm a complete novice, so apols in advance if i'm breaking any protocol. Hopefully someone can help. I'm totally stuck!
I'm trying to create an Azure VM, using a VHD Image which I created using the converter. I've been through the Starwind guidelines and everything seems to have worked...I just can't get the very last step.

To finish, set the VM image as a source image for the new VM. So set the source image using the ID of the managed VM image:
$vm = Set-AzureRmVMSourceImage -VM $vm -Id $image.Id

I've tried all kinds, but i'm obviously just not running the command properly. I've used both the resource ID and source blob URI as the 'managed vm image id'.

I someone could help, it would be massively appreciated. I've spent hours trying to nail this.

PS C:\Windows\system32> $vm = Set-AzureRmVMSourceImage -VM $vm -Id $image.Id ""
Set-AzureRmVMSourceImage : Cannot validate argument on parameter 'VM'. The argument is null or empty. Provide an
argument that is not null or empty, and then try the command again.
At line:1 char:36
+ $vm = Set-AzureRmVMSourceImage -VM $vm -Id $image.Id "https://myvmnet ...
+ ~~~
+ CategoryInfo : InvalidData: (:) [Set-AzureRmVMSourceImage], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.Compute.SetAzureVMSourceImageCommand
Posts: 1
Joined: Tue Oct 01, 2019 12:33 am

Re: Azure VM from Converted VHD

Postby Boris (staff) » Wed Oct 02, 2019 8:45 am

I think it would be good to ask the article author directly by putting a comment under that article. This may be faster than getting any insight into this here via the forums.
Boris (staff)
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Return to StarWind V2V Converter, StarWind P2V Migrator

Who is online

Users browsing this forum: No registered users and 3 guests