Configuring a Virtual Machine Using VMware

by Robert J. Shimonski [Published on 2 June 2008 / Last Updated on 2 June 2008]

In this article we will look at how to configure a virtual machine (VM) using VMware.

This article shows how to use VMware ESX Server, the VMware Infrastructure Client (VIC) and the VirtualCenter management console to create a new VM running a host operating system of Windows XP Professional SP 3. We will look at how to plan and prepare for the deployment of an XP ISO file, as well as to show the steps needed to configure a VM for use on your network.

Preparation

To configure a VM, you need to be using a running version of ESX, or you can download and use VMware Server from the VMware Web site. (www.vmware.com). VMware while not extremely difficult to use, can be very confusing to those first learning it. If you are new to VMware, it is highly recommended that you visit the links section and connect to the VMware Web site documentation and download a version that you can work with on your desktop. For those running production systems and/or ESX server, to prepare for a VM install, you need to follow most of the same steps you would when installing an operating system on a physical system – you need to check the host operating systems minimum hardware requirements as an example.

There are a few general items that you need to be aware of when configuring a new VM with VMware. First, when considering a new VM, you need to be aware of your total resources. VMware works off of resource pools and the theory of using slicing. When you create a new VM, resource must be taken for it therefore you must know how much you need and how much you have. For example, in this article we will create a new Windows XP Professional VM. Hypothetically speaking, if we needed this new VM for software testing and the minimum hardware requirements are now maximized, you may run out of resources very quickly. Secondly, you must consider how you will install the host operating system. Since you still need installation media such as CDs, DVDs or an ISO file, it needs to be accessible to the VMware infrastructure and you need to configure it within your new VM. Lastly, you should have a connection to the Internet via your VMware infrastructure to run Windows (or Microsoft) update to patch and repair your guest operating system. Now that you know a few general guidelines, let’s set up prepare to create a VM. Log into the VirtualCenter with the VIC as seen in Figure 1.


Figure 1: Viewing the VIC (VMware Infrastructure Client)

Once logged in, you can then create a Virtual Machine (VM). To create a VM you will need to be logged on with administrative privileges. Now that you are logged in as an administrator you need to do preparation work to get your VM ready to create and then install. First, you need not only the files for the host operating system but for further preparation you may need extra drivers as well. Both the host system files and the drivers will need to be accessible to the VM once it’s created so either have the data ready via CD, DVD or Floppy media. Also make sure that your disks are usable and not damaged.

If you are running a SAN (as in this lab example), then you can use a VMFS based LUN to store your data on. If you do, then you can switch to the ‘Datastores’ view in your VirtualCenter as seen in Figure 2.


Figure 2: Viewing your Datastore

In this article, we will look at using an ISO file stored on a LUN from an attached SAN over Fiber as the guest operating system. Magic ISO Maker and other online tools can help you take a normal installation disk and create an ISO file out of it, or you can also get ISO files from MSDN and Technet.

Now, we will need to upload the needed ISO file on to a datastore. From a LUN that you have available space on (which can be seen in the General section of the VirtualCenter Datastores view) open the Datastore Browser by selecting ‘Browse Datastore…’ In this example we will also upload a set of SCSI drivers we will need for the installation as well. Once the Datastore Browser is opened, upload the ISO file as seen in Figure 3,


Figure 3: Upload the ISO with the Datastore Browser

Creating a Virtual Machine

In this example we will create a Virtual Machine with ESX server. Now that your installation files (and needed drivers) are uploaded then next task is to create a VM to install Windows XP into. To do that we need to create a VM with the needed resources from the resource pool. To create a VM, you first need to create the container that the host system will sit in. Since VMware is essentially the sharing of resources, you will have to configure each one of those resources in order for your install to take place. For example, you will need to configure a way for the VM to find the ISO file on the LUN. To do this, you must fist create a VM. Then, once the VM is created, you will need to map the VM to the LUN to find the ISO file to run the install from. The easiest way to do this is with the Virtual Machine Wizard. To use this Wizard, you can go to File | New |  Virtual Machine…

Once selected, you will invoke the New Virtual Machine Wizard as seen in Figure 4.  Now, you can select the needed resources for the VM. When you launch the Wizard, you will go through a series of windows that allow you to select the type of VM you want, the name and location of it (It can reside on one of multiple servers if running VMware is running in a cluster), the datastore where the VM and its associated files will reside, the selection of the name and type of guest operating system as well as for resources such as CPU, Memory (as seen here), the network location and the Virtual Disk Capacity (or size).


Figure 4: Viewing the Virtual Machine Wizard

Once you get to the last screen (Ready to Complete), take note of the small check box you can select on the bottom left side of the dialog box as seen in Figure 5.


Figure 5: Edit the Virtual Machine Settings

Once you have selected all of the resources you need and have configured your VM with the appropriate settings, now its time to click Finish. You can also edit the VM after it’s created but since we selected to Edit the VM settings before the VM finishes creating you can see in Figure 6 that the Hardware is still listed as ‘adding’.


Figure 6: Configuring the VM Hardware

In Figure 7, you can see the different options available to you when configure a VM’s hardware. Now that we have to install a guest operating system into this VM, we need to configure a way for a CD, DVD or an ISO on a LUN to be accessible to begin the installation.


Figure 7: Configure a Datastore ISO File

Once you have finished configuration your hardware, next you can click Finish and your VM will be created and your ISO file attached to being the installation. Take note to select the check box on the ‘Connect at power on’ option in the Device Status section of the New CD/DVD hardware section where you connected your ISO. You need to select ‘connect’ because if you do not then when you ‘power on’ the VM, the file will not be available thus the installation will not start.

Once back in VirtualCenter, taken note of the task pane on the bottom of the screen. Your VM will be started and your progress shown. Sometimes it takes up to a minute for a VM to be created depending on what your selections are, what host its being added to if in a cluster, how many resources are available and how much load is currently on any given system. Once created, you will now be able to right click the VM in the console (if still in Datastore View, switch to Hosts and Clusters) and then ‘power on’ the VM. Here, you can also select ‘Edit Settings’ or many other options. Now, you should switch to the Console tab as seen in Figure 8.


Figure 8: Viewing an Installation on the VMs Console in VirtualCenter

Now, you can start your installation of Windows XP and hopefully not need the drivers listed. With XP (and why this was chosen for this particular article) its likely you will need extra SCSI drivers so if you do, the process is no different then if you were installing most any other Windows operating system – during the installation, press F6 to install advanced SCSI and/or RAID drivers and when given an option, load them off the LUN, a flp file, a CD/DVD or any other form of media you can connect. You may also have to go into the BIOS of the system and change the boot order as well to get the media connected to the installation program. Once the drivers are installed, you will install XP (and update it at Windows update) as if you were installing it on a physical machine on your companies network.

Lastly, it’s always recommended to patch Windows systems. Even though this current ISO was directly downloaded from MSDN with the Service Pack slipstreamed, running an update online still produced needed patches and hotfixes.

You should also install VMware tools as seen in figure 9 as this will also make it much easier to manage your VM within the VirtualCenter. One of the biggest differences is how you switch between working in the VirtualCenter and/or working within a VM. Without the VMware tools installed, you need to press ctrl+alt to switch between. With the toolset installed, you can operate seamlessly between both without having to do any keystroke combinations to disconnect once connected to a VM.


Figure 9: Installing VMware Tools

Summary

In this article we looked at how to create a VM with VMware ESX server, install a guest operating system (Windows XP) and configure needed resources, tools and settings.

Links

VMware Support, Documentation and Community

http://www.vmware.com/support/

Featured Links