SOLVED

Get info in virtual machine

%3CLINGO-SUB%20id%3D%22lingo-sub-1906147%22%20slang%3D%22fr-FR%22%3EGet%20info%20in%20virtual%20machine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1906147%22%20slang%3D%22fr-FR%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20some%20questions%20about%20azure%20virtual%20machines%20(VMs)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20does%20the%20pricing%20work%3F%20Are%20we%20paid%20per%20hour%20of%20use%20or%20per%20month%3F%3CBR%20%2F%3EFor%20example%2C%20if%20I%20use%20it%20for%2020%20hours%20for%201%20month%2C%20how%20does%20it%20work%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20the%20pricing%20take%20place%20when%20the%20machine%20is%20running%20or%20when%20you%20connect%20to%20the%20virtual%20machine%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20stopping%20the%20VM%2C%20do%20I%20lose%20the%20files%20saved%20in%20drive%20C%20(SSD)%20and%2For%20D%20(HDD)%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFinally%2C%20with%20the%20%24100%20offered%20for%20students%2C%20do%20we%20have%20enough%20to%20have%20a%20computer%20(4%20CPUs%2C%208%20GB%20Ram%20as%20a%20minimum)%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%20(I%20have%20a%20lot%20of%20questions%2C%20please%20forgive%20me).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1907505%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20info%20in%20virtual%20machine%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1907505%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F874466%22%20target%3D%22_blank%22%3E%40Fabien62%3C%2FA%3E%2C%26nbsp%3Bthat's%20not%20a%20simple%20question%20as%20you%20have%20to%20consider%20multiple%20factors%20and%20tradeoffs.%20First%20and%20foremost%2C%20you%20need%20to%20know%20that%20there's%20a%20difference%20between%20the%20pay-as-you-go%20(PAYG)%20concept%20and%20the%20pricing%20for%20specific%20Azure%20services%2C%20like%20VMs.%20In%20the%20cloud%2C%20you're%20only%20paying%20for%20what%20you're%20consuming%20(it's%20applicable%20to%20any%20cloud%20provider%2C%20not%20just%20Azure).%20However%2C%20with%20regard%20to%20VMs%20-%20and%20these%20are%20pre-allocated%20resources%2C%20i.e.%2C%20you're%20still%20paying%20for%20a%20VM%2C%20even%20if%20it's%20stopped%2C%20just%20because%20it%20occupies%20compute%20resources%20in%20the%20data%20center.%20The%20only%20way%20to%20stop%20billing%20is%20to%20'deallocate'%20(i.e.%20destroy)%20the%20resource.%20Other%20than%20that%2C%20you're%20billed%20for%20730h%20a%20month%20(24h%20a%20day%2C%20along%20the%20month)%20for%20the%20VM.%20So%2C%20answering%20your%20first%20question%2C%20the%20pricing%20takes%20place%20from%20the%20moment%20you%20spin-up%20a%20VM%20and%20up%20until%20the%20moment%20you%20destroy%20it%20entirely.%3C%2FP%3E%3CP%3ENow%2C%20during%20the%20VM%20creation%2C%20it%20attaches%20a%20managed%20data%20disk.%20The%20data%20is%20stored%20there%20just%20like%20on%20any%20other%20hard%20drive%2C%20so%20if%20you%20turn%20the%20VM%20off%2C%20%3CU%3Eyour%20data%20won't%20be%20lost%3C%2FU%3E.%20There%20is%20a%20caveat%20-%20try%20not%20to%20use%20'temp'%20shares%20attached%20to%20a%20VM%20by%20default%2C%20they're%20not%20meant%20for%20long-term%20storage.%3C%2FP%3E%3CP%3EFinally%2C%20the%20%24100%20offering%20is%20not%20that%20much%20even%20for%20the%20general-purpose%20tier%20of%20VMs.%20The%20pricing%20heavily%20depends%20on%20the%20tier%2C%20and%20you%20can%20review%20it%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fsizes%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20Azure%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-ca%2Fpricing%2Fcalculator%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EPricing%20Calculator%3C%2FA%3E%20will%20be%20your%20best%20friend%20in%20determining%20the%20monthly%20payment%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FP%3E%3CP%3ETo%20save%20some%20money%20I%20personally%20prefer%20to%20Backup%20the%20entire%20VM%20if%20I%20don't%20use%20it%20(and%20I%20know%20I'll%20be%20using%20it%20in%20the%20future)%2C%20so%20you'll%20only%20pay%20for%20Backup%20storage%20that%20is%20a%20lot%20cheaper%20than%20the%20running%20VM.%20Another%20useful%20option%20is%20to%20remove%20the%20unused%20VM%20and%20keep%20a%20data%20disk%20that%20was%20associated%20with%20it.%20Later%20on%2C%20if%20you%20decide%20to%20work%20with%20that%20VM%2C%20you'll%20be%20able%20to%20create%20a%20VM%20using%20the%20data%20disk%20(with%20your%20data%20and%20OS)%20that%20already%20exists%20in%20the%20virtual%20network%20(more%20about%20this%20approach%20%3CA%20href%3D%22https%3A%2F%2Fpixelrobots.co.uk%2F2018%2F10%2Fcreate-an-azure-virtual-machine-from-an-existing-managed-disk%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E).%3C%2FP%3E%3CP%3EPay%20attention%20to%20the%20B%20or%20D%20class%20of%20the%20virtual%20machines%20(general%20purpose)%2C%20that%20may%20fit%20your%20budget%20(maybe%20even%20B2MS%20specifically).%20Please%20bear%20in%20mind%20that%20some%20VM%20types%20may%20not%20be%20available%20in%20your%20region.%20As%20mentioned%2C%20consult%20the%20Azure%20calculator%20to%20find%20the%20best%20VM%20that%20fits%20your%20needs%2C%20and%20don't%20forget%20about%20the%20other%20changes%20that%20may%20occur%20(such%20as%20the%20storage%20and%20the%20network%20bandwidth).%20The%20calculator%20allows%20getting%20that%20factored-in%20as%20well.%20One%20of%20the%20best%20practices%20is%20to%20create%20a%20Budget%20and%20keep%20an%20eye%20on%20the%20Cost%20analysis%20in%20your%20subscription%20as%20you%20go.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EP.S.%20Please%20click%20'like'%20and%20mark%20the%20question%20as%20answered%20if%20it%20helped%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Visitor

Hi,

 

I have some questions about azure virtual machines (VMs) :

 

How does the pricing work? Are we paid per hour of use or per month?
For example, if I use it for 20 hours for 1 month, how does it work?

 

Does the pricing take place when the machine is running or when you connect to the virtual machine?

 

When stopping the VM, do I lose the files saved in drive C (SSD) and/or D (HDD)?

 

Finally, with the $100 offered for students, do we have enough to have a computer (4 CPU, 8 GB Ram as a minimum)?

 

Thank you in advance (I have a lot of questions, please forgive me).

 

 

1 Reply
best response confirmed by Fabien62 (Visitor)
Solution

@Fabien62, that's not a simple question as you have to consider multiple factors and tradeoffs. First and foremost, you need to know that there's a difference between the pay-as-you-go (PAYG) concept and the pricing for specific Azure services, like VMs. In the cloud, you're only paying for what you're consuming (it's applicable to any cloud provider, not just Azure). However, with regard to VMs - and these are pre-allocated resources, i.e., you're still paying for a VM, even if it's stopped, just because it occupies compute resources in the data center. The only way to stop billing is to 'deallocate' (i.e. destroy) the resource. Other than that, you're billed for 730h a month (24h a day, along the month) for the VM. So, answering your first question, the pricing takes place from the moment you spin-up a VM and up until the moment you destroy it entirely.

Now, during the VM creation, it attaches a managed data disk. The data is stored there just like on any other hard drive, so if you turn the VM off, your data won't be lost. There is a caveat - try not to use 'temp' shares attached to a VM by default, they're not meant for long-term storage.

Finally, the $100 offering is not that much even for the general-purpose tier of VMs. The pricing heavily depends on the tier, and you can review it here. Azure Pricing Calculator will be your best friend in determining the monthly payment :smile:

To save some money I personally prefer to Backup the entire VM if I don't use it (and I know I'll be using it in the future), so you'll only pay for Backup storage that is a lot cheaper than the running VM. Another useful option is to remove the unused VM and keep a data disk that was associated with it. Later on, if you decide to work with that VM, you'll be able to create a VM using the data disk (with your data and OS) that already exists in the virtual network (more about this approach here).

Pay attention to the B or D class of the virtual machines (general purpose), that may fit your budget (maybe even B2MS specifically). Please bear in mind that some VM types may not be available in your region. As mentioned, consult the Azure calculator to find the best VM that fits your needs, and don't forget about the other changes that may occur (such as the storage and the network bandwidth). The calculator allows getting that factored-in as well. One of the best practices is to create a Budget and keep an eye on the Cost analysis in your subscription as you go.

 

P.S. Please click 'like' and mark the question as answered if it helped :smile: