VMware ESXi 5 Lab Setup - Part 5 Create a Virtual Machine
Benvenuto, to part 5 of this ongoing Blog series. VMware ESXi 5 Lab Setup. We are now at a point where we can start to make virtual machines! We will be creating our virst virtual windows server, Server 2008 R2.
The prerequisite for this lab is that you need to have an .ISO of the Windows Server 2008 R2 disk created. You should also complete configuring local storage on your ESXi host. I know this was done outside of this series, but it was done before I had a true direction for how I was going to handle these posts. Finally you will need to have Veeam FastSCP installed on your workstation. If you have questions on this you can go to my blog on the topic here.
To start off we need to make sure that the iso files that we want are on storage that the ESXi environment can access. To do this you can refernce my guide on working with Veeam FastSCP and VMware ESXi.
Once that is done you can open up the vSphere Client and fill out the host name, user name which we are currently using root and password to log into the ESXi Host.
You may get a security warning, regarding the self signed certificate, check the box to Install this certificate and do not display any security warnings for "systemname" and click on the Ignore button.
This will bring you to the Home screen. Click on the Inventory Icon to display the Inventory view of the ESXi host that you are attached to.
The inventory view has to panels, we will be working in the left panel to create a new Virtual Machine. To do this simply left mouse click on the ESXi host and select New Virtual Machine. Alternatively you could use the keyboard short cut Ctrl+N.
This will bring up the Create New Virtual Machine Wizard. On the configuration screen you have a radio button for Typical or Custom. If you choose custom you are given more options, including the virtual machine version that you would like, CPU, Memory, Network, and SCSI Controller. I think that it is a good idea to choose custom just to become familiar with all of the extra options.
Once you have selected the Custom radio button, click on Next.
On the Name and Location screen, you select the name that you would like to give this VM. This is not the Windows name, however, I try and match that up in production machines.
Since this is going to end up as a template I am going to call it WinServer08R2. It is nice and descriptive. Please note that in the storage the folder that holds the files that make up your VM's will be the name that is typed here. Click Next
On the Storage screen, you are able to select where you would like the files to be kept. I am going to put this on the Test iSCSI LUN. Click Next.
On the Virtual Machine Version screen there is a radio button for Virtual Machine Version 7 and Virtual Machine Version 8. Version 8 is the default. Accept this and Click Next.
On the Guest Operating System screen there is 3 radio buttons, one for Windows, Linux and Other. Depending upon which radio button you have selected, the system will update your choices of OS in the dropdown.
We are going to select Microsoft Windows Server 2008 R2 (64-bit) and click Next.
In the CPUs section you have the option of selecting how many virtual CPU sockets and virtual Cores you would like this VM to have. Be careful when changing this configuration. You want to make sure that the applications and operating systems are able to take advantage of the additional CPUs or cores.
Adding more CPUs can actually slow down your machine based on the workload of the host. This is based on how VMware handles compute requests and shares CPU's.
In our case we are going to accept the defaults and Click Next.
In the Memory screen we are able to select the amount of RAM that a virtual machine will get. There is a nice chart provided us with the Min recommended for the Guest OS, Default recommended, Max recommendation for best performance, and max recommended for Guest OS.
Due to the magic of how VMware shares memory, we are able to over commit the amount of RAM that is on a physical host. This is a big cost savings, however our environment is not at that point yet.
We will just accept the 4GB default and click Next.
On the Network screen, you have the option to select how many virtual nics you would like your machine to have. You also have the option of adding that nic to particular networks or port groups that you have setup. Finally you have the option of selecting the adapter type.
We will keep the default of 1 virtual NIC
Under network we will select VM Network. The drop down will show any other virtual networks that were created as port groups. We will get into this in a latter blog.
The Adapter type we will select is the VMXNET3 adapter. We will also leave the check box for connect at power on. Once this is all done we can Click Next.
On the SCSI Controller screen we have radio buttons for several controllers. Depending upon your operating system, and system requirements you will want to choose accordingly.
BusLogic Parallel - This is an older controller Ex Windows Server 2000
LSI Logic Parallel - Windows Server 2003 has built in support for this controller
LSI Logic SAS - Default for Windows Server 2008
VMware Paravirtual - This is a new high i/o adapter. It is only supporting to boot from particular operating system. You may be able to use this to control data drives for older OS that have high IO. VMware has a KB article on it here.
Since we are installing Windows Server 2008R2 the system automatically defaulted the proper controller and we can Click Next.
In the Select a Disk Screen. You have radio buttons to Create a new virtual disk, Use an existing virtual disk, Raw Device mapping if supported, and Do not Create a disk.
We will create a new virtual Disk. This will create the VMDK file that will act as your virtual hard disk. Click Next.
In the Create a Disk screen, you have several options. The Capacity section defines the size of the virtual disk. We are going to change our Disk Size to 20Gb
In the Disk Provisioning section we have 3 options.
Think Provisioning Lazy Zeros, this will cut out the whole 20Gb that we are requesting and then mark the drive as zeroed out but not actually write out zeros to the space. This option is fine for most installations.
Think Provisioning Eager Zeroed, this will cut out the whole 20Gb that we are requesting and then actually write out all zeros to this drive.
Thin Provision, this will displace to the virtual os as if it had a 20Gb drive, but on the back end only allocate this space on demand as needed. There is a slight performance hit when using thin provisioning. Also it is another factor to manage, sice it allows you to over allocate your disk space. We will get into this in latter blogs in much greater detail.
The third section is the location section. There are two options here.
Store with the virtual machine, stores the disk with the rest of the virtual machine files that were specified in the storage screen.
Specify a datastore or datastore cluster, allows you to select where you want this disk created. This is useful in splitting up load on your SAN.
We will be keeping the default and Clicking Next.
In the advanced options screen there are two sections Virtual Device Node and Mode.
Virtual Device Node allows you to select where in the SCSI chain this device will be located. If you have an IDE disk it does the same with 4 positions as opposed to the15 positions that are on SCSI.
Mode by default is not selected. You typically do not need to enable this. If you do enable it you will not be able to take advantage of VMware's snapshot feature. Once the Independent Mode is select you have two options.
Persistent, in this case all changes to drives are written out to the drives.
Nonpersistent, in this case upon each reboot the drive goes back to its inital state. This can be useful in testing environments.
By putting the disk in persistent mode when installing and configuring an OS you can have the changes stored. Then when you want to test install apps or change configurations you can change it to nonpersistent mode and be able to go back to your starting point when you reboot each time.
We will be keeping the defaults and Click Next.
On the Ready to Complete screen you get a nice review of all of the options that you selected. Take a moment to read through so that you are sure that each option is correct.
We will also want to check the Edit the virtual machine settings before completion check box. This will allow us to mount the ISO image onto the DVD-ROM to load the OS.
This will open up the Virtual Machine Properties of this newly created VM. From the hardware list you will select New CD/DVD.
In the Right Panel the options will change. Under Device Type select the radio button for Datasotre ISO file. Then click on the Browse... Button.
From the Browse Datastores screen go to the file location that you put the ISO file for Server 2008 R2. Select the ISO file and click on OK.
This will take you back to the Properties screen. Now the path for the ISO file will contain the info you just browsed for. In the Device Status section above where you are looking check the box to Connect at power on. This makes sure that the virtual machine knows that the device is there. With all of these changes done the screen should look like it does bellow. Click Finished.
Once this is done you will be taken back to the vSphere Client screen and in the left panel you will see the virtual machine you just created. Right click on in and select open console. This will allow you to watch the installation.
Once the console is open click on the Play button on top to power on the virtual machine. You should get the Starting Windows screen as the device boots to the DVD. You will notice that this run much faster than on most hardware installs.
You will get the standard Install Windows screen for Windows Server 2008 R2. Since this is a blog about VMware I will go over the options for installing server 08 in a separate blog post here.