Installing Redhat Enterprise Server 5 in VMWare with PVSCSI (paravirtual SCSI)
It is quite straightforward to install Redhat Enterprise Server 5 in a VMWare virtual machine using the paravirtual SCSI controller (in ESX 4).
My tip:
So let's begin.
Create a new VM, choose "Custom":

(Picture quality is not original as all screenshots were scaled down to fit into the content window).
Chose a name for your virtual machine: (I chose Seattle because I liked the city with its cool tower):

Next it wants a datastore to store virtual machine data. Choose whatever you think is appropriate in your installation:

As we're using ESX we can choose Virtual Machine Version 7. Choose the old format only if you have to exchange virtual machine data with ESX 3!

Next select "Linux" and "Red Hat Enterprise Server 5 (64bit)" (I assume we're installing the 64bit version):

The next screen asks you how many virtual CPUs you want for your virtual machine. As Redhat 5 always installs an SMP kernel you may leave this to "1" - you can change that at any time afterwards.

Choose RAM size. It says 384 MB are recommended but using one Tomcat server this will already swap. Take 512 MB as minimum.

On the next screen you have to choose network features. Please use emulated cards during installation - you may change that later. E1000 (Intel EE 1000) is well supported by Redhat:

Choose disk size: My standard VM disk size is 15 GB (data is always on a separate volume):

Be sure to select "SCSI (0:0)" as Virtual Device Node!

Next the vSphere Console shows you a summary of the settings you made:

After the virtual machine has been created, right-click on your new machine (here "Seattle") and select "Open Console":

Press on the green "play" button. The machine begins to start. As it can't find any boot volume it tries to use PXE. Click on the button to the right (a CD icon with a wrench). Select "CD/DVD Drive 1" and then "Connect to ISO image on a datastore...". If your Redhat 5 CD image is not on a datastore then you're free to chose "Connect to ISO image on local disk...". I'm having all supported ISO installation images on a datastore:

As I chose the datastore, a requester opened to choose the right ISO image:

After "OK" you have to press the RETURN key twice while the mouse cursor is inside the black console screen. It will boot from the ISO image then:

Type "linux text" at the boot prompt and continue to install a normal Redhat 5 Server. The Installation procedure will not be different than using a real PC.
Attention: At this screen, deselect "Virtualization" (Redhat does not detect that it is running on a vmware virtual machine, don't install unneeded software):

After installation we have to install the VMWare tools. Select "VM" -> "Guest" -> "Install/Upgrade VMware tools":

Login as root and type:
Should give something similar to that:
Install the RPM file:
Start the configuration:
etc...
At the end a message should appear:
Now things are getting a little bit trickier - but only a little bit. I hope you're familiar with vi.
Do the following:
The contents of this file are normally something like that:
Just add the following:
So - in my case (freshly installed Redhat 5 Enterprise Server) the result is:
Now it is important to know your actual running kernel version.
Type:
The result is something like this:
Linux dhcp1
The actual version is bold and underline in my example! If you know your version, just do this:
You see the kernel version appearing?
Now enter this command:
The bold underlined part again has to be the same as with your kernel version (uname -a above).
It will print many lines but be sure that this line is included:
And yes, you're on track if this line appears!
Shutdown your virtual machine:
In the vSphere client, choose "Edit Settings" by right-clicking on your virtual machine, then click on "SCSI controller 0". Click on "Change Type...":

Type OK and save the setting.
Reboot your virtual machine (the green "play" button im your console) and it should perfectly. If it does NOT boot, then the "pvscsi"-Line did not appear at the mkinitrd command above!
Important: Doing updates
BEFORE DOING AN UPDATE WHICH ALTERS THE KERNEL VERSION (KERNEL UPDATE), APPLY THE UPDATE, SHUTDOWN, CHANGE THE SCSI TYPE IN VSPHERE CONSOLE TO "LSI LOGIC SAS", BOOT AND REINSTALL VMWARE TOOLS AS DESCRIBED ABOVE! MAKE A NEW INITRD AS DESCRIBED ABOVE! SHUTDOWN! CHANGE THE CONTROLLER TYPE TO PARAVIRTUAL AGAIN AND REBOOT.
In case your new kernel is not directly supported by VMWare tools you have to install kernel source and compiler:
This is not terrible, it's supported by VMware and no reason to get sleepless nights.
Just do the following:
Login as root.
Execute the following commands (only once - for each subsequent update these source components are also upgraded so no need to reinstall them!):
(accept dependencies)
And you're ready! Invoking
Will automatically recompile kernel modules for your kernel!
The next steps are as in the initial setup descibed above!
Good luck and feel free to leave your comments here!
My tip:
- Install with emulated hardware first
- Install vmware tools
- Modify the initial ramdisk (initrd)
- Shutdown your virtual redhat system
- Change controller type to PVSCSI
- reboot
So let's begin.
Create a new VM, choose "Custom":

(Picture quality is not original as all screenshots were scaled down to fit into the content window).
Chose a name for your virtual machine: (I chose Seattle because I liked the city with its cool tower):

Next it wants a datastore to store virtual machine data. Choose whatever you think is appropriate in your installation:

As we're using ESX we can choose Virtual Machine Version 7. Choose the old format only if you have to exchange virtual machine data with ESX 3!

Next select "Linux" and "Red Hat Enterprise Server 5 (64bit)" (I assume we're installing the 64bit version):

The next screen asks you how many virtual CPUs you want for your virtual machine. As Redhat 5 always installs an SMP kernel you may leave this to "1" - you can change that at any time afterwards.

Choose RAM size. It says 384 MB are recommended but using one Tomcat server this will already swap. Take 512 MB as minimum.

On the next screen you have to choose network features. Please use emulated cards during installation - you may change that later. E1000 (Intel EE 1000) is well supported by Redhat:

Now select a "real" emulated SCSI controller. For fastest installation choose "LSI Logic SAS":


Choose disk size: My standard VM disk size is 15 GB (data is always on a separate volume):

Be sure to select "SCSI (0:0)" as Virtual Device Node!

Next the vSphere Console shows you a summary of the settings you made:

After the virtual machine has been created, right-click on your new machine (here "Seattle") and select "Open Console":

Press on the green "play" button. The machine begins to start. As it can't find any boot volume it tries to use PXE. Click on the button to the right (a CD icon with a wrench). Select "CD/DVD Drive 1" and then "Connect to ISO image on a datastore...". If your Redhat 5 CD image is not on a datastore then you're free to chose "Connect to ISO image on local disk...". I'm having all supported ISO installation images on a datastore:

As I chose the datastore, a requester opened to choose the right ISO image:

After "OK" you have to press the RETURN key twice while the mouse cursor is inside the black console screen. It will boot from the ISO image then:

Type "linux text" at the boot prompt and continue to install a normal Redhat 5 Server. The Installation procedure will not be different than using a real PC.
Attention: At this screen, deselect "Virtualization" (Redhat does not detect that it is running on a vmware virtual machine, don't install unneeded software):

After installation we have to install the VMWare tools. Select "VM" -> "Guest" -> "Install/Upgrade VMware tools":

Login as root and type:
[root@dhcp1 ~]# mkdir /cdrom
[root@dhcp1 ~]# mount -t iso9660 /dev/hdc /cdrom
mount: block device /dev/hdc is write-protected, mounting read-only
[root@dhcp1 ~]# cd /cdrom
[root@dhcp1 cdrom]# ls -alShould give something similar to that:
total 173501
dr-xr-xr-x 2 root root 2048 May 1 03:20 .
drwxr-xr-x 26 root root 4096 Sep 24 18:49 ..
-r--r--r-- 1 root root 1709 May 1 03:17 manifest.txt
-r--r--r-- 1 root root 89139204 May 1 03:19 VMwareTools-4.0.0-164009.i386.rpm
-r--r--r-- 1 root root 88512941 May 1 03:14 VMwareTools-4.0.0-164009.tar.gzInstall the RPM file:
[root@dhcp1 cdrom]# rpm -i VMwareTools-4.0.0-164009.i386.rpm
The installation of VMware Tools 4.0.0 for Linux completed successfully.
You can decide to remove this software from your system at any time by
invoking the following command: "rpm -e VMwareTools".
Before running VMware Tools for the first time, you need to
configure it for your running kernel by invoking the
following command: "/usr/bin/vmware-config-tools.pl".
Enjoy,
--the VMware teamStart the configuration:
[root@dhcp1 cdrom]# /usr/bin/vmware-config-tools.pl
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ OK ]
Unmounting HGFS shares: [ OK ]
Guest filesystem driver: [ OK ]
The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vmmemctl module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vmhgfs module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-x86_64smp-RHEL5 - vmxnet module loads perfectly into the
running kernel.etc...
At the end a message should appear:
The configuration of VMware Tools 4.0.0 build-164009 for Linux for this running
kernel completed successfully.Now things are getting a little bit trickier - but only a little bit. I hope you're familiar with vi.
Do the following:
[root@dhcp1 cdrom]# vi /etc/modprobe.confThe contents of this file are normally something like that:
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias eth0 e1000
alias scsi_hostadapter2 ata_piix
# Added by VMware Tools
install pciehp /sbin/modprobe -q --ignore-install acpiphp; /bin/true
install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;/sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;/bin/true
alias char-major-14 sb
options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330Just add the following:
# Load PVSCSI (Paravirtual SCSI VMWare)
alias scsi_hostadapter3 pvscsiSo - in my case (freshly installed Redhat 5 Enterprise Server) the result is:
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias eth0 e1000
alias scsi_hostadapter2 ata_piix
# Added by VMware Tools
install pciehp /sbin/modprobe -q --ignore-install acpiphp; /bin/true
install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;/sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;/bin/true
alias char-major-14 sb
options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
# Load PVSCSI (Paravirtual SCSI VMWare)
alias scsi_hostadapter3 pvscsiNow it is important to know your actual running kernel version.
Type:
[root@dhcp1 cdrom]# uname -aThe result is something like this:
Linux dhcp1
2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/LinuxThe actual version is bold and underline in my example! If you know your version, just do this:
[root@dhcp1 cdrom]# cp /boot/initrd-2.6.18-164.el5.img /boot/initrd-2.6.18-164.el5.img.bakYou see the kernel version appearing?
Now enter this command:
[root@dhcp1 cdrom]# mkinitrd -v -f /boot/initrd-2.6.18-164.el5.img 2.6.18-164.el5The bold underlined part again has to be the same as with your kernel version (uname -a above).
It will print many lines but be sure that this line is included:
Looking for deps of module pvscsi: scsi_modAnd yes, you're on track if this line appears!
Shutdown your virtual machine:
[root@dhcp1 cdrom]# haltIn the vSphere client, choose "Edit Settings" by right-clicking on your virtual machine, then click on "SCSI controller 0". Click on "Change Type...":

Choose "VMware paravirtual":


Type OK and save the setting.
Reboot your virtual machine (the green "play" button im your console) and it should perfectly. If it does NOT boot, then the "pvscsi"-Line did not appear at the mkinitrd command above!
Important: Doing updates
BEFORE DOING AN UPDATE WHICH ALTERS THE KERNEL VERSION (KERNEL UPDATE), APPLY THE UPDATE, SHUTDOWN, CHANGE THE SCSI TYPE IN VSPHERE CONSOLE TO "LSI LOGIC SAS", BOOT AND REINSTALL VMWARE TOOLS AS DESCRIBED ABOVE! MAKE A NEW INITRD AS DESCRIBED ABOVE! SHUTDOWN! CHANGE THE CONTROLLER TYPE TO PARAVIRTUAL AGAIN AND REBOOT.
In case your new kernel is not directly supported by VMWare tools you have to install kernel source and compiler:
This is not terrible, it's supported by VMware and no reason to get sleepless nights.
Just do the following:
Login as root.
Execute the following commands (only once - for each subsequent update these source components are also upgraded so no need to reinstall them!):
[root@dhcp1 ~]# yum install kernel-devel
[root@dhcp1 ~]# yum install kernel-headers
[root@dhcp1 ~]# yum install gcc(accept dependencies)
[root@dhcp1 ~]# yum install ncurses-develAnd you're ready! Invoking
[root@dhcp1 ~]# /usr/bin/vmware-config-tools.plWill automatically recompile kernel modules for your kernel!
The next steps are as in the initial setup descibed above!
Good luck and feel free to leave your comments here!
0 TrackBacks
Listed below are links to blogs that reference this entry: Installing Redhat Enterprise Server 5 in VMWare with PVSCSI (paravirtual SCSI).
TrackBack URL for this entry: http://southbrain.com/mt/mt-tb.cgi/109

I found that re-running vmware-config-tools.pl (for instance, after a kernel upgrade, to get the pvscsi and vmxnet3 drivers) will overwrite the modprobe.conf file, removing the line that was added -- regardless of whether the line came before or after the items added by VMware Tools. You need to add the line into /etc/modprobe.conf.BeforeVMwareToolsInstall if you want to prevent this from happening.