Bonjour hi welcome to this new episode of cloud and five minutes I'm Frank Boucher
Microsoft cloud advocate and today I want to show you 10 tips to reduce your
cost for your virtual machine your VMs starting right now
okay so before we start with all the tips I want to tell you that of course
all the URL will be displayed in the screen but I will put a list very
exhaustive list of all the links in the description so let's start with step
number one picking the good size of VM or the good type of VM for your work
there's plenty of services that exist and here it is a web page that exists
you can find it at a kms /az series here you have a lot of
description on every type of families for your virtual machine it's very
important because some VM are built with more memory order with more CPU other
GPU so if you're doing machine learning it's definitely not the same type of
resource you need as if you're running an SQL database on it and I hear you of
course it's very difficult to pick the best VM for the work on the first try so
give it a try go in the family will read the spec and you can always adjust by
scaling up and down after the VM is deployed of course there will be a
little downtime but you know it's worth a try and sometimes the work is already
there we want to migrate our VMs so for that we have a page that exists it's a
sure migrate that will help you a lot about getting tools and set and prepare
your virtual machine for a migration and if you are planning to migrate err i / v
vm here's an excellent blog post from my friend thomas that helps you to access
and migrate an i pervy vm so with that it will list all the information you
need to get ready to migrate your i / v machine in Azure so the tip number 2 is
to shut down the vm you don't use it may look simple but it will make a huge
difference of course it's only possible if it's not it's a web server our
database so mostly for your dev and test VMs when you create a virtual machine
when you create a virtual machine in the tab management if you scroll down at the
bottom you'll have an auto shutdown you could set there and specify a schedule
when you want to your VM to automatically shut down so very useful
so it could be at the end of every day and the weekend
of course if one or many VMs already exists you could go in the portal and
change this option if you want to do it by batch I show in a previous video that
is available just here in the top right corner a way writing a script to modify
all those VM at once this way all the VMS you decided will automatically shut
down every night so in tips number two it was shutting down the VM you can but
what if you cannot shut down those VM so tip number three commit to reserved
instances so when you know a server will always be up and running you should
commit to a specific location and for a long period of time if you go at bitly
/az reservation you will find a documentation that explained all of that
by reserving your VM for a long period let's say two years in a specific data
center the more precise you go in your reservation the lower the cost will be
so it's a very good way to save money on server or VMs that you know will stay
there for a long period of time so the tip number four will be to pick the good
type of VM previously we spoke about this family series and stuff like that
but now it's more about the type so of course those types are part of series
but you know let's let's keep it simple here so what I mean is sometime we have
a server that will run for a long period of time using only very little resources
and suddently will have a very high demand for a short period of time this
is when you want to use the worst of all VMs so those VMs will be perfect and
we'll be able to quickly change size or having more resources for a short period
of times so if you are having something very likely to do this kind of things
you should consider using those type of VMs and
sometime it's more we have a little job to run and we don't want to wait too
much time to have the VMS available so that's why the spot VM exists where you
could create a VM process your things and this delete everything or stop it
just after so those VM will be perfect for any processes you know job process
that you have so my next step will be to maximize your ibrid benefits and by that
I mean stop paying twice for your license a lot of time when you're using
VMs you already have license for your on-prem VM so if you're planning to
migrate those VM in Azure or if you're not using anymore you're on preneur
creating new VM with the same kind of software in Azure you could reuse a lot
of those license in Azure to be sure that it's possible go check the at bitly
slash ez hybrid in this page you have all the information but when you're
creating a VM manager there's a lot of VMs that are tagged B y ou L bring your
own license those VMs can be created using the same license
that you may or yeah so it's definitely a good way to save some money by not
paying twice for the same thing so since the beginning we're talking about
creating smartly new resources but what happened when the resources are created
how we can manage it well you need to use the cost management so you can find
more about this tool at a kms /az cost management here you will have a lot of
information about how to use it and what you can expect in fact you already have
it let's switch to the azure portal and here from the azure portal you could
always find your custom arrangement you will see pie chart and graph and a lot
of information in fact in a next video I will spend a lot more time showing you
how to maximize this tool but it's definitely something you should look at
so my next step is more when you don't know what you should be looking for so
using the azure advisor it's available at bitly / AZ advisor and here you have
a lot of information about this incredible tool and it's available
directly again from the azure portal from the azure portal you have a lot of
resources and information recommendation about yes your virtual machine your cos
but also the performance your database and tons of recommendation on all
services it's definitely a tool that you should have a look and revisit and
revisit again Finnegan my next steps is about picking the good region for your
VM of course you always try to stay close to your customer or your data but
sometime moving your VM in a specific region can impact a lot your cost and
right now at the moment I'm recording this video there's 56 region available
in Azure you could have all the details at bitly / AZ regions and here you have
all the information all the location will be available and by scrolling down
just a little bit you will have a manu here and you will be able to search your
product and pick and see them by region because of course not every proc or
feature is available in each region so this way you will be able to see where
it's available and adjust between your region and your needs and here we are at
tips number 9 getting out of your VM by considering pass platform-as-a-service
VM or fantastic they are very flexible because you could put anything you want
inside of them but you need to maintain them and they are a big block by going
smaller as a platform as a service or pass you will a lot of time limit your
cost and also I have less thing to maintain because all the infrastructure
will be maintained by Microsoft to help you figuring out what you can do and
what you can migrate you could go to the azure migration center there will be a
lot of formation in that phase and different
tools available would it be by using the migrate application service so if you
already have a website running in dotnet or PHP or something like that you could
use this tool to act do some assessments of your code and check if it's possible
to migrate it or for example if you need to do some little change for example if
you had a memory session it's probably a bad idea when you have multiple servers
so this tool will help you to list and migrate the code of course there's also
a tool that exists for your database or the data migration assistant will do an
assessment of your database and the will even help you and do the migration of
your database in a database as a service it support many different type of
service and different kind of scenario of migration it's very interesting so
there it is the final tips in fact it's do some
follow up once your VM is created you should monitor it question your choices
could you pick a smaller VM could you reduce your use could you turn off that
VM you should use at the maximum it's not normal if your VM is running only at
50% CPU it's not normal you should maybe think about moving a
second application in that same VM or reducing the size of this VM so every VM
should be used at closest as possible at the maximum capacity this video was
strongly inspire from an article in fact when I read this blog post from my
friend Thomas Moore I thought you know I need to do a video about that thing so
the video the link of this blog post will be also in the description or here
it is and it's mostly the same thing that I just explained to you and voila
that was my 10 tips to reduce your cost for your VMs I hope you liked the video
and I hope it was useful don't forget to share subscribe click the bell icon so
you know when the new video is coming up if you have any question don't hesitate
to contact me on all social media or write it down in the car
section and talking about comments let's read a few of them so the first question
comes from Edie some that's Pacheco is asking a frank how can I extract unzip
file that our password-protected I have the password but I don't know how I can
use that well that was part of the video where I was using logic app so in logic
app the connectors is very limited so there's I don't think there's a way to
do it you will need to do it probably by code so my assumption will be you're
betting you're better watching my second video I will put a link in the
description where I'm using Azure function so code to unzip the file this
way you're probably be able to pass the password and then be able to unzip your
protected zip file so the next questions come from today pro that he's asking
aren't template versus terraform which one make more sense
that's the question my friend an excellent questions however I don't have
any knowledge about terraform I heard about that
there's pros and cons I think in arm template and terraformed I really like
arm template and I think it's worth it spending more time with it in fact I
will do a full series soons about how to build your own template and
all the tools and everything so I'm biased but I would say arm template is
really interesting over I don't think terraform is bad either
it's just I think it's a question of choice so yeah sorry that's the answer I
have and the last questions of today come
from Joker in fact bunch of x-1 Joker is asking a Frank does this identification
system work for a blazer web app many things anyway so that was a question
based on my last video when I was saying how about authenticate your user on a
web app using social login so of course Joker there's no problem using that I
just used the MVC MVP MVC I just use the MVC because it was easier it's possible
to use it with blazer in fact I'm looking forward to try it and test it so
maybe a new video coming soon maybe I'll probably wait until the
version is GA though but yes it's possible it's possible with many
different languages but great question Wow that's it for this week I hope you
liked it don't forget subscribe like share click the bell icon to know when I
have a new video and see you next time thank you for watching bye