So create a virtual machine in a jar using PowerShell assuming you don’t have anything set up yet already we’re gonna start by creating a resource group so I got the name of a resource group and giving it a location using the new as your arm resource group commandment and you notice for the rest of the demo I’m using.

Same location keeping everything in one spot and so the next thing we need to create is a subnet and to do that we use the new asher RM virtual network subnet config commandant and give that subnet a.

Name and a prefix insider notation and I’m gonna store that in the subnet variable so that I can use the new Azure RM virtual network command to create a new network with that subnet in it so you notice that my network here I’ve got a name got it the same resource group same location and the address prefix insider notation.

Again encompasses that subnet so that sudden it falls within other networks specified by my network address prefix here so I’m going to create that virtual network and the next thing we’re gonna create is the storage account to store everything in and for my storage account you notice here I’ve got the name and it’s got.

To be global unique all lowercase n numbers specifying the same resource group giving you the squ name so this the type of storage to use and in my case I’m just sticking with the standard locally redundant storage that’s what LRS stands for there are some premium and other redundancy options but for keeping it simple same location and then we’ll use the new as your arm storage account command line how to create that and I’m.

Also storing that in the storage account variable and you’ll see why here in just a minute so.

To create here for this virtual machine is its public IP so we can access it from the internet so here I’m getting your name specifying the resource group so the same one as before allocation method sis’s dynamic or static dynamic cheaper this is just a demo so that’s that’s gonna work right domain name level so this you got a domain you’re gonna be using but you know again this.

Is demo source using test domain and specifying the location same location for me again.

And maybe using the new Azure are in public IP address and you notice I’m also storing this one in the public IP variable as well so for a lot of these you notice that I’m storing them in variables and that’s so we can use them further on and here’s a great example of why so.

Azure RM network interface so you notice I’ve got some parameters here so the name of course the resource group from before location but I’m also putting in a subnet so here in the command you notice I’ve got.

The subnet ID and a specifying the first subnet out of the virtual network we made before and the ID of that one as well as the public IP address ID so I’ve got the public IP but I’m specifying the ID property and then that way I don’t have to remember what those IDs were and copy/paste them we just specify the variables.

That we store them in and so the next thing we need to make is the virtual machine config and to do that we use the new Azure RM VM config commitment and you can see that I’m giving it it’s a really.

LEAVE A REPLY

Please enter your comment!
Please enter your name here