Hi, I am following instructions on moving an existing VM in Azure to a Different Subnet as indicated at the url
After adding my account, selecting scription and do Get-AzureVM, I get the following error
[blockquote]Update-AzureVM : BadRequest: The virtual network ID cannot be null or empty.
At line:1 char:7
- $vm | Update-AzureVM
- CategoryInfo : CloseError: [:] [Update-AzureVM], CloudException
- FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.UpdateAzureVMCommand [/blockquote]
[blockquote]Get-AzureVM –ServiceName TestVMCloud –Name TestVM | Set-AzureSubnet –SubnetNames Subnet-2 | Update-AzureVM
has no parameter “Virtual network ID”, so what is missing here?
was using variables when getting the mentioned error like this
[blockquote]Get-AzureVM-ServiceName $cloudServiceName -Name $vmName | Set-AzureSubnet -SubnetNames $subnetname | Update-AzureVM
I replaced the variables with there values as follows (without quotes as suggested)
[blockquote]Get-AzureVM -ServiceName myservice -Name MyAVM2 | Set-AzureSubnet -SubnetNames mysubnet | Update-AzureVM
it did not work, I also tried using quotes
[blockquote]Get-AzureVM -ServiceName ‘myservice’ -Name ‘MyAVM2’ | Set-AzureSubnet -SubnetNames ‘mysubnet’ | Update-AzureVM [/blockquote]
I opened a thread on MS forums, they request to open a ticket and my subscription is an MSDN related subscription which has no technical support