Mark Galvin
asked on
Azure Automation - Shutdown of VM
Hi Azure Experts
I have been testing Azure of late and getting stuck in.
I have setup Azure Automation. I have configured a Start-up Job which works a treat. I have also created a Shut-down Job as follows:
Now, whilst the Shut-down job shuts down the VM's I have in there, I'm seeing this:
The message 'Virtual machines continue to incur compute charges if they are stopped from the guest operating system. To avoid these charges, use the management portal to stop the virtual machines or to delete them' - can anyone advise how I can get the VM to completely shutdown so that it is not incurring any Compute Charges?
Thanks
Mark
I have been testing Azure of late and getting stuck in.
I have setup Azure Automation. I have configured a Start-up Job which works a treat. I have also created a Shut-down Job as follows:
workflow ShutDown_STMine_VM
{
$Cred = Get-AutomationPSCredential -Name 'automation'
Add-AzureAccount -Credential $Cred
InlineScript
{
Select-AzureSubscription -SubscriptionName "Microsoft Partner Network"
$VMS = Get-AzureVM
ForEach ($VM in $VMS)
{
$VMName = $VM.Name
Write-Output "Attempting to shut down VM: $VMName"
Stop-AzureVM -ServiceName $VM.ServiceName -Name $VM.Name -StayProvisioned
}
}
}
Now, whilst the Shut-down job shuts down the VM's I have in there, I'm seeing this:
The message 'Virtual machines continue to incur compute charges if they are stopped from the guest operating system. To avoid these charges, use the management portal to stop the virtual machines or to delete them' - can anyone advise how I can get the VM to completely shutdown so that it is not incurring any Compute Charges?
Thanks
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you probably don't need a full blown virtual machine for your app.
ASKER
Hi
The server for the application needs a full Windows Server running.
If have a static IP via Azure is not possible I presume that using something like DYNDNS is allowed?
The server for the application needs a full Windows Server running.
If have a static IP via Azure is not possible I presume that using something like DYNDNS is allowed?
use an instance level pubic ip additional cost $4/month
https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-instance-level-public-ip/
https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-instance-level-public-ip/
ASKER
Thanks.
Any ideas with my other question https://www.experts-exchange.com/questions/28711939/Azure-Port-Forwarding.html
Any ideas with my other question https://www.experts-exchange.com/questions/28711939/Azure-Port-Forwarding.html
ASKER
Thanks for that. I was using the '-stayprovisioned' to keep the same external IP but see the error of my ways.
If I wanted to have a static external IP as I am hosting an app server how to I go about that? The app server needs to be available to the public via port 25565. I have another question open about the fact that that port is open even though I have set it as endpoint.
Thanks
Mark