<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tork Wrench &#187; pvscsi</title>
	<atom:link href="http://www.torkwrench.com/tag/pvscsi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.torkwrench.com</link>
	<description>Things I learnt today, working on IBM Lotus Web Content Management.</description>
	<lastBuildDate>Wed, 04 Jan 2012 22:33:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to use the PVSCSI driver on Ubuntu Lucid</title>
		<link>http://www.torkwrench.com/2011/02/07/how-to-use-the-pvscsi-driver-on-ubuntu-lucid/</link>
		<comments>http://www.torkwrench.com/2011/02/07/how-to-use-the-pvscsi-driver-on-ubuntu-lucid/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 05:31:00 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[pvscsi]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=304</guid>
		<description><![CDATA[How to get the paravirtualized scsi driver going on Ubuntu 10.04.  <a href="http://www.torkwrench.com/2011/02/07/how-to-use-the-pvscsi-driver-on-ubuntu-lucid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the most <a href="http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/">popular posts</a> on the site has been about how to enable the paravirtualized scsi driver (pvscsi) on your root partition in a RHEL system. I wrote some pretty complex steps about how you could automate this through RHEL&#8217;s kickstart system. A reader response to the prompted me to try it out pvscsi on Ubuntu Server (10.04) . Well there&#8217;s not much to say &#8211; <em>it just works!</em> .</p>
<p>When you create your VM in vSphere, simply select the &#8220;Custom&#8221; option, rather than the &#8220;Typical&#8221; one as custom allows you to pick your disk type. When the disk type radio button comes up select PVSCSI &#8211; and that&#8217;s it. When you run the Ubuntu install, the installation process will see the disk as normal, and there it is, you&#8217;re done.<br />
<a href="http://www.torkwrench.com/wp-content/uploads/2010/01/pvscsi-esx.png"><img class="aligncenter size-full wp-image-185" title="pvscsi-esx" src="http://www.torkwrench.com/wp-content/uploads/2010/01/pvscsi-esx.png" alt="Setting the SCSI Controller Type" width="460" height="340" /></a></p>
<p>I&#8217;m not sure exactly why this this works in Ubuntu &#8211; whether the pvscsi driver has been added to a later version of the kernel, or if Ubuntu/Debian has patched the kernel to include support for it.</p>
<p>While we are on the subject of paravirtualized drivers, the vmxnet3 driver also works out of the box in the Ubuntu 10.04 install.</p>
<p>I&#8217;ll give it a try on RHEL6 soon, I haven&#8217;t tried it yet and am curious if it works in the same way.</p>
<p><del datetime="2011-02-11T01:42:33+00:00">There are some caveats about pvscsi.</del><br />
<del datetime="2011-02-11T01:42:33+00:00"><br />
There are some very good reasons not to use it &#8211; first it&#8217;s not supported by VMware on the boot disk as described above, and secondly it <a href="http://vpivot.com/2010/02/04/pvscsi-and-low-io-workloads">should not be used in a low throughput environment.</a><br />
</del></p>
<p>Update: 11th Feb, 2011<br />
The gotchas around pvscsi has changed &#8211; according to <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1017652">this KB article</a> , the issue Scott identified with pvscsi in non intensive I/O workloads has gone away in vSphere 4.1, so  . Thanks to at Matt Liebowitz at thelowercasew.com for spotting this. You can read his post on it <a href="http://www.thelowercasew.com/more-vsphere-4-1-enhancements-welcome-back-pvscsi-driver">here.</a> . Matt asserts that the boot disk restriction is gone in 4.1 also, but it still unfortunately applies on Linux guests, according to this other <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1010398">KB article.</a> I would suspect this is because it has been so tricky to configure. With it being included out of the box in Ubuntu Server, maybe they will lift this restriction soon? Personally, since I am running a dev and test lab, I think I will switch over to it exclusively anyway. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2011/02/07/how-to-use-the-pvscsi-driver-on-ubuntu-lucid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing RHEL 5 using the VMware Paravirtualized SCSI driver (pvscsi)</title>
		<link>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/</link>
		<comments>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 02:24:32 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[pvscsi]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=184</guid>
		<description><![CDATA[How to install RHEL 5 with the VMware Paravirtualized SCSI driver embedded into the installation media, and then how to automate the installation using it <a href="http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>VMware ESX 4.0 offers a number of different SCSI disk controllers. One of the newer and more interesting ones is the paravirtualized scsi adapter. As with any type of paravirtualized  driver the paravirtualized scsi driver promises to be faster and use less CPU cycles than the other storage drivers, and since I/O performance is so important to overall system performance in virtualized environments, I thought it was worth a look. I don&#8217;t have any solid numbers about how it performs with WebSphere Portal, but once I do you will be the first to know.</p>
<p>The new driver has a number of drawbacks, most notably it is not supported as a boot device. VMware expect you to configure your OS on one &#8216;normal&#8217; drive and then install a secondary drive with the paravirtualized adaptor. As well as being a pain from a management standpoint , it also ignores the speed increases that you would derive from having the OS on this faster device.</p>
<p>The method below will allow you to install Red Hat Enterprise 5.4 on your primary boot device using the pvscsi driver, and includes steps about how to automate the process with Redhat&#8217;s excellent kickstart system. If you are just interested in doing this on one system, <a href="http://vmadmin.nt.com.au/?p=28" target="_blank">I would follow these steps instead .</a> My steps are good if you want to automate this procedure over many machines, but it&#8217;s probably overkill if you just want to try pvscsi on one machine. Hopefully these steps will be outdated soon when the pvscsi module makes it into the regular mainline kernel, which looks like it might happen in 2.6.33!</p>
<p>1. Create a new VM from the vSphere Console in the usual way.</p>
<p>2. Click edit settings on the new VM and select the SCSI controller 0 device, then up on the right hand side pane, click Change SCSI Controller Type and select VMware Paravirtual.</p>
<p><img class="aligncenter size-full wp-image-185" title="pvscsi-esx" src="http://www.torkwrench.com/wp-content/uploads/2010/01/pvscsi-esx.png" alt="pvscsi-esx" width="460" height="340" /></p>
<p>Now we must create boot media. I use iso images and the virtual cdrom device in VMware, but you could modify these steps and use them with PXE booting or USB booting quite easily. The process here is to add the pvscsi kernel module to the boot disk, so the RHEL installer can see the VMware disk.</p>
<p>3. Grab the prebuilt boot.iso from the images/ subdirectory and unextract it. You can do this by running:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mount -o loop boot.iso /mnt/boot<br />
<br />
cd /mnt/boot<br />
<br />
mkdir ~/boot<br />
<br />
cp -R * ~/boot<br />
<br />
cd ~/boot</div></div>
<p>You should now have an isolinux subdirectory in this directory.</p>
<p>4. Extract initrd.img . This is the initial ram disk which contains the boot files that the installer requires to run. Create a temp directory and extract it into it.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mkdir tmp<br />
cd tmp<br />
gzip -dc ../initrd.img | cpio -ivd</div></div>
<p>5. Now we need to extract (again!) the modules archive, so we can add pvscsi to it.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd modules<br />
gzip -dc modules.cgz | cpio -ivd</div></div>
<p>This will make a new subdirectory which will have the same name as your kernel version. Mine looks like this :<br />
2.6.18-164.el5/x86_64<br />
If you are running a 32 bit kernel or a different version of Redhat, yours will look slightly different.</p>
<p>6. Extract the VMware tools rpm and copy the precompiled driver into the modules directory. Make another temp directory and copy the Vmware Tools rpm into it. You should be able to get the VMware tools rpm from your ESX host or from the VMware website.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm2cpio VMwareTools-4.0.0-latest.i386.rpm | cpio -idmv<br />
find . -name pvscsi.o | grep 2.6.18-164.el5 (this will return the path to where the driver is - the one below is my path)<br />
cp usr/lib/vmware-tools/modules/binary/bld-2.6.18-8.el5-x86_64smp-RHEL5/objects/pvscsi.o [temp dir from step 4]/modules/2.6.18-164.el5/x86_64/pvscsi.o<br />
cp usr/lib/vmware-tools/modules/binary/bld-2.6.18-8.el5-x86_64smp-RHEL5/objects/pvscsi.o [temp dir from step 4]/modules/2.6.18-164.el5/x86_64/pvscsi.ko</div></div>
<p>Then delete the temporary VMware tools directory.</p>
<p>7. Now we need to edit a bunch of text files that are in the modules subdirectory so Redhat can find the new driver.</p>
<p>At the bottom of module-info add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pvscsi<br />
&nbsp; &nbsp; &nbsp; &nbsp; scsi<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;VMware PVSCSI driver&quot;</div></div>
<p>At the bottom of modules.alias add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">alias pci:v000015ADd000007C0sv*sd*bc*sc*i* pvscsi</div></div>
<p>At the bottom of modules.dep add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pvscsi: scsi_mod</div></div>
<p>In pci.ids, search for &#8217;15ad&#8217; . You will see an entry for a few  VMware devices. To this list add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">07c0 &nbsp;PVSCSI SCSI Controller</div></div>
<p>The whole stanza will look something like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">15ad &nbsp;VMware<br />
&nbsp; &nbsp; &nbsp; &nbsp; 0405 &nbsp;SVGA II Adapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; 0710 &nbsp;SVGA Adapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; 07c0 &nbsp;PVSCSI SCSI Controller</div></div>
<p>8. Now we need to compress everything. First the modules.cgz (and still in the modules directory) :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find 2.6.18-164.el5 | cpio -H newc -ov | gzip -9 -c - &gt; modules.cgz<br />
rm -rf 2.6.18-164.el5</div></div>
<p>9. Compress the initrd.img</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ..<br />
find . | cpio -H newc -ov | gzip -9 -c - &gt; initrd.img</div></div>
<p>10. Everything is compressed up again, now to make a boot cd.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ..<br />
mkisofs -o pvscsi.iso -V pvscsi -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -T .</div></div>
<p>11. Copy pvscsi.iso to your ESX datastore and click edit settings on your paravirtualized guest vm. Set the cdrom to boot from pvscsi.iso . </p>
<p>This is enough to get the installation image to boot correctly with the pvscsi driver, but what will happen next is that the server will reboot using the regular kernel, and it won&#8217;t have the pvscsi driver available to it, so the machine will not reboot. We need to install and configure the VMware tools rpm after the RHEL install so when the machine reboots it will have access to the pvscsi driver file. </p>
<p>If you don&#8217;t want to use kickstart to do this, and the end of the install, drop into a shell by typing ALT-CTRL-F2 and download the VMware tools rpm from a local webserver, or you could copy it to the guest VM using scp or something. For example :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm -Uvh http://yourwebserver/vmwaretools.rpm<br />
vmware-config-tools.pl --default</div></div>
<p>Reboot and you should be good. Read on if you would like to automate this procedure.</p>
<p>12.The easiest way to create a kickstart file is to run through a normal install and then to copy the ~/anaconda-ks.cfg file from the server, which will have all your settings saved in it. <a href="http://www.torkwrench.com/wp-content/uploads/2010/01/example2.cfg">Or look at my example. </a> . All you should need to do here is change the url, key, hostname, rootpw parameters and edit the url to the vmware tools rpm to something valid for your environment and you should be good to go.</p>
<p>Stay tuned for performance numbers to show if any of this is even worth it! <img src='http://www.torkwrench.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

