90 days test Iaas Azure offer: how are calculated the costs when a VM is stopped - azure

I have been doing some test and realized that when I stop a VM, I get a red warning saying that it still generates charges.
But on which basis ?
Furthermore, on some VM I created, the system without any reason starts fooling and reach a 98% CPU during several hours with no way to stop it or to connect with RDP. VM was totally dead and it's only after several hours that the stop command from the control panel succeeded.
Hope I will not been charged for this ? Who is able to decide if my VM is OK or fooling like a crazy horse ?
Moreover, is there any software allowing to transfer my VMs from Azure to my local system, and delete them on Azure to stop any charge ? for a simple backup with possibility to restore/restart them later ? Or to run them in my own hyper-V ?
Best regards
CS

Even if your VM is stopped, you still have resources that have been reserved for your VM (think of storage space, memory, CPU, ...) and these can't be 'sold' to anyone else. Deleting the VM will free these resoures and you'll no longer be charged.
Remember that Virtual Machines are still in preview, meaning things can go bad sometimes. And yes you'll be charged for this, but during the preview you get a 33% discount (more info here: https://www.windowsazure.com/en-us/pricing/details/).
The persistent disks of your VMs are stored in a storage account as page blobs. Using tools like Azure Storage Explorer, CloudXplorer, CloudBerry, ... you can download these VHD files and simply mount them in Hyper-V (You'll need to remember that you'll need a license if you want to run the machine on-premises).
Note that, if you simply delete the VM the disks won't be deleted (they will stay in your storage account). In that case you only pay for storage (which is very cheap).

The price of VM depends on their size and nature (prenium or not).
Also you have to pay for the storage, but a 120GB disks is not billed fully, only effectively used space is.
You can use IaaS Managament Studio to easily calculate how much your blob disk cost, and see links to pricing pages of azure.

Related

Why the remaining credit amount is reducing although I'm not using the VMs?

I've "Visual Studio Enterprise" azure subscription. I initially got few credits. I think it was $200 for free. Earlier it used to show static remaining credit i.e. if I built two VMs and it cost $50 it would show $150. But since few days may be just past day remaining credit is continuously reducing.
The activities I have done so far. Earlier I was unable to connect to VM as outgoing connection was not allowed from my organisation. Since I have got permission I'm able to connect. After that I installed Active Directory Services on one of the VM.
I don't think till this step my credit amount got reduced except for the VMs I built.
I was trying to start and stop the VM using powershell but I wasn't able to do so. So I installed powershell azure modules. using Connect-AzAccount to connect and then used Start-AzVM and Stop-AzVm to start and stop the VMs. Just to clarify I keep the VMs in shut down mode so I don't keep getting billed.
Still the amount is being deducted. I ran Disconnect-AzAccount on suspicion that it might be causing the issue but still it hasn't fixed the issue.
Can any one help here?
There are mainly two ways to stop VM:
Stop the Azure VM locally: When you connect to the Azure VM with remote desktop, go to the Power options within Windows and select Shutdown, this will essentially “turn off” the VM and stop it from running. However, even though the VM won’t be running you WILL still be paying for the Virtual machine hardware allocation. Doing this will cause the Azure Portal to report the status of the VM to be “Stopped”.
Another way is to click Stop in the virtual machine page on the portal(or use Azure PowerShell or Azure CLI). Instead of just shutting down the Operating System, Azure will also deallocate the hardware (CPU and Memory) allocation. Doing this will cause the Azure Portal to report the status of the VM to be “Stopped (Deallocated)”.
Overall, both methods will reduce cost but not none of cost. You do still pay for the Azure Storage account usage, which is used for storig the VM’s .vhd disk image file. As a result, you will still incur some cost for the storage, but at least you will save on the VM resources.
Ref: Properly Shutdown Azure VM to Save Money
You need to identify what resource are been billed when VM is stopped or Stopped De-allocated.
Check the Cost analysis under Cost Management to identify the resource. Note that when VM is stopped you still pay for storage and other resources depending in your setup.

Can you move/copy Azure virtual machines to a different instance?

If I setup a server running my application on an azure instance, for example A1 can I later change the instance to D2?
I might want to experiment with a VM at a lower cost but then move to a higher performing machine at a later date without having to rebuild everything.
Yes, you can change the size of Azure VM on demand. Changing the size will trigger a machine reboot and if you're using a configuration with SSD temporary drive, the content of the SSD will get erased. Other than that, everything else will be left untouched.
Drew, the Principal PM in this area has a great blog here about this.
You can only resize a VM to another offering that does not have fundamentally different hardware. Since A-Series and D-Series VMs have similar hardware, you would be able to swap those two around. You would not be able to go from A-Series to G-Series though. In addition you need to look at VM availability per region if you want to swap to something only in certain areas, as well as look at if you are using an ASM or ARM VM.
If you have an existing VM, you can check what it can swap out with in the new portal under "Size" in the VM Settings.
This will allow you to reboot into a different machine type, however any temp storage will be erased as with any VM reboot. You just need to ensure you are storing your persistent data in external storage.
You can learn more about the VM size offerings here.

Windows Azure with no virtual machines can't delete storage

I don't know how I had two virtual machines in Windows Azure, one application server that was stopped and one running database server, and all of a sudden, the machines no longer exist.
I have these questions:
is there a way to restore the machines?
if not is there a way to delete the storage?
Go to Virtual Machines.
Click on Disks.
Click on any remaining disks.
Click on Delete Disk - there is an option to "retain", so make sure you choose delete.
Once all the disks are deleted, then delete the storage container.
You can delete the storage with the help of steps specified in the below post
Follow this post steps
You may have hit a billing limit for a subscription with a limit. This typically happens with MSDN and Trial accounts. Once the limit is hit, Microsoft deletes any VMs running in the subscription. For IaaS VMs the actual disks still exist in storage and the VMs can be rehydrated from there once the account has some money in it or the monthly limit is reset by a new month starting. For PaaS instances, the package and configuration file is presumably still deployed to Windows Azure so, again, the service can be rehydrated when the account is flush with money.

Azure Virtual Machine Billing

I dont know if this is the right place, but I am assuming MSFT staff also answers these questions since the azure portal links to StackOverflow?
Questions:
I understand that Azure no longer bills me for a VM so long as it and its cloud service are stopped. But what is unclear is am I going to be billed for the Cloud Service itself? For example say i create a Virtual machine and by doing so i get a cloud service for it (with ip). Then I turn off that virtual Machine and the cloud service. Do i still get billed for the cloud service even though everything is turned off?
Continuing on the question above. Do i get billed storage fees for the Virtual Machines filesystem. Currently windows vms are around 120GB in size. How does the billing work out for virtual machines? And how does it change if the machine is turned off.
How are Custom Images billed? Say i create my Windows 2012 Master image with IIS and a few other components installed. Then I create my own Image so that I can bring up vms more rapidly. Where is the VM image stored? Will it be in my blob container under VHD's? And again will microsoft charge me to store this image? Will it be the full 120+ GB or the actual size of the image stored.
Sorry to ask these questions. Tried my best to google around and all i could find was a post by Scott Gu where he stated VMs wont be billed and very little detail beyond that.
I understand that Azure no longer bills me for a VM so long as it and
its cloud service are stopped. But what is unclear is am I going to be
billed for the Cloud Service itself? For example say i create a
Virtual machine and by doing so i get a cloud service for it (with
ip). Then I turn off that virtual Machine and the cloud service. Do i
still get billed for the cloud service even though everything is
turned off?
Essentially think of a cloud service as a shell under which you deploy a VM. Among other things, a cloud service provides you with a DNS (yourcloudservice.cloudapp.net for example). What you get charged for is the VM and not the cloud service so if you have nothing deployed in a cloud service, you don't get charged anything.
Continuing on the question above. Do i get billed storage fees for the
Virtual Machines filesystem. Currently windows vms are around 120GB in
size. How does the billing work out for virtual machines? And how does
it change if the machine is turned off.
Yes, I believe so. You would be charged for 120 GB of storage (based on this blog post: http://blogs.msdn.com/b/sql_shep/archive/2013/06/10/azure-billing-per-minute-and-no-compute-charge-for-a-stopped-iaas-vm.aspx) [See my note on pricing below].
How are Custom Images billed? Say i create my Windows 2012 Master
image with IIS and a few other components installed. Then I create my
own Image so that I can bring up vms more rapidly. Where is the VM
image stored? Will it be in my blob container under VHD's? And again
will microsoft charge me to store this image? Will it be the full 120+
GB or the actual size of the image stored.
Custom images are billed in a similar way as standard images as in both cases the VHD file is stored in your blob storage account so Microsoft will charge you for storage. Since VHDs are essentially saved as page blobs and page blobs are only charged based on the bytes occupied you will only be charged for the space you consumed.
UPDATE
VHD Pricing: Essentially VHDs are stored in blob storage as page blobs and the pricing of page blobs is calculated a little bit differently. For page blobs, you're only charged for the bytes you used instead of total blob size. So for example, you have a VHD of 120 GB size (i.e. your page blob size is 120 GB) but you're only occupying 30 GB there, you're only charged for 30 GB and not 120 GB.
As #Gaurav stated, you're not charged for the service container, only for running vm's. In the case of stopped VM's, you won't be charged, although you lose your assigned IP address if you have no other running vm's. You can choose to keep a vm provisioned to preserve IP address but then you'll continue paying for the VM. When a VM is stopped, you'll still pay for its storage (since these are persistent virtual machines).
Regarding storage costs: While the vhd might be a 120GB disk, you only pay for storage that's been actually used. That is, the page blob uses sparse allocation. If you format a 120GB volume but only use 30gb, you're billed for 30gb monthly, not 120gb. You pay for all vhd's, including your custom images, since each is stored in your storage account. Again, you don't pay for 120gb on your custom images; just for the allocated pages.
I don't think you get charged for the OS disk. If you have a data disk then you will be charged for the space used.

How is Geo Redundant Storage charged on Microsoft Azure?

SO I have been using the azure 3 month trial, to test out whether I want to use Microsoft Azure to host a project I am working on, however I have been very confused as I have run out of "Geo Redundant Storage" in the first month and I don't really understand why.
I have read this: https://www.windowsazure.com/en-us/pricing/details/ and the only thing I can make of it, is that it takes an average of how much storage you are using across a month, eg as long as I am using less then 35gb (for a 35gb limit) on average of storage space I am in the clear.
So under my Azure Subscriptsions 'STORAGE (GB/MONTH) - GEO REDUNDANT' it says '101.027% of 35 GB/month' (so I have reached my cap).
But I don't understand why this would be happening, all I have is a simple server with a nodejs web application and a redis database (pretty much an empty at the moment), all running on an ubuntu VM, and as I can't login and check storage now because it is disabled, but I am pretty sure it is nowhere even near 35gb total storage and never has been?
I am hoping someone can explain how the azure storage is charged or if I have missed something silly?
Edit: It just hit me that it could be redis, doing crazy things with IO? not sure if this is possible, but if it is, would I be better to use locally redundant storage and pay for locally redundant storage transactions?
Edit 2: On my graph it says I had been using 1.96gb / day. So that means its not the total harddrive space per month, is it harddrive space / day? (using 2gbs of data probably sounds about right with the OS included, if this is the case, that means they give you less then 2gb space on the trial, seems minute??)
This caused due to the limitation on the geo redundant storage I have faced the same issue to fix this just disable geo redundant storage from the Windows Azure preview portal.
Open the Windows Azure preview portal.
Select Storage left.
The select your storage.
Click Configure on the top.
Turn off geo-replication.
I hope this will help.
This is probably caused by the image of your Ubuntum VM. If you read the pricing details (the link in your question) you'll see this:
Compute hours do not include any Windows Azure Storage costs
associated with the image running in Windows Azure Virtual Machines. These costs are billed separately.
How large was the VM you created?

Resources