<?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>phaq &#187; Virtualization</title>
	<atom:link href="http://phaq.phunsites.net/category/howtos/virtualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://phaq.phunsites.net</link>
	<description>my daily IT madness</description>
	<lastBuildDate>Mon, 30 Jan 2012 10:07:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Convert RAW partition to VDI image with VirtualBox on OS X</title>
		<link>http://phaq.phunsites.net/2011/09/26/convert-raw-partition-to-vdi-image-with-virtualbox-on-os-x/</link>
		<comments>http://phaq.phunsites.net/2011/09/26/convert-raw-partition-to-vdi-image-with-virtualbox-on-os-x/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 08:59:54 +0000</pubDate>
		<dc:creator>gdelmatto</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=739</guid>
		<description><![CDATA[Some time ago, I set up a multi-boot environment on my Mac, where I could use my BootCamp-Partition for both booting Windows natively on the Mac as well as virtualized from within VirtualBox. Now, I wanted to create a clone of the RAW partition to do some testing. As usual, there&#8217;s more than one way [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago, I <a href="http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/">set up a multi-boot environment on my Mac</a>, where I could use my BootCamp-Partition for both booting Windows natively on the Mac as well as virtualized from within VirtualBox.</p>
<p>Now, I wanted to create a clone of the RAW partition to do some testing.<br />
<span id="more-739"></span><br />
As usual, there&#8217;s more than one way to accomplish this. I&#8217;m going with the CLI way, as it&#8217;s feast and easier in my opinion.</p>
<p>Before you start with this anyway, I shall recommed you first to take a backup and second, make sure you don&#8217;t have lot&#8217;s of temp files WITHIN the BOOTCAMP partition. Also it&#8217;s a good idea, to defragment it first. This will save you some additional space and the converted VDI disk will be slightly smaller at the end.</p>
<p>So, first we need to identify, which device number our BOOTCAMP partition resides in.<br />
Do this simply from a Terminal by running the command &#8216;diskutil info disk0&#8242; (If you have a standard setup, your setup should reside on &#8216;disk0&#8242;. If you do some remote/iSCSI booting or use an USB drive to boot from, then your disk-id may be different. This is beyond this topic.)</p>
<p><a href="http://phaq.phunsites.net/files/2011/09/rawconvert1.png" rel="lightbox[739]"><img src="http://phaq.phunsites.net/files/2011/09/rawconvert1-300x57.png" alt="" width="300" height="57" class="aligncenter size-medium wp-image-741" /></a></p>
<p>You can easily identify your BOOTCAMP partition, as it reads &#8220;Microsoft Basic Data&#8221; in it&#8217;s TYPE description. Now look our for the last row which says &#8220;IDENTIFIER&#8221;.<br />
Note the name it says there (&#8216;disk0s4&#8242; in my example).</p>
<p>Now you may take the slow and easy way or the fast and complicated way. The later being the more geek-like approach <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h4>The slow and easy way</h4>
<p>Now change to a temporary directory, where you have enough room to store the disk image. Enough room in our case means, twice as much as your BOOTCAMP partition is in size. In my example, it&#8217;s roughly around 35G, so you should have some 70G free at least. You can always check your remaining free disk space on the commad line with the &#8216;df&#8217; command:</p>
<p><code><br />
new-host-2:Image Gianpaolo$ df -h<br />
Filesystem                          Size   Used  Avail Capacity  Mounted on<br />
/dev/disk0s2                      179Gi   62Gi   111Gi    79%    /<br />
devfs                              128Ki  128Ki    0Bi   100%    /dev<br />
map -hosts                           0Bi    0Bi    0Bi   100%    /net<br />
map auto_home                        0Bi    0Bi    0Bi   100%    /home<br />
</code></p>
<p>Then I created a new directly called &#8216;Image&#8217; below my home directory to hold the image.</p>
<p><a href="http://phaq.phunsites.net/files/2011/09/rawconvert2.png" rel="lightbox[739]"><img src="http://phaq.phunsites.net/files/2011/09/rawconvert2-300x22.png" alt="" width="300" height="22" class="aligncenter size-medium wp-image-742" /></a><br />
To actually dump the RAW partition, you need to have super-user privileges. So it&#8217;s easiest to run &#8216;sudo bash&#8217; to get a super-user shell like this:</p>
<p><code><br />
sudo bash<br />
</code></p>
<p>Then run this command to dump the RAW partition into a file. Remember to use the correct IDENTIFIER as noted above (&#8216;disk0s4&#8242; in my case).</p>
<p><code><br />
dd if=/dev/disk0s4 of=Win7RAW.dd<br />
</code></p>
<p><a href="http://phaq.phunsites.net/files/2011/09/rawconvert3.png" rel="lightbox[739]"><img src="http://phaq.phunsites.net/files/2011/09/rawconvert3-300x30.png" alt="" width="300" height="30" class="aligncenter size-medium wp-image-743" /></a></p>
<p>This will take ample of time. Unfortunally, &#8216;dd&#8217; does not print it&#8217;s progress to the console. So if you want to know the progress, you can always open a second Terminal an run these command from there:</p>
<p><code><br />
sudo bash<br />
while [ : ] ; do killall -SIGINFO dd &amp;&amp; sleep 5 || exit ; done<br />
</code></p>
<p>This will send a &#8216;SIGINFO&#8217; signal to &#8216;dd&#8217; every five seconds and cause it to print it&#8217;s progress to the Terminal as shown below. The loop will terminate on it&#8217;s own once &#8216;dd&#8217; is finished.</p>
<pre>8925687808 bytes transferred in 373.295433 secs (23910520 bytes/sec)
17634581+0 records in
17634580+0 records out</pre>
<p>When you&#8217;re done with capturing the image, it&#8217;s time to convert it to a virtual disk usage for VirtualBox.<br />
Do so by the &#8216;VBoxManage&#8217; command like this:</p>
<p><code><br />
VBoxManage  convertfromraw Win7RAW.dd Win7.vdi --format VDI<br />
</code></p>
<p>This will convert the RAW image into a &#8216;VDI&#8217; disk. Additionally, if the RAW partition space was not completely filled up, your VDI disk should end up considerably smaller than the original RAW image.</p>
<p>As soon as this conversion is finished, you can delete the RAW image.</p>
<p><code><br />
rm Win7RAW.dd<br />
</code></p>
<p>As you see, this method is straigth forward, but takes double the space and almost double the time to create the VDI image.<br />
Look into the next method to gain some speed, but also a bit more complexity <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h4>The fast and complicated way</h4>
<p>So you end up here. Maybe because you want to spare some time, or simply don&#8217;t have enough free disk space to hold two images.</p>
<p>So, let&#8217;s start again on the Terminal by gathering information. Remember the IDENTIFIER of the BOOTCAMP partition? It was &#8216;disk0s4&#8242; for me &#8230;</p>
<p>Now let&#8217;s get some detail about this partition, as we need to know it&#8217;s exact size in bytes.<br />
The &#8216;diskutil&#8217; command can provide us with this information, but only if it&#8217;s run in so called &#8216;plist-mode&#8217;. By invoking &#8216;diskutil&#8217; like this, you&#8217;ll end up with an XML-formated output with lots of detail information.</p>
<p><code><br />
bash-3.2# diskutil info -plist /dev/disk0s4<br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;<br />
&lt;plist version="1.0"&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;Bootable&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;BusProtocol&lt;/key&gt;<br />
&lt;string&gt;SATA&lt;/string&gt;<br />
&lt;key&gt;CanBeMadeBootable&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;CanBeMadeBootableRequiresDestroy&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;Content&lt;/key&gt;<br />
&lt;string&gt;Microsoft Basic Data&lt;/string&gt;<br />
&lt;key&gt;DeviceBlockSize&lt;/key&gt;<br />
&lt;integer&gt;512&lt;/integer&gt;<br />
&lt;key&gt;DeviceIdentifier&lt;/key&gt;<br />
&lt;string&gt;disk0s4&lt;/string&gt;<br />
&lt;key&gt;DeviceNode&lt;/key&gt;<br />
&lt;string&gt;/dev/disk0s4&lt;/string&gt;<br />
&lt;key&gt;DeviceTreePath&lt;/key&gt;<br />
&lt;string&gt;IODeviceTree:/PCI0@0/SATA@1F,2/PRT0@0/PMP@0&lt;/string&gt;<br />
&lt;key&gt;Ejectable&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;FilesystemName&lt;/key&gt;<br />
&lt;string&gt;NTFS&lt;/string&gt;<br />
&lt;key&gt;FilesystemType&lt;/key&gt;<br />
&lt;string&gt;ntfs&lt;/string&gt;<br />
&lt;key&gt;FilesystemUserVisibleName&lt;/key&gt;<br />
&lt;string&gt;Windows NT File System (NTFS)&lt;/string&gt;<br />
&lt;key&gt;FreeSpace&lt;/key&gt;<br />
&lt;integer&gt;0&lt;/integer&gt;<br />
&lt;key&gt;GlobalPermissionsEnabled&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;IOKitSize&lt;/key&gt;<br />
&lt;integer&gt;34688991232&lt;/integer&gt;<br />
&lt;key&gt;Internal&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;MediaName&lt;/key&gt;<br />
&lt;string&gt;BOOTCAMP&lt;/string&gt;<br />
&lt;key&gt;MediaType&lt;/key&gt;<br />
&lt;string&gt;Generic&lt;/string&gt;<br />
&lt;key&gt;MountPoint&lt;/key&gt;<br />
&lt;string&gt;&lt;/string&gt;<br />
&lt;key&gt;ParentWholeDisk&lt;/key&gt;<br />
&lt;string&gt;disk0&lt;/string&gt;<br />
&lt;key&gt;RAIDMaster&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;RAIDSlice&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;SMARTStatus&lt;/key&gt;<br />
&lt;string&gt;Verified&lt;/string&gt;<br />
&lt;key&gt;SolidState&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;SupportsGlobalPermissionsDisable&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;SystemImage&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;TotalSize&lt;/key&gt;<br />
&lt;integer&gt;34688991232&lt;/integer&gt;<br />
&lt;key&gt;VolumeName&lt;/key&gt;<br />
&lt;string&gt;BOOTCAMP&lt;/string&gt;<br />
&lt;key&gt;VolumeUUID&lt;/key&gt;<br />
&lt;string&gt;7028E14A-6363-480D-8AAD-57609FBA87CB&lt;/string&gt;<br />
&lt;key&gt;WholeDisk&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;key&gt;Writable&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;WritableMedia&lt;/key&gt;<br />
&lt;true/&gt;<br />
&lt;key&gt;WritableVolume&lt;/key&gt;<br />
&lt;false/&gt;<br />
&lt;/dict&gt;<br />
&lt;/plist&gt;<br />
<code></p>
<p>Look out for the keyword 'TotalSize' and the take the integer value it provides ('34688991232' in this example).</p>
<p>Now dump your RAW partition directly into a VDI image like this:</p>
<p><code><br />
dd if=/dev/disk0s4 | VBoxManage convertfromraw stdin Win7.vdi 34688991232 --format VDI<br />
</code></p>
<p><a href="http://phaq.phunsites.net/files/2011/09/rawconvert4.png" rel="lightbox[739]"><img src="http://phaq.phunsites.net/files/2011/09/rawconvert4-300x17.png" alt="" width="300" height="17" class="aligncenter size-medium wp-image-744" /></a></p>
<p>Further readings on this topic are located at <a href="https://forums.virtualbox.org/viewtopic.php?t=1966" target="_blank">VirtualBox Forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2011/09/26/convert-raw-partition-to-vdi-image-with-virtualbox-on-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Refining application shortcut for shared BootCamp / VirtualBox Windows VM</title>
		<link>http://phaq.phunsites.net/2011/05/24/refining-application-shortcut-for-shared-bootcamp-virtualbox-windows-vm/</link>
		<comments>http://phaq.phunsites.net/2011/05/24/refining-application-shortcut-for-shared-bootcamp-virtualbox-windows-vm/#comments</comments>
		<pubDate>Tue, 24 May 2011 20:38:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=634</guid>
		<description><![CDATA[Here&#8217;s a follow-up to my previous posts on sharing Windows 7 in BootCamp and VirtualBox and launching a VirtualBox VM directly through an icon shortcut. Concerning this topic I was asked if it&#8217;s possible to have the BootCamp partition only umounted upon startup of the Windows VM. My original post referred to creating the file [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a follow-up to my previous posts on <a href="http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox">sharing Windows 7 in BootCamp and VirtualBox</a> and <a href="http://phaq.phunsites.net/2011/03/06/starting-a-virtualbox-vm-through-a-shortcut-on-os-x">launching a VirtualBox VM directly through an icon shortcut</a>.</p>
<p>Concerning this topic I was asked if it&#8217;s possible to have the BootCamp partition only umounted upon startup of the Windows VM.<br />
<span id="more-634"></span><br />
My <a href="http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox">original post</a> referred to creating the file <strong>/etc/rc.local</strong> (or just editing it, if it already existed) and adding these commands in there:</p>
<p><code><br />
# grant VirtualBox permissions to Boot Camp partition<br />
#<br />
sudo chmod 777 /dev/disk0s3<br />
diskutil umount /Volumes/BOOTCAMP<br />
</code></p>
<p>The method described basically causes the system to grant permissions for raw partition access and permanently umount the BootCamp partition during bootup.<br />
If you however want the BootCamp partition only umounted upon startup of the Windows VM then please proceed as outlined below.</p>
<p>First of all, edit your <strong>/etc/rc.local</strong> to just include these lines:</p>
<p><code><br />
# grant VirtualBox permissions to Boot Camp partition<br />
#<br />
sudo chmod 777 /dev/disk0s3<br />
</code></p>
<p>This will cause the permission to be properly set upon boot of OS X, which is still required. The partition however will not be umounted and thus appear on your Finder as usual.</p>
<p>Now, assuming that you implemented <a href="http://phaq.phunsites.net/2011/03/06/starting-a-virtualbox-vm-through-a-shortcut-on-os-x/">the application shortcut</a> method, you need to change the application launcher like this from your Terminal:</p>
<p><code><br />
cd "VirtualBox VMs/Win7onMBP"</p>
<p>cat &gt; "Windows 7.app/Contents/MacOS/startvm" &lt;&lt; EOF<br />
#!/bin/sh<br />
diskutil umount /Volumes/BOOTCAMP<br />
[ ! -d /Volumes/Bootcamp ] &amp;&amp; /usr/bin/VBoxManage startvm Win7onMBP<br />
EOF<br />
</code></p>
<p>This will try to umount the BootCamp partition automatically when you click the icon.<br />
However, I&#8217;ve added an additional safety switch in there: I&#8217;m checking if the BootCamp partition is still mounted at /Volumes/BOOTCAMP. VirtualBox will only start if the BootCamp partition is not mounted. This will help in preventing ugly issues with partition access.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2011/05/24/refining-application-shortcut-for-shared-bootcamp-virtualbox-windows-vm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Starting a VirtualBox VM through a Shortcut on OS X</title>
		<link>http://phaq.phunsites.net/2011/03/06/starting-a-virtualbox-vm-through-a-shortcut-on-os-x/</link>
		<comments>http://phaq.phunsites.net/2011/03/06/starting-a-virtualbox-vm-through-a-shortcut-on-os-x/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 14:08:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=487</guid>
		<description><![CDATA[Why should I dare to launch the VirtualBox GUI each and every time when I in fact only want to start a particular VM? So my intent is to create an icon in the OS X dock which allows me to start my Windows VM directly with one single click. Not to say that I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Why should I dare to launch the VirtualBox GUI each and every time when I in fact only want to start a particular VM?<br />
So my intent is to create an icon in the OS X dock which allows me to start my Windows VM directly with one single click.<br />
Not to say that I&#8217;m a lazy person, but I dare to get around the GUI for such a simple and straight forward task <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Luckily VirtualBox provides us with everything needed to accomplish this through the &#8220;VBoxManage&#8221; command.<br />
The rest is just some (not so really) magic OS X trickery, as you&#8217;ll find out shortly.<br />
<span id="more-487"></span></p>
<h4>Download the Icon</h4>
<p>You&#8217;ll most likely want to have a decent icon for your application shortcut.<br />
Since OS X can&#8217;t work with standard Windows .ico files, you&#8217;ll need a special OS X icon (.icns format).<br />
As a convenience I provide you <a href="http://phaq.phunsites.net/files/2011/03/win7.icns_.zip">with my own</a> here. Just download to your &#8220;Downloads&#8221; folder. You will need to extract it first before you continue.</p>
<p>If you want to make your icon, <a href="http://macapper.com/2007/04/21/how-to-create-custom-icons-for-your-mac/" target="_blank">here&#8217;s a short howto</a> on this topic.</p>
<h4>Create the Application</h4>
<p>This task is entirely done from OS X Terminal, so let&#8217;s start a new Terminal.</p>
<p>If your Mac is set with defaults, your startup directory will be your home directory, which should evaluate to /Users/USERNAME.<br />
Mine is /Users/Gianpaolo for example. You can always check your current working directory using the &#8216;pwd&#8217; command.</p>
<p>I keep all my VMs under my home directory in a folder called &#8220;VirtualBox VMs&#8221;, where each VM again has its own directory.<br />
My Windows VM is called &#8220;Win7onMBP&#8221;, so I need to change to it&#8217;s directory first:</p>
<p><code><br />
cd "VirtualBox VMs/Win7onMBP"<br />
</code></p>
<p>As said earlier, the &#8220;VBoxManage&#8221; command will be used to launch the VM. As a convenience I create a real OS X application shortcut, which can be used like every other application, e.g. dragged onto the OS X dock. This offers a maximum of integration into the Finder as possible. Though it may seem a bit more complicated to setup, you&#8217;re actually better of with this method than with tradional aliases.</p>
<p>Just paste these lines below directly into your Terminal to create the application and all of it&#8217;s dependencies.<br />
For it work properly, please make sure you downloaded my icon file to your Downloads folder as &#8220;win7.icns&#8221;.</p>
<p><code><br />
mkdir -p "Windows 7.app"<br />
mkdir -p "Windows 7.app/Contents"<br />
mkdir -p "Windows 7.app/Contents/MacOS"<br />
mkdir -p "Windows 7.app/Contents/Resources"</code></p>
<p><code>cp ~/Downloads/win7.icns "Windows 7.app/Contents/Resources"</p>
<p>cat &gt; "Windows 7.app/Contents/MacOS/startvm" &lt;&lt; EOF<br />
#!/bin/sh<br />
/usr/bin/VBoxManage startvm Win7onMBP<br />
EOF</p>
<p>chmod 755 "Windows 7.app/Contents/MacOS/startvm"</p>
<p></code></p>
<p><code>cat &gt; "Windows 7.app/Contents/Info.plist" &lt;&lt; EOF<br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;<br />
&lt;plist version="1.0"&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;CFBundleExecutable&lt;/key&gt;<br />
&lt;string&gt;startvm&lt;/string&gt;<br />
&lt;key&gt;CFBundleIconFile&lt;/key&gt;<br />
&lt;string&gt;win7.icns&lt;/string&gt;<br />
&lt;/dict&gt;<br />
&lt;/plist&gt;<br />
EOF<br />
</code></p>
<p>Here&#8217;s a screenshot of my Terminal transcript:</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/vbox1.png" rel="lightbox[487]"><img class="aligncenter size-medium wp-image-496" title="vbox1" src="http://phaq.phunsites.net/files/2011/03/vbox1-300x150.png" alt="" width="300" height="150" /></a></p>
<h4>Add the Application to the Dock</h4>
<p>As said before, I want the application icon in my dock. So here&#8217;s how to do it. For this you won&#8217;t need Terminal anymore, so you can safely close it now. Instead you&#8217;ll need to fire up Finder and navigate to your VM directory. Find the &#8220;Windows 7&#8243; app created earlier and select it.<br />
Then simply drag it onto the OS X dock.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/vbox2.png" rel="lightbox[487]"><img class="aligncenter size-medium wp-image-497" title="vbox2" src="http://phaq.phunsites.net/files/2011/03/vbox2-300x178.png" alt="" width="300" height="178" /></a></p>
<p>Voilà, you&#8217;re done.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/vbox3.png" rel="lightbox[487]"><img class="aligncenter size-medium wp-image-498" title="vbox3" src="http://phaq.phunsites.net/files/2011/03/vbox3-300x26.png" alt="" width="300" height="26" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2011/03/06/starting-a-virtualbox-vm-through-a-shortcut-on-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Choppy VirtualBox Performance on MacBook Pro with Core i7</title>
		<link>http://phaq.phunsites.net/2011/03/06/choppy-virtualbox-performance-on-macbook-pro-with-core-i7/</link>
		<comments>http://phaq.phunsites.net/2011/03/06/choppy-virtualbox-performance-on-macbook-pro-with-core-i7/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 00:51:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=480</guid>
		<description><![CDATA[So you finally own one of these newly released Apple MacBook Pro with fancy Core i7 Quad-Core CPU? Then you fire up your VirtualBox VM and are disappointed about the sloppy performance? Luckily, it&#8217;s only a (hopefully short-lived) compatility issue. While this will surely need a final fix, here&#8217;s a temporary workaround&#8230; Apple decided to [...]]]></description>
			<content:encoded><![CDATA[<p>So you finally own one of these newly released Apple MacBook Pro with fancy Core i7 Quad-Core CPU?<br />
Then you fire up your VirtualBox VM and are disappointed about the sloppy performance?</p>
<p>Luckily, it&#8217;s only a (hopefully short-lived) compatility issue. While this will surely need a final fix, here&#8217;s a temporary workaround&#8230;<br />
<span id="more-480"></span><br />
Apple decided to boot the x86_64 64-bit kernel by default on Mac Pro (mid 2010) and MacBook Pro (early 2011).</p>
<p>Unfortunately there seems to be an issue between VirtualBox and OS X using the 64-bit kernel on the new Sandy-Bridge Systems, which causes poor VirtualBox performance.</p>
<p>If you suspect this to be the case, run &#8220;System Profiler&#8221;, which you find either through Spotlight or in <strong>Apple-Menu -> About this Mac -> More Information</strong>. Click the &#8220;Software&#8221; item and check for the &#8220;64-bit Kernel and Extensions&#8221;. If it reads &#8220;Yes&#8221;, you&#8217;re running the 64-bit kernel and are likely to be affected by this issue.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/osxkern.png" rel="lightbox[480]"><img src="http://phaq.phunsites.net/files/2011/03/osxkern-300x149.png" alt="" title="osxkern" width="300" height="149" class="aligncenter size-medium wp-image-481" /></a></p>
<p>To fix the issue for now, set OS X to boot using the 32-bit kernel.<br />
Open a &#8220;Terminal&#8221; and run this command to do so:</p>
<p><code><br />
sudo systemsetup -setkernelbootarchitecture i386<br />
</code></p>
<p>If you decide to use the 64-bit kernel at a later point, just revert it using this command:</p>
<p><code><br />
sudo systemsetup -setkernelbootarchitecture x86_64<br />
</code></p>
<p>Let&#8217;s hope, that this issue will get a proper fix soon. Until then, most of will live good enough using the 32-bit kernel, as it will also run perfectly using native 64-bit apps. It shall be noted though, that some apps, e.g. for graphics processing, may suffer a slightly degraded performance using the 32-bit kernel. Personally I&#8217;m not using such applications, so it&#8217;s fine for me. After all, my VirtualBox VMs run full speed again.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2011/03/06/choppy-virtualbox-performance-on-macbook-pro-with-core-i7/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sharing Windows 7 between Boot Camp and VirtualBox</title>
		<link>http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/</link>
		<comments>http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 11:36:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=454</guid>
		<description><![CDATA[I always used to have Windows installed through Boot Camp on my MacBook Pro. The reason for it being simple: I need it for some games On the other hand, I use OS X for my primary work, but again, sometimes there&#8217;s no way around Windows. So I had the same Windows installed again within [...]]]></description>
			<content:encoded><![CDATA[<p>I always used to have Windows installed through Boot Camp on my MacBook Pro. The reason for it being simple: I need it for some games <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
On the other hand, I use OS X for my primary work, but again, sometimes there&#8217;s no way around Windows. So I had the same Windows installed again within VirtualBox.</p>
<p>Well, what a waste of valuable disk space. So, after I got my new MacBook Pro, equipped with an SSD, I decided to go for it and share the Boot Camp partition between Windows 7 running natively and VirtualBox.<br />
<span id="more-454"></span><br />
Actually, there exist a lot of posts on this topic already. So here&#8217;s a few I came across:</p>
<ul>
<li><a href="http://luckyviplav.wordpress.com/2010/07/17/windows-7-on-mac-os-x-through-virtual-box/" target="_blank">Windows 7 on Mac OS X through Virtual Box</a></li>
<li><a href="http://buschi.org/2009/11/windows-7-bootcamp-installation-mit-virtual-box-nutzen/" target="_blank">Windows 7 Bootcamp Installation mit Virtual Box nutzen (in german)</a></li>
<li><a href="http://www.kevinrockwood.info/2010/04/windows7-in-osx-with-bootcamp-and-virtualbox/" target="_blank">Windows7 in OSX with Bootcamp and Virtualbox</a></li>
<li><a href="http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-106-for-free.html" target="_blank">How to run Windows 7 under Mac OS X 10.6 for free</a></li>
</ul>
<p>The best and most complete one is IMHO <a href="http://luckyviplav.wordpress.com/2010/07/17/windows-7-on-mac-os-x-through-virtual-box/" target="_blank">luckypiplav&#8217;s howto</a>, as it already covers most of the issues and caveats.</p>
<p>So my today&#8217;s post will be sort of an aggregate of all these posts before. I&#8217;m not trying to duplicate, my focus is to show what I had to do to get my setup working for me.</p>
<p>To begin with, here&#8217;s a short summary of my specs:</p>
<ul>
<li>Apple MacBook Pro 15&#8243;, February 2011 model, equipped with an 120 GiB SSD instead of a 500 GiB hard drive</li>
<li>OS X 10.6.6 on HFS partition (80 GiB)</li>
<li>Windows 7 SP 1 on Boot Camp partition (40 GiB)</li>
</ul>
<h4>Install Windows 7 through Boot Camp</h4>
<p>I&#8217;m not going to loose big words on this. I used the Boot Camp assistant to prepare the hard drive for installation.<br />
My hard drive was split into a 80 GiB partition for OS X and a 40 GiB partition for Windows 7.<br />
The process is straight forward. For those not so familiar with it, <a href="http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-106-for-free.html" target="_blank">here&#8217;s a howto</a>.</p>
<p>After completing Windows 7 setup I first installed SP1 and all additional updates. I also activated the Windows 7 license. Then I booted right back into OS X.</p>
<h4>Setup RAW partition access</h4>
<p>Oh well, here&#8217;s some tech stuff to go through. This is also one of the things I dislike about all the other posts on this topic (sorry guys, I&#8217;m just honest): Everyone tells you to do some shell magic trickery, like write access to the partition device files. However, if your setup is only slightly different, you&#8217;re most likely doomed <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So, let&#8217;s start on looking up the partition information first. For this you need to launch Disk Utility first.<br />
My screen shots are from a german language OS X, but for the sake of demonstration purpose, this will be sufficient.</p>
<p>On the main window, click your Boot Camp partition first and the &#8220;Information&#8221; icon second.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img1.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img1.png" alt="" width="241" height="256" class="aligncenter size-full wp-image-456" /></a></p>
<p>This will reveal the partition information. The most important thing for us to work with, is the partition ID, which in my case reads &#8220;disk0s3&#8243; (first disk, 3rd slice). In most cases this will be identical for you, but chances are, that it&#8217;s not. If it reads something different for you, then use this instead.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img2.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img2-300x217.png" alt="" width="300" height="217" class="aligncenter size-medium wp-image-457" /></a></p>
<p>Now open up Terminal. Your starting directory in Terminal is usually your home directory, which evaluates to /Users/USERNAME. In my case it&#8217;s /Users/Gianpaolo. You can always verify your current location using the &#8220;pwd&#8221; (Print Working Directory) command.<br />
I store all my VM related stuff in my home directory in a folder called &#8220;VirtualBox VMs&#8221;, so I change to this directory and create a new folder for the new Windows 7 VM.</p>
<p><code><br />
cd "VirtualBox VMs"<br />
mkdir Win7onMBP<br />
cd Win7onMBP<br />
</code></p>
<p>Now, we need to grant permissions to the partition we inspected before. Rembember, mine was &#8220;disk0s3&#8243;? Don&#8217;t forget to use the one, that correctly applies to your system.<br />
Note: You&#8217;ll be asked to enter your password to run this command:</p>
<p><code><br />
sudo chmod 777 /dev/disk0s3<br />
</code></p>
<p>You will also need to eject the Boot Camp volume, in case it&#8217;s mounted.<br />
Note: If you decided to format your Boot Camp partition with NTFS, then it won&#8217;t be accessible from OS X. In this case, it won&#8217;t be mounted as well. This is the case for me, so I effectively left this step out.</p>
<p><code><br />
diskutil umount /Volumes/BOOTCAMP<br />
</code></p>
<p>To have this settings parmenently applied to the system, you will need to add them to the local boot script. For this purpose, we use the &#8220;nano&#8221; command, a simple text editor which is simpler to use then &#8220;vi&#8221;. Just type and quit using the &#8220;CTRL-X&#8221; key stroke.<br />
Chances are that this file does not yet exist, but never mind, it&#8217;ll be created automatically.</p>
<p><code><br />
sudo nano /etc/rc.local<br />
</code></p>
<p>Add the following text to your rc.local file:</p>
<p><code><br />
# grant VirtualBox permissions to Boot Camp partition<br />
#<br />
chmod 777 /dev/disk0s3<br />
diskutil umount /Volumes/BOOTCAMP<br />
</code></p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img3.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img3-300x205.png" alt="" width="300" height="205" class="aligncenter size-medium wp-image-458" /></a></p>
<p>Again, if the Boot Camp volume is NTFS formatted, it won&#8217;t be mounted anyway, so the &#8220;diskutil&#8221; line can be omitted in this case.<br />
Type &#8220;CTRL-X&#8221; to save and exit.</p>
<p>Now it&#8217;s time to create the RAW disk file for use with VirtualBox. For this, you should be inside the VM directory we created previously. If in doubt, check this using the &#8220;pwd&#8221; command. From here, run the following command:</p>
<p><code><br />
sudo VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename win7raw.vmdk -partitions 3<br />
</code></p>
<p>Please note that this time, you won&#8217;t need to give the whole &#8220;disk0s3&#8243; string to the command above. Instead leave the last two characters away, just stating the physical disk name, which is &#8220;disk0&#8243;. You will need however to supply the partition number &#8220;3&#8243; taken from the &#8220;disk0s3&#8243; string to the &#8220;-partitions&#8221; argument as seen above.</p>
<h4>Create the VM</h4>
<p>Simply follow the instructions of <a href="http://luckyviplav.wordpress.com/2010/07/17/windows-7-on-mac-os-x-through-virtual-box/" target="_blank">luckyviplav&#8217;s howto</a>.</p>
<p>Important to note however: As of VirtualBox 4.x, the disk drives are always attached to a SATA controlled, as shown on the screenshot below.<br />
It is effectively required to remove the disk from the SATA controller and attach it to the IDE controller as primary master instead. Also do not forget to set the IDE controller type to &#8220;ICH6&#8243;, otherwise you&#8217;ll get a &#8220;STOP: 0x0000007B&#8221; BSOD (Inaccessible Boot Device)&#8221;.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img4.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img4-300x213.png" alt="" width="300" height="213" class="aligncenter size-medium wp-image-459" /></a></p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img5.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img5-300x212.png" alt="" width="300" height="212" class="aligncenter size-medium wp-image-460" /></a></p>
<p>I strongly recommend to keep the SATA controller in the VM profile. This will have the SATA drivers automatically installed during your first boot.</p>
<h4>First Boot and driver installation</h4>
<p>So you&#8217;re now ready to boot your VM off the Boot Camp partition.<br />
This will cetainly take a while as all the drivers need to be installed. Please take the chance to also install the VirtualBox guest additions.</p>
<p>Note: If you want 3D acceleration, you&#8217;ll need to install the VirtualBox drivers from safe mode (press F8 during boot to get into safe mode).</p>
<h4>Optional: Re-attach boot drive to SATA controller</h4>
<p>One of the most dramatic performance improvements for VirtualBox is the use of the virtual SATA controller in favor of the IDE controller.<br />
So after you successfully installed all the drivers including the VirtualBox guest additions to your VM shut it down first. Then open your VM settings in VirtualBox and navigate to the storage controller section. Remove the hard drive from the IDE controller and re-attach it to the SATA controller. I asked you to keep it there in the first place so the drivers could be installed, remember?</p>
<p>During the next boot, Windows will automatically pick up the disk from the SATA controller and use this for booting.</p>
<p>As a result overall performance in VirtualBox will be a little snappier as with the IDE controller, which also used a bit more CPU power than the SATA controller.</p>
<p>So here&#8217;s finally our Windows 7 VM bootet off the Boot Camp partition. And yet, it&#8217;s still possible to run the very same Windows 7 natively by booting directly into Boot Camp.</p>
<p><a href="http://phaq.phunsites.net/files/2011/03/img10.png" rel="lightbox[454]"><img src="http://phaq.phunsites.net/files/2011/03/img10-300x241.png" alt="" width="300" height="241" class="aligncenter size-medium wp-image-466" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2011/03/05/sharing-windows-7-between-boot-camp-and-virtualbox/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Use Sparse Files for FreeBSD jails?</title>
		<link>http://phaq.phunsites.net/2010/12/09/use-sparse-files-for-freebsd-jails/</link>
		<comments>http://phaq.phunsites.net/2010/12/09/use-sparse-files-for-freebsd-jails/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 15:58:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[jails]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=110</guid>
		<description><![CDATA[Thinking about FreeBSD jails and an elder post of mine about putting jails within loopback-mounted disk images to enforce disk quota, I asked myself if I should use sparse files or pre-allocated files as virtual disk image for jail-based userland separation. A sparse file designates a special file of a given size (e.g. 20 gigs), [...]]]></description>
			<content:encoded><![CDATA[<p>Thinking about FreeBSD jails and an <a href="http://phaq.phunsites.net/2006/06/22/implementing-filesystem-allocation-limits-on-freebsd-jails/">elder post of mine</a> about putting jails within loopback-mounted disk images to enforce disk quota, I asked myself if I should use sparse files or pre-allocated files as virtual disk image for jail-based userland separation.<br />
<span id="more-110"></span><br />
A sparse file designates a special file of a given size (e.g. 20 gigs), which is neither using nor reserving the whole disk space at once. It won&#8217;t effectively allocate disk blocks until data is written to the sparse file.</p>
<p>This comes in handy in creating disk images, which can be a very time consuming task.</p>
<p>Let&#8217;s look at the numbers of creating a 20gig file, which fills up available disk space at once but takes about five minutes to do so. Not to forget about the I/O load the task produces, which affects performance.</p>
<pre>
[root@localhost vz]# time dd if=/dev/zero of=test1.img bs=1024k count=20480
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 321.902 seconds, 66.7 MB/s

real    5m21.903s
user    0m0.021s
sys     0m55.282s
</pre>
<p>Creating a 20gig sparse file is done almost immediately, with the difference that disk blocks are not allocated right away.</p>
<pre>
[root@localhost ~]# dd of=test2.img bs=1024k count=0 seek=20480
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.4744e-05 seconds, 0.0 kB/s

real    0m0.002s
user    0m0.000s
sys     0m0.002s
</pre>
<p>Some possible drawbacks when using sparse files:</p>
<ul>
<li>Peformance degredation when having multiple sparse files to which data is written randomly. This may end up in heavy fragmentation as the sparse files are likely not to be written contiguously in that case, which in term causes slow read access performance</li>
<li>Race conditions when creating many sparse files which would exceed the available disk space (e.g. 20 sparse files of 20 gigs each, but the disk is only 200 gigs in size). To handle this, a special monitoring script would be needed to consider logical vs. physical space allocation.</li>
</ul>
<p>Up until today, I always used pre-allocated disk images, but at the expense of non-usable disk space.<br />
I think that sparse files might be a good choice actually, at least as long as there&#8217;s not much random data written to it, so the payload stays mostly identical over longer periods of time.<br />
For sure, a sparse file used as image for a jail-based database server is definitely a bad idea.<br />
Nevertheless, I&#8217;m keen to try and see, if this might be a considered options for some real-live scenarios.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2010/12/09/use-sparse-files-for-freebsd-jails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resurrecting Insignia SoftWindows95 for SGI IRIX</title>
		<link>http://phaq.phunsites.net/2009/10/20/resurrecting-insignia-softwindows95-for-sgi-irix/</link>
		<comments>http://phaq.phunsites.net/2009/10/20/resurrecting-insignia-softwindows95-for-sgi-irix/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 22:24:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/?p=149</guid>
		<description><![CDATA[Well, well, I just feel like 14 years ago, playing around with my rather aged SGI O2, which I didnt touch for years, doing a fresh reinstall of IRIX and some apps. While flipping through my CDs I stumbled accross SoftWindows95 for IRIX. I just couldn&#8217;t resist and put the flipper in, having the software [...]]]></description>
			<content:encoded><![CDATA[<p>Well, well, I just feel like 14 years ago, playing around with my rather  aged SGI O2, which I didnt touch for years, doing a fresh reinstall of IRIX and some apps.</p>
<p>While flipping through my CDs I stumbled accross SoftWindows95 for IRIX. I just couldn&#8217;t resist and put the flipper in, having the software installed just minutes later, only to see that I didn&#8217;t have the license any more <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>But there&#8217;s hope &#8230;<br />
<span id="more-149"></span><br />
After some searching I found a Usenet article with a valid license of SoftWindows95. Well, I think it&#8217;s fair enough to republish this, as for one, Insignia has sold-off SoftWindows about 10 years ago, and the successor company FWB Software stopped development in 2001, furthermore that company doesn&#8217;t exist anymore as it has been sold-off, too. Well, not even SGI is able to provide a license key for a software, which is 14 years old &#8230; hm&#8230;. Well, I _think_ it&#8217;s ok, otherwise let me know &#8230;</p>
<p>To activate SoftWindows95 just place this text into /usr/lib/SoftWindows95/FLEXlm/license.dat:</p>
<blockquote><p>
FEATURE Insignia_SoftWindows95 insignia 4.000 01-jan-0 0 \<br />
        ECE41259D5BE4700DC27 VENDOR_STRING=&#8221;5100 0100 0000 0001&#8243; \<br />
        HOSTID=ANY vendor_info=SOFTWINDOWS95 ISSUER=&#8221;Silicon Graphics, \<br />
        Inc.&#8221;
</p></blockquote>
<p>The license won&#8217;t show up from the GUI _but_ SoftWindows95 will work.</p>
<p>Considering the age of the O2 and it&#8217;s dated 200 MHz MIPS CPU the emulation speed isnt&#8217;t too bad.<br />
I remembered it being worse than thaz, but maybe that&#8217;s just the &#8220;geekness&#8221; of having gotten something very old to work again <img src='http://phaq.phunsites.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><img src="http://phaq2.phunsites.net/wp-content/uploads/2009/10/IMG_0475-300x225.jpg" alt="SoftWindows95onIRIX" width="300" height="225" class="alignnone size-medium wp-image-153" /></p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2009/10/20/resurrecting-insignia-softwindows95-for-sgi-irix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing VMware Server 2.0 on Debian</title>
		<link>http://phaq.phunsites.net/2008/02/29/installing-vmware-server-20-on-debian/</link>
		<comments>http://phaq.phunsites.net/2008/02/29/installing-vmware-server-20-on-debian/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 16:13:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/2008/02/29/installing-vmware-server-20-on-debian/</guid>
		<description><![CDATA[It&#8217;s been a while since this post was accidentally deleted due to some very bad circumstances. I must admit, that there was no current backup for this post, so a restoration was not possible. Basically this topic was just a follow-up to a previous post updated for VMware Server 2.0 on Debian. In the meantime, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since this post was accidentally deleted due to some very bad circumstances.<br />
I must admit, that there was no current backup for this post, so a restoration was not possible.</p>
<p>Basically this topic was just a follow-up to a <a href="http://phaq.phunsites.net/2006/03/17/installing-vmware-server-on-debian-sarge/">previous post</a> updated for VMware Server 2.0 on Debian.</p>
<p>In the meantime, VMware has released ESXi vor free as well, so using VMware Server maybe superseeded by choosing ESXi.</p>
<p>As a sidenode also consider <a href="http://ubuntuforums.org/showthread.php?t=788169&#038;highlight=vmware+host+ip" target="_blank">the post at the Ubuntu forums</a>. There&#8217;s a short howto and a script available, which eases installation procedures. Supposedly, this could be easily adapted for Debian, as both Distros share very common roots.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2008/02/29/installing-vmware-server-20-on-debian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Xen console grabbded /dev/ttyS0</title>
		<link>http://phaq.phunsites.net/2007/06/30/xen-console-grabbded-devttys0/</link>
		<comments>http://phaq.phunsites.net/2007/06/30/xen-console-grabbded-devttys0/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 13:00:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/2007/06/30/xen-console-grabbded-devttys0/</guid>
		<description><![CDATA[This week I started on evaluating an iSCSI storage system which should get connected to a Xen-enabled host. An article covering this particular topic is in preparation. Since the iSCSI device offered management capabilities over serial console I though to attach it to COM1 (/dev/ttyS0) of my host system. This is well the point when [...]]]></description>
			<content:encoded><![CDATA[<p>This week I started on evaluating an iSCSI storage system which should get connected to a Xen-enabled host. An article covering this particular topic is in preparation.</p>
<p>Since the iSCSI device offered management capabilities over serial console I though to attach it to COM1 (/dev/ttyS0) of my host system.<br />
This is well the point when I noticed that Xen had already grabbed /dev/ttyS0. Since my host system offered only one serial port and I didn&#8217;t have a spare serial server at hands I needed to change this behaviour to get it working.<br />
<span id="more-103"></span><br />
By means of &#8216;dmesg&#8217; it can be easily verified if Xen grabbed the serial port:</p>
<pre>
# dmesg|grep ttyS0
Xen virtual console successfully installed as ttyS0</pre>
<p>Then make sure you know which kernel version you&#8217;re running:</p>
<pre>
# uname -r
Linux gic-ftp-lin-001.genotec.ch 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:29:35 EST 2007 x86_64 x86_64 x86_64 GNU/Linux</pre>
<p>Look for the corresponding kernel section in your grub.conf (or whatever boot loader you use).</p>
<pre>
title Red Hat Enterprise Linux Server (2.6.18-8.el5xen)
        root (hd0,0)
        kernel /boot/xen.gz-2.6.18-8.el5
        module /boot/vmlinuz-2.6.18-8.el5xen ro root=LABEL=/
        module /boot/initrd-2.6.18-8.el5xen.img</pre>
<p>Then add the &#8216;xencons&#8217; option to the module line stating the kernel arguments.</p>
<pre>
title Red Hat Enterprise Linux Server (2.6.18-8.el5xen)
        root (hd0,0)
        kernel /boot/xen.gz-2.6.18-8.el5
        module /boot/vmlinuz-2.6.18-8.el5xen ro root=LABEL=/ xencons=tty6
        module /boot/initrd-2.6.18-8.el5xen.img</pre>
<p>In this case I added &#8216;xencons=tty6&#8242; to have Xen grab /dev/tty6 for it&#8217;s console.</p>
<p>Other possibilities are:</p>
<table>
<tr>
<td>xencons=off</td>
<td>&nbsp;</td>
<td>disable console at all</td>
</tr>
<tr>
<td>xencons=ttyX</td>
<td>&nbsp;</td>
<td>attach console to /dev/ttyX</td>
</tr>
<tr>
<td>xencons=ttySX</td>
<td>&nbsp;</td>
<td>attach console to /dev/ttySX</td>
</tr>
<tr>
<td>xencons=xvcX</td>
<td>&nbsp;</td>
<td>attach console to /dev/xvcX</td>
</tr>
</table>
<p>After changing this line and rebooting the system I could finally connect my iSCSI&#8217;s serial terminal.</p>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2007/06/30/xen-console-grabbded-devttys0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>NVIDIA binary driver on Xen-enabled Linux x86_64</title>
		<link>http://phaq.phunsites.net/2007/06/21/nvidia-binary-driver-on-xen-enabled-linux-x86_64/</link>
		<comments>http://phaq.phunsites.net/2007/06/21/nvidia-binary-driver-on-xen-enabled-linux-x86_64/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 19:29:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://phaq.phunsites.net/2007/06/21/nvidia-binary-driver-on-xen-enabled-linux-x86_64/</guid>
		<description><![CDATA[It seems impossible at first to run the NVIDIA binary driver on Linux x86_64 when Xen is enabled. That&#8217;s because NVIDIA does not support Xen in the first place albeit there&#8217;s some demand for it for sure. Luckily the only things to be changed are within the kernel interface contained in the driver package. There [...]]]></description>
			<content:encoded><![CDATA[<p>It seems impossible at first to run the NVIDIA binary driver on Linux x86_64 when Xen is enabled.</p>
<p>That&#8217;s because NVIDIA does not support Xen in the first place albeit there&#8217;s some demand for it for sure.</p>
<p>Luckily the only things to be changed are within the kernel interface contained in the driver package. There exist already a lot of patches on the net, I took mine from <a href="http://www.nvnews.net/vbulletin/showthread.php?t=85037" target="_blank">nvnews</a>.</p>
<p>You can <a href="http://phaq2.phunsites.net/wp-content/uploads/2007/06/nvidia_xenpatch.gz" title="NVidia Patch for XEN">grab a copy</a> of the patch from my site, too.</p>
<p>The following instructions are derived from my steps in getting NVIDIAS&#8217;s binary driver to work on Fedora Core 6 running Xen on the x86_64 platform (Intel Core 2 Duo 6420 CPU).<br />
It was verified to work with driver version 1.0.9755 (march 29, 2007) and 1.0-9639 (may 29, 2007), both of which you can get from the <a href="http://www.nvidia.com/object/linux_amd64_display_archive.html" target="_blank">NVidia website</a>.</p>
<p>First you need to have some prerequisites installed on your system:</p>
<ul>
<li>toolchain (gcc, make, etc.)</li>
<li>applicable kernel headers (I had kernel 2.6.20-1.2948.fc6xen on my system, so I installed kernel-xen-devel-2.6.20-1.2948.fc6 and kernel-xen-2.6.20-1.2948.fc6 packages)</li>
</ul>
<p>Then the appropriate driver packages needs to be downloaded and extracted to a temporary directory:</p>
<pre>
mkdir /tmp/nv_xen
cd /tmp/nv_xen
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/1.0-9639/NVIDIA-Linux-x86_64-1.0-9639-pkg2.run
/bin/sh NVIDIA-Linux-x86_64-1.0-9639-pkg2.run -x
Creating directory NVIDIA-Linux-x86_64-1.0-9639-pkg2
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 1.0-9639.</pre>
<p>Also get a copy of the <a href="http://phaq2.phunsites.net/wp-content/uploads/2007/06/nvidia_xenpatch.gz">NVidia Patch for XEN</a>:</p>
<pre>
wget http://phaq2.phunsites.net/wp-content/uploads/2007/06/nvidia_xenpatch.gz</pre>
<p>Then change to the source directory, apply the patch and compile the driver.<br />
The kernel source is required. If installed properly it should be located at /usr/src/kernels. If more than one exists choose the right one according to your &#8216;uname -r&#8217; output.</p>
<pre>
cd NVIDIA-Linux-x86_64-1.0-9639-pkg2/usr/src/nv
zcat ../../../../nvidia_xenpatch.gz | patch -p4
[output omitted]
make SYSSRC=/usr/src/kernels/2.6.20-1.2948.fc6xen-x86_64/ module
[output omitted]
NVIDIA: left KBUILD.</pre>
<p>If the compile run succeeds you should see the message <strong>NVIDIA: left KBUILD</strong> by the end of the output.<br />
If anything weird happens, e.g. build process aborts, either the patch did not apply cleanly, the headers are not up to date or your sources are not configured.<br />
In the last case a simple &#8216;make oldconfig&#8217; from the kernel source directory may be enough to get it fixed.<br />
There&#8217;s also the chance that you try this patch on a non-supported kernel source version or NVIDIA driver package which may prevent successful compilations.<br />
Since I did not implement the patch by myself I cannot be of much help in either case.</p>
<p>Upon successful compilation you can install and load the driver. Verify that the driver loaded by means of &#8216;lsmod&#8217;.</p>
<pre>
install -D -o root -g root -m 0644 nvidia.ko /lib/modules/`uname -r`/video/nvidia.ko
depmod -a
modprobe nvidia
lsmod|grep nvidia
nvidia               7771096  22</pre>
<p>At this point run the NVIDIA installer to get the remaining utilities.<br />
Use the &#8216;no-kernel-module&#8217; option as you installed the kernel module already.</p>
<pre>
cd ../../../
/bin/sh nvidia-installer --no-kernel-module</pre>
<p>This is it! You are now ready to configure your X server to use the NVIDIA driver.<br />
Stick to the docs included with the driver on how to achieve this.</p>
<p>This is my Xorg <a href="http://phaq.phunsites.net/files/2007/06/xorgconfnvidia.txt" title="NVIDIA Xorg Configuration (with TwinView)">sample configuration</a> with twin-view enabled accross two displays at 1280&#215;1024 resolution.</p>
<pre>
# sample Xorg configuration file for NVIDIA graphics driver

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		0  "Screen0" 0 0
	InputDevice	"Keyboard0" "CoreKeyboard"
EndSection

Section "Module"
	Load	"dbe"
	Load	"extmod"
	Load	"record"
	Load	"xtrap"
	Load	"freetype"
	Load	"type1"
	Load	"glx"
EndSection

Section "InputDevice"
	Identifier	"Keyboard0"
	Driver		"kbd"
	Option		"XkbModel" "pc105"
	Option		"XkbLayout" "ch"
	Option		"XkbVariant" "de_nodeadkeys"
EndSection

Section "Device"
	Identifier	"Videocard0"
	Driver		"nvidia"
	Option		"TwinView" "1"
	Option		"CursorShadow" "1"
	Option		"TwinViewOrientation" "RightOf"
	Option		"MetaModes" "1280x1024,1280x1024"
EndSection

Section "Screen"
	Identifier	"Screen0"
	Device		"Videocard0"
	DefaultDepth	24
	SubSection "Display"
		Depth	24
		Modes	"1280x1024"
	EndSubSection
EndSection</pre>
]]></content:encoded>
			<wfw:commentRss>http://phaq.phunsites.net/2007/06/21/nvidia-binary-driver-on-xen-enabled-linux-x86_64/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

