This happens when you have a VM (running in azure ). A VNET is not assigned to the VM and we are trying to assign it a static IP. We would keep on getting the above error which is in the subject. To over come this we need to follow the steps mentioned below
1) Delete the VM from the azure console but DONOT DELETE THE DISK.
2) Create a Vnet (assign a subnet to it)
3) Recreate the VM and attach the disk which was NOT deleted in step one.
4) Now run the below cmdlet
Get-AzureVM -ServiceName fazalsfirstvm -Name fazalsfirstvm | Set-AzureStaticVNetIP -IPAddress 10.0.0.6 | Update-AzureVM

Hope this helps.

Advertisements