New's

Saturday, January 28, 2012

Creating a PVSCSI-based Virtual Machine

Creating a new virtual machine that uses a PVSCSI adapter is relatively easy as long as you use a supported guest operating system. To start with, when you create a new virtual machine, you need to choose the Custom option in order to be able to choose the PVSCSI option. Figure 1 gives you a look at this screen.

 

Figure 1: Choose the Custom option for creating a new virtual machine
After choosing the Custom virtual machine option, follow the wizard until you get to the Virtual Machine Version page. On this page, make sure to choose Virtual Machine Version 7, as shown in Figure 2. If you choose version 4 for the virtual machine hardware, the PVSCSI option will not be available.

Figure 2: Choose the version 7 hardware type
When you get to the operating system selection page, make sure to choose an operating system that is supported by the PVSCSI adapter. If you don’t, when you get to the SCSI Controller page of the wizard, you will get a warning next to the VMware Paravirtual option that reads “not recommended for this guest OS”. If you choose a supported operating system, you will get no such warnings.

Figure 3: Choose your SCSI Controller type
From here, the remainder of the virtual machine provisioning process is the same as it is for other SCSI controller types. It’s only once you begin your guest operating system installation that you need to take additional steps to make sure that you can use the PVSCSI controller.
For this example, I will use Windows Server 2008 R2 as the guest operating system on a virtual machine to which I’ve allocated 40GB of disk space. As I begin the installation of Windows 2008 R2, you will notice in Figure 4 that I am not being offered any disks to which to install an operating system.

Figure 4: No storage devices are available
The reason: The Windows Server 2008 R2 installation media does not include drivers for VMware’s paravirtualized SCSI adapter meaning that no attached storage can be identified. You need to provide drivers that can be used by the installer to locate and use the storage that has been provided. VMware has included floppy disk images that include the PVSCSI drivers. These images are available in the host data store. To connect to the floppy image, click the icon of the floppy disk in vCenter and go to Floppy drive 1 > Connect to floppy image on a datastore.

Figure 5: Connect to a floppy disk image
Once you are presented with the Browse Datastores dialog box, browse to vmimages> floppies and choose the floppy image that suits your operating system. Figure 6 gives you a look at the floppy disk image options.

Figure 6: Choose the vmimages folder
Back on the Windows installation screen, click the Load Driver button and, on the following screen, click Browse and expand the newly connected floppy device. Choose the top level folder for your operating system type – 32-bit (i386) or 64-bit (amd64). Don’t get confused about the name “amd64”. This is the driver that you should use on any 64-bit version of Windows, regardless of what processor vendor you’re using. AMD64 is a generic name for 64-bit systems.

Figure 7: Choose the appropriate driver type for your OS
Now, Windows will load the new driver and you’ll be able to choose the virtual hard drive that you create when you created the virtual machine. Figure 8 gives you a look at the newly discovered storage device.

Figure 8: The storage device has now been located
From this point forward, the remainder of the Windows installation goes exactly as it would for any other virtual machine.

Adding a PVSCSI Adapter to an Existing Virtual Machine



PVSCSI is not just for new virtual machines. You might have a virtual SQL server, for example, that could benefit from the performance gains offered by using PVSCSI. Unless your virtual machine has major I/O needs on the boot volume, it is recommended that you stick with the existing controller for the boot volume and add the PVSCSI adapter as a second controller.
In order to configure an existing virtual machine to use PVSCSI, the VM should have VMware Tools installed.You first need to add a new hard drive to the system so that the new controller has something connected to it. We will walk through the process with these steps:
First, open vCenter and right-click on the target virtual machine and, from the shortcut menu, select Edit Settings.

Figure 9: Open the virtual machine settings page
From the Virtual Machines Settings page, click the Add button to add new hardware. When you get to the Add Hardware page, select Hard Disk and click Next.

Figure 10: Add a new hard drive
Follow the on-screen steps to choose the size for the new virtual hard drive. When you get to the Virtual Device Node option, it’s critical that you connect the hard drive to a separate virtual SCSI adapter. Do not attach the hard drive to anything starting with a zero as this is generally the default SCSI adapter. In this example, I’ll use 1:0 for the Virtual Device Node, as shown in Figure 11.

Figure 11:
Choose a virtual device node
Continue with the remainder of the process. When you are done, notice that the device list now shows two new devices: Your new hard drive as well as a new SCSI controller of the default LSI Logic type. The reason that the new adapter was created is because we chose to attach the new hard drive to something other than the default adapter.

Figure 12
Now, select the new SCSI controller and click the Change Type button. On the Change SCSI Controller Type window, choose VMware Paravirtual and click OK.

Figure 13: Choose the PVSCSI controller type
At this point, when you reboot your system and open the Disk Manager tool, you will see the new volume available and ready for formatting and use.

No comments:

Post a Comment