From the course: VMware vSphere 6.5 Essential Training Part 1

Demo: Create a virtual machine (VM) - vSphere Tutorial

From the course: VMware vSphere 6.5 Essential Training Part 1

Demo: Create a virtual machine (VM)

- [Instructor] In this video, I'll demonstrate how to create a new virtual machine in the vSphere Web Client. So, I'm going to go to the Hosts and Clusters view. And within that view, I'm just going to choose an ESXi host that I want my new virtual machine to run on. I'll right click it, and I'll choose New Virtual Machine. And now I'm going to simply Create a new virtual machine, right, I don't want to deploy a virtual machine from a template, now if I built a pre-existing template, and I want to make a copy of it as new virtual machine I can do that. Or maybe I wanna clone some existing virtual machine, I can do that as well, but what I wanna demonstrate in this video, is how to create a new virtual machine from scratch. So I'll choose Create a new virtual machine and hit Next. And then I'll simply give my virtual machine a name, I'm gonna call it RickCrisciDemo and I'll choose the virtual data center that my virtual machine will reside in. If I had created any virtual machine folders, I could choose a folder here, but I don't have any of those. And I'll pick the ESXi host that the virtual machine is going to run on. Then I can go ahead and select the datastore that the virtual machine's files will reside on. And you can see here, I only have one datastore, it's a really small one as well, so I'm going to pick my only datastore that's available and go ahead and choose the virtual machine hardware version. So because I know that this virtual machine is going to run on an ESXi 6.0 host, I'll choose virtual machine hardware version 11. If I have some older hosts, in my inventory, that this virtual machine may need to run on from time to time, like let's say I might have to vMotion it to a 5.5 host, I may choose an older virtual hardware version so that this virtual machine will actually be compatible with those older hosts as well. So if I create a virtual machine and it's on hardware version 10, that means it'll work on ESXi 5.5 and ESXi 6.0. If I choose a virtual machine that's on hardware version 11, it will only be compatible with ESXi 6.0 and later. And for my purposes that's fine. So I'm gonna choose the newest virtual hardware version, hardware version 11, I'll hit Next, and then I'll specify the Guest operating system that I'm going to install on this virtual machine and this is an important part of the virtual machine creation. Now, we're not actually installing the Guest operating system here, what we're doing is we're telling the virtual machine, this is the Guest OS that will be installed eventually. And the reason that we have to do this, is because, think of it this way, what we're doing when we create a new virtual machine like this, is we're essentially putting together the virtual hardware. Alright, we're going to give it a certain amount of CPUs, we're going to connect it to a network, all that sort of stuff. We have to pick the right hardware to match our Guest operating system. So it's important to tell vSphere what to expect here, right and so I'll say you know in this case the Guest operating system that I'm eventually going to install is gonna be Server 2012 64-bit and then I can go through the process of customizing my virtual machine hardware. And of course it's not going to like the size of the virtual disk because I don't really have very much space on my datastore, so I'm going to override that and give it a really small disk. In real life, this wouldn't really work out, but I'm gonna give it 500 megs of memory and just to kind of make it work in my lab environment. And the other thing that we would do here, in real life, is I would go ahead and on my CD/DVD Drive, I might connect it to a Datastore ISO File. So maybe I've got some ISO images for different Windows operating systems, alright. Or, different bootable ISO images that I can use to go ahead and fire up these virtual machines and install the appropriate Guest operating system. So if that's the case, I'll go ahead and install these ISO images on some of my datastores. And what that'll give me the ability to do, is to say, okay, I'm gonna connect this ISO image at power on, and it'll be just like taking a Windows CD and putting it in the CD Drive. It'll allow my virtual machine to boot from this ISO image that'll automatically connect at power on and go ahead and install Windows. So that's one of my other options here. If I want to force this VM to automatically boot from an ISO image, whenever I've finished creating it, and then go ahead and go through the Windows installation wizard, I can have that automatically happen. Alright, and I can also choose some other settings like, what network do I wanna connect the virtual machine to, what type of virtual NIC do I wanna use, I'll pick all of those hardware settings, and then I'll go ahead and also select the number of CPUs, in this case I'm gonna stick with one, I'll hit Next, and at that point I can go ahead and Finish. I can go ahead and Finish it and create this virtual machine. And so what you'll see in a moment here, is a new virtual machine appear here on the left. And right now the virtual machine's in the process of being created, I can then go ahead and power it on, and I now have a new virtual machine that's powered on, ready to go, and I can go ahead and install the Guest operating system. You can see here my virtual machine actually failed the power on. So let's use this as an opportunity to explain why. Alright, and so let's go back a little bit here, my virtual machine failed the power on, let's try it one more time, and when it fails the power on, you can see here, I get an error message at the bottom right. I can also go to Monitor this virtual machine, and under Events and Tasks, I can see kind of what's been going on with this particular VM. And the error messages with vSphere are usually very descriptive, alright. And what this is telling me is I've failed to extend the swap file from zero K to 512 megabytes. What this is essentially telling me, is I don't have enough space on my datastore. Part of this virtual machine requirement is going to be, it needs space on the datastore to create a swap file. I don't have the space for that, so therefore this virtual machine cannot be created. Now I can get around that, by editing some of the settings on this virtual machine and reducing the amount of memory. The amount of swap space that's actually created, depends entirely on the amount of memory that you grant this virtual machine. So I'm going to reduce the size of the memory requirement, I can't change the size of the virtual disk now, and now that my virtual machine has been reconfigured, let's try and launch it just one more time and see what happens, and again under Monitor, I can watch my tasks for this VM and I can see in this case, the virtual machine power on operation was actually successful.

Contents