I’ve been optimizing my hosted environment for the last couple of days now. Besides upgrading the hard- and software of the physical server (Virtual Lifestyle running on ESX 4!), I’ve been optimizing the Guest OS of the VM running this website. After doing the usual stuff (like running “aptitude update” and “aptitude full-upgrade”), I set my sights on optimizing the virtual hardware of this VM.
Two major improvements were to be made:
- Upgrade the virtual ethernet adapter to VMXnet3
- Upgrade the virtual SCSI adapter to pvSCSI
Using VMXnet3
Upgrading the virtual ethernet adapter was easy enough:
- Shutdown VM
- Remove the VM from the (ESX/vCenter) inventory
- add the following line to the vm.vmx file
ethernet0.virtualDev=vmxnet3
- Add the VM to the inventory
- Start the VM
Using the Paravirtualized SCSI controller for the bootdisk
This one was a lot tougher to beat, mainly because I want pvSCSI on the bootdisk! First, I need to read up on the subject:
- What’s the deal with the new PVSCSI drivers?
- vSphere Virtual Machine Upgrade Process
- Update on the I/O vSphere performance test
- How to Add VMware Paravirtual SCSI (PVSCSI) adapters.
- Installing and using pvscsi in Red Hat and CentOS 5.3 under vSphere 4
- Using pvscsi in Linux – Update
With the newly gained knowledge, I knew I had to (roughly) do the following
- Upgrade VMware Tools to the latest and greatest
- Check if the kernel module is running (lsmod | grep pvscsi)
- Shutdown VM
- Add a second harddisk to scsi 1:0 (thus adding a new adapter)
- Change the adapter type to “paravirtual”
- Boot up the VM
- Move the current initrd file to a backuplocation
mv /boot/initrd.img-2.6.26-2-686 initrd.img-2.6.26-2-686.bck
- Add the pvscsi module to /etc/initramfs-tools/modules
- Run update-initramfs in verbose mode to create a new initrd and check if the pvscsi module is actually included:
update-initramfs -k `uname -r` -c -v | grep pvscsi

This should create a new initrd in /boot with the same name as the current initrd.img file. Please do doublecheck that, as the system will not boot if the name of initrd has changed.
- Shutdown VM
- Remove second hard disk
- Change adapter type for the bootdisk to “paravirtual”
- Boot up VM!
It works on my configuration (esx 4.1, ubuntu 10.10, latest tools)
a lil note, module name is now “vmw_pvscsi”
bye
Thanks so much for sharing this info! I was struggling trying to get Ubuntu 8.04 VM converted to using PVSCSI and this did the trick. Much obliged!!!
Wes
adapted the steps here to initially install a debian VM by modifying to your starting paramaters, going through the install, and then working back to the PVSCSI and VMXNET3 states…
Thanks a ton for writing it all up in one place.
We have an Debian 7.0 with Paravitual Controller on VMware 5.5 running,
but it seam to be not officially supported by VMware ….
cf the HCL
http://www.vmware.com/resources/compatibility/detail.php?deviceCategory=software&testConfig=16&productid=18838&supRel=271,172,243,&deviceCategory=software&details=1&operatingSystems=199&testConfigurations=16&page=1&display_interval=10&sortColumn=Partner&sortOrder=Asc&testConfig=16
my problem is this VM have been install in an ESX that need to be reboot without production stop… and SWITCH to another ESX is not supported :
“Device ‘Hard disk 1’ uses a controller that is not supported. This is not a limitation of the host in general, but of the virtual machine’s configured guest OS on the selected host”.
… if someone have an idea to configure correctly without change controller (or how to change to a normal disk controller) please contact me