I am experimenting with the Set-AzureStaticVNetIP powershell command to allocate a static IP address to VMs. I can get the command to work and allocate an IP address correctly to a VM, either on creation or once it is running, but nothing I do will persuade the VMs to continue to use this allocated IP address once the machine has been stopped and deallocated in the Azure console .
Am I doing something wrong - or is my understanding of this command wrong ? I thought it was designed specifically to allow a persistent IP to be allocated to domain controllers etc, as described in the azure documentation here
To answer the question below - I am calling UpdateVm after making the change, if applied to a running VM. This restarts the VM in question and it comes up correctly with the assigned IP address - the issue still remains that this IP address is not retained after a stop and de-allocate from the azure console.
Further update - it is the internal IP address which is changing, and I've tried calling Set-AzureStaticVNetIP both on create and update of VMS.
TIA
Matt