Azure VM Stop vs. Deallocated

In this article, I will explain difference between Azure VM stop and Azure VM stop (deallocated ).

There are 2 options to stop VM in Azure and they are not equal each other.There is a big difference between this two methods. You will still get charged for compute resource even you turn off the VM one of these methods. For another, You will free from paying and you can reduce overall cost.

The first stopped option we will reach the VM using RDP and to turn off operating system inside. In other words, it is same as turning off and turning on your computer in your daily life. Even stopped the VM with this process, you will continue to be charged because of allocated resources (cpu, ram etc. ) on the VM is not released. Because you are charged for using resouces by Microsoft Azure.


So you should release resources using option 2. In this option, We will stop VM on Azure Portal. While VM is closing, it release resources in this way. So you will not be charged at all. When you released resources, you will released dynamic ip adress as well as. So dynamic IP adress will change after you start VM again. If changing ip adress is important for you, you should your IP as a static form before deallocated.


This is really great feature to save the money by deallocating your VMs that not necessary operation always. However, it always couldn’t be possible to track this situation manually. So you can use Auto-Shutdown one property of Azure VM. You can schedule your VM shutdown time using this property on Azure Portal. You can follow steps for Auto-Shoutdown below.

How to Deploy Auto-Shutdown Schedule

First step click ” Virtual Machine ” left side on Azure Portal. Then click related VM which you want to configure.


In second step, go to operations under related VM features. Then click Auto-shutdown.


In the last step, you should enable this feature firtsly. After that you can choose what time you want to deallocated your VM as is seen from picture below. If you want a notification after shutdown your VM, you can enter your e-mail address related tab at the same time. End of these steps, save and close it.


Azure Nested Virtualization Üzerinde Hyper-V VM Nasıl Kullanılır

Azure platformunu kullanan arkadaşlara sesleniyorum, siz hiç Azure VM sunucuları içine Hyper-V sanallaştırma platformunu konumlandırdığınızı düşündünüz mü? Bazılarınızdan evet cevabını duyar gibiyim. Beklenen bu özelliği artık kullanabilir haldeyiz. Bu makale serimizde sizlere bu özellikten bahsediyor olacağım.

Microsoft’un yeni özellikleri arasında yer alan Azure Nested Virtualization, sayesinde Azure platformunda birden fazla VM açmak yerine Azure sanal makinelerin içine Hyper-V role kurup, gerekli ayarlamaları onun üzerinden yapabilirsiniz. Azure Nested Vırtualızatıon ortamını ürün geliştirme, test etme, müşteri eğitimi, demo gibi çeşitli alanlarda kullanabilirsiniz.



Not: Azure Nested Vırtualızatıon özelliğini Azure’un Dv3 ve Ev3 VM boyutlarını
kullanarak test edebilirsiniz
.

Şimdi ise adım adım bu özelliği inceleyelim. Demomuzda yapacağımız aksiyonlar ise, ilk olarak Azure Portal’ı üzerinde bir VM makine oluşturup, Hyper-V roles’un kurulumu gerçekleştireceğiz. Ardından Hyper-V içine bir adet Windows Server 2016 makine kurup, network konfigürasyonunu ayarlayacağız.



İlk olarak aşağıdaki özelliklerde bir Azure VM makine oluşturuyoruz. Resimde gösterildiği gibi size boyutunu seçip, normal bir şekilde VM adımlarını takip ederek Windows server 2016 makinesi oluşturuyoruz.

  • Windows Server 2016 Datacenter

  • Region: West Europe

  • Disk Type: SSD

  • Machine Type: D4S_V3 Standard



Windows server 2016 kurulumunu tamamlayıp, standart konfigürasyonlarını ayarladıktan sonra Server Manager altında Add Roles and Features bölümünden Hyper-V kurulumunu gerçekleştiriyoruz.

A

Resimde görüldüğü gibi Azure VM üzerine Hyper-V roles’un kurulumunu başarılı bir şekilde tamamladık.



Şimdi ise kurulumunu tamamladığımız Hyper-V üzerinde bir adet sanal makine oluşturarak (WS2016), iç içe sanallaştırma testini gerçekleştireceğiz. Windows Server 2016 ISO’sunu kullanarak 2GB RAM ile WS2016DC01 olarak adlandırdığım bir VM makine oluşturdum.

Not: Windows Server 2016’yı https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016 adresinden indirebilir veya Aboneliğinizi (MSDN, EA vb.) kullanabilirsiniz.



Hyper-V üzerindeki sanal makinanın network ayarlamaları için Host makinemize geri dönüp network ayarlamalarını düzenleyeceğiz. Azure VM makinemizi açıp, Hyper-V’i çalıştırıyoruz. Açılan Hyper-V yönetim konsolu üzerinde Actions bölümü altındaki Virtual Switch Manager linkine tıklayarak varolan Network Adaptor’unu İnternal Networkbağlantısına çekiyoruz.

Not: Dikkat edilmesi şeylerden birisi ise iç içe sanallaştırmada VM’lerin Ağa bağlanabilmesi için NAT’ı kullanmamız gerekir.



İnternal Network’e çektiğimiz Azure Vm makinesine static bir ip adresi tanımlıyoruz.



Hyper-V sanal makinenin internete çıkması için (NAT yapılandırma işlemi için) ilgili powershell komutunu çalıştırıyoruz. Çünkü GUI’den NAT’ı yapılandıramıyoruz.

New-NetNat –Name NVMNat –InternalIPInterfaceAddressPrefix 192.168.10.0/24



Başarılı bir şekilde powershell komutunu çalıştırdıktan sonra tekrardan Hyper-V üzerinde oluşturduğumuz.WS2016DC01 makinemize sabit ip tanımlıyoruz. (Resim üzerinde görüldüğü gibi…) ve makinenin otomatik internete bağlandığını göreceksiniz.



Bu şekilde Azure VM makineler üzerinde sanallaştırma yapıldığını görmüş olduk. Azure tarafında çıkan birçok yeni özellikleri sizlerle paylaşıyor olacağım.