0

I have created 3 virtual machines which are already in operation and I forgot to first assign a static IP at time of creation. I am now encountering some issues when I am trying to do this.

I have created a reserved IP using the following powershell:

New-AzureReservedIP “dmz-live” –Label “be-dmz-ip” –Location “North Europe”

Following this post http://prmdbaora.blogspot.in/2015/06/normal-0-false-false-false-en-us-x-none.html I tried to delete the VM and reassign but when I use the following code:

New-AzureVMConfig -Name "be-dmz" -InstanceSize "Standard_D11" –ImageName "be-dmz-be-dmz-0-201508100952090393" | New-AzureVM -ServiceName "be-dmz" –ReservedIPName " be-dmz-ip " -Location "CloudVNET”

I am getting an error:

New-AzureVMConfig : Must specify MediaLocation or set a current storage account using Set-AzureSubscription.
At line:1 char:1
+ New-AzureVMConfig -Name "be-dmz" -InstanceSize "Standard_D11" -ImageName "be-dmz ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [New-AzureVMConfig], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.NewAzure
VMConfigCommand

I have confirmed that the name of the disk is correct, after deleting the cloud service this disk was present but when I tried to run the command it deleted the disk and it is no longer showing in the list of disks

I want to add these machines to a virtual network called "CloudVNET". Can anyone give me a pointer as to what I am doing wrong here please and how I can go about assigned these reserved IPs to the machines

Jay
  • 3,012
  • 14
  • 48
  • 99
  • Have you set the storage account name like the error suggests? – arco444 Aug 10 '15 at 10:43
  • I have now set the storage account but now my error is stating that it cannot find the reserved IP although when I list reserved IPs it is found, I have tried using the reservedIP name and the label but neither are working – Jay Aug 10 '15 at 10:57
  • you have a space at the begin and at the end of your reserved ip name " be-dmz-ip " – Martin Brandl Aug 10 '15 at 12:21

0 Answers0