Then, on the left go in the Schedules options. Save and Publish you script (top buttons). Same thing for the name of your virtual machine and the name of your workflow. Don’t forget to adapt according do your settings. In my example : TGI-Perso is my Resource Group. Start-AzureRMVM -ResourceGroupName "TGI-Perso" -Name "VM-Hostname" $Conn = Get-AutomationConnection -Name AzureRunAsConnectionĪdd-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint Insert the 3 lines in you scripts between the brackets. Then, click on the Edit button to create our code. Choose a name, PowerShell Workflow and a description. You will find a set of default scripts but we will create a new one. Choose in the sub-menu « Process Automation » and go in « Runbooks« . Besides, for a short script that will just start our VM: it will be free ! □ Note that this service is also a paid service but it’s a lot less expensive than running your virtual machine every day in one month. Create a new Automation Account in your same Resource group where you’ve created your virtual machine. To be able to automatically start your virtual machine on specific time we will need an Automation Account. Because, you will be able to postpone directly in the mail notification you will receive.Īutomatically start the virtual machine (on scheduled time) This option might be useful if for example you may want to delay the shutdown on a specific day. You can also to choose to receive an email a moment before the automatic shutdown. In the above example, I have selected to automatically shutdown the VM at 10.30 AM but choose the schedule that will suit to your personal needs. The best way to do this is to configure the specific option when you’re creating your virtual machine.ĭo not forget to choose the time zone that will correspond to your country. To be able to process automatically the shutdown of your virtual machine, it’s quite easy with Azure. Automatically schedule the shutdown of your VM Should be quite enough for my usage scenario. More information on the B-Series introduced by end of 2017, by following this link. In general, you can save up to 40% of the standard cost for the same virtual machine with an integrated paid licence in Azure.įor my needs, I will use the size : B4ms with 16 GB of RAM and 4 vCPUs. That’s mean, you can avoid to paid the licence of a Windows Server or Desktop if you bring / use licences that you’re already owning. So, I will choose the latest version of Windows 10, hostname, subscription, location, resource group but also, I will use (automatically) the « Azure Hybrid Benefit« . In my example, I want to create a virtual machine that I will use as a low-cost remote virtual desktop when I’m moving and bringing only my Chromebook or iPad (and need Windows Apps). Create your virtual machineįirst, create a test virtual machine and think about when you will need it. Let’s check how we can do this in the Microsoft Cloud: Azure. The interest for me is to be able to use it exactly for what I need and shutdown things when I don’t use it in order to save my credit ! □ In my scenario, I have several Azure subscriptions with a few amount of credits. When the VM is shutdown, you will be billed only for the storage that is generally a lot less expensive. When your VM is executed, you will be billed for everything: CPU, power, RAM and every resources you’re using but also storage. That’s mean that if you can automate the shutdown or the start of a Virtual Machine, you will be billed only for the moment when the VM is running. And what’s the most interesting with Cloud providers is that you will pay only for what you’re using. You will probably need at some point a virtual machine. When you want to use cloud computing solutions from AWS, Azure, Google Cloud Platform or any others. Consult another alternative described in this article. It won’t work anymore in Microsoft Azure. The method described in this article is obsolete.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |