<?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>Wes Kroesbergen&#039;s Portfolio &#187; Media</title>
	<atom:link href="http://www.kroesbergens.com/portfolio/tag/media/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kroesbergens.com/portfolio</link>
	<description>my opinions, conjectures, and thoughts</description>
	<lastBuildDate>Tue, 10 Aug 2010 13:51:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>VMWare ESXi as a Media Server</title>
		<link>http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/</link>
		<comments>http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:53:28 +0000</pubDate>
		<dc:creator>Wes Kroesbergen</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://www.kroesbergens.com/portfolio/?p=235</guid>
		<description><![CDATA[In the last little while, I&#8217;ve begun to work a lot more with VMware ESXi, in an attempt to understand virtualization better. Along with the benefits it brings to larger companies, I began to see some benefits that it would bring to my personal life. At home, I am constantly developing or experimenting with new [...]


Related posts:<ol><li><a href='http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/' rel='bookmark' title='Permanent Link: ESXi, ZFS, and Home Server Data Storage &#8211; Part 1'>ESXi, ZFS, and Home Server Data Storage &#8211; Part 1</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/08/update-re-esxi-zfs-storage/' rel='bookmark' title='Permanent Link: Update re: ESXi &#038; ZFS Storage'>Update re: ESXi &#038; ZFS Storage</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/04/thoughts-on-the-ipad/' rel='bookmark' title='Permanent Link: Thoughts on the iPad'>Thoughts on the iPad</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In the last little while, I&#8217;ve begun to work a lot more with VMware ESXi, in an attempt to understand virtualization better. Along with the benefits it brings to larger companies, I began to see some benefits that it would bring to my personal life. At home, I am constantly developing or experimenting with new technologies in an attempt to understand them and build my skills. The problem is that I tend to do a lot of my experimentation on our home server (an old Dell 5150, with lots of extra hard drives). Since we are using this as a media server, things tend to become difficult for those using the media or data when I need to reboot/install something new. This resulted in much of our data being scattered among our other machines (two MacBook Pro&#8217;s and an iMac). All in all, a very messy setup.<span id="more-235"></span></p>
<p>Enter ESXi. Virtualized machines brings me the ability to leave a media server up and running while I add, build, or reconfigure other machines, without the expense of all the hardware. It also brings all those machines into a single console, making it really convenient for me to manage. Along with that, I can now easily allocate more storage to the virtual machine as I have need!</p>
<p>Of course, this presented a problem. There is a <strong>lot</strong> of data that needed to be migrated. 1TB on the iMac, 320GB + 500GB + 160GB + 160GB on the existing media server, 160GB on the other MacBook Pro, and ~100GB on my MacBook Pro. How do you migrate all this data over? I budgeted for 1 new hard drive, but not more than one.</p>
<p>I purchased new server components (see below) on Boxing Day, and spent about ~$600 on what would have been an ~$830 server.</p>
<p>Components:</p>
<ul>
<li>Motherboard: Asus P5Q Pro Turbo</li>
<li>CPU: Intel E7500 Boxed (mid-late 2009 versions have VT-x, a requirement for 64bit host VM&#8217;s)</li>
<li>Ram: 4GB OCZ DDR2 800</li>
<li>Hard-drive: WD 1.5TB</li>
<li>Case: Antec P183</li>
<li>PSU: Antec TruePower 650 New</li>
<li>Video Card: Asus EAH4350 (Asus motherboard doesn&#8217;t have on-board video)</li>
<li>NIC: Intel EXPI9301CT (Required, as ESXi 4 didn&#8217;t support the integrated Atheros-based NIC)</li>
</ul>
<p>I began the new ESXi build by assembling the new hardware. As I wasn&#8217;t installing from USB and instead opted for the lower-hassle CD installation method, I borrowed a CD drive from my spare hardware box (I also borrowed keyboard/mouse/monitor). When I tried to boot ESXi for the first time, it informed me that the integrated NIC was not compatible. I nipped out to Canada Computers and purchased a new one, and the installation proceeded smoothly from that point on. Once installation was completed, I enabled SSH to ESXi by doing the following:</p>
<ol>
<li>alt-f1 (Note: As pointed out below, you will not see your typing on this screen, just trust us, it is there).</li>
<li>unsupported</li>
<li>root pw</li>
<li>vi /etc/inetd.conf</li>
<li>delete the “#” from ssh</li>
<li>services.sh restart</li>
</ol>
<p>I rebooted the machine, and went to my Windows box (no Mac ESXi/vSphere client yet) to manage the server. (If you haven&#8217;t installed the vSphere client yet, you can download it by going to your ESXi installation&#8217;s IP in your web browser) I setup a new VM for Ubuntu Linux 9.10, allocating 16GB to the VM hard drive, and configuring it with thin provisioning (dynamically expands). All my data would be on a second virtual drive. I then proceeded to install Ubuntu and install all the updates. Now it was time to add space for my data.</p>
<p>It was at this point that I hit a snag. VMware ESXi only supports 256GB virtual disks. I have terabytes of data, so how am I supposed to store all this information? </p>
<p>Enter LVM (Logical Volume Manager). LVM is a great technology that has seen a lot of use in Linux, allowing you to create volumes that span multiple hard-drives/partitions. I added 5 256GB thin provisioned disks to the Ubuntu installation, and proceeded to mount them as a single ext3 volume under /mnt/Shares. I set the volume to auto-mount on reboot in my /etc/fstab file, and proceeded to create the directories inside /mnt/Shares that would serve up my data. You can see a list of my shares below.</p>
<ul>
<li>Backup (To be used for Time Machine)</li>
<li>Data (To be used for miscellaneous data, like eBooks)</li>
<li>Movies</li>
<li>Music</li>
<li>Photos (Will contain an rsync-ed folder of my Adobe Lightroom photos, as well as a folder for miscellaneous images (scans, etc))</li>
<li>Software (Will contain a copy of my software. I have directories created Windows and Mac, and the respective software in each)</li>
<li>TV</li>
</ul>
<p>The next interesting bit. How to actually share these shares. Obviously I don&#8217;t want to just open everything up to the world, and I also happen to have a multi-platform environment here, with Windows clients, Mac clients, and my landlord&#8217;s Linux clients. I elected to share all the shares using AFP (for my Macs), and the Movies, TV, and Software directories via SMB (for my Windows clients and the Linux clients). I created a user account called &#8216;main&#8217; for my use, &#8216;kidd&#8217; for my landlord, and &#8216;visitor&#8217; for any guests that may be over. All three are password protected. &#8216;main&#8217; has access to all shares, &#8216;kidd&#8217; has access to Movies, TV, and Software, and &#8216;visitor&#8217; has access to Movies and TV.</p>
<p>I shared the AFP shares to my Macs using a custom-compiled version of netatalk, following the great tutorial <a rel="nofollow" target="_blank" href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/" onclick="pageTracker._trackPageview('/outgoing/www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/?referer=');">here</a>. SMB configuration was fairly straightforward, and everything went well. I copied over as much data as possible (from the old server), before running out of disk space. At this point, I copied over data from the iMac 1TB into the now-empty old server, and popped the 1TB drive into the server. At this point I ran into the second snag. ESXi did not want to format the drive! I did some digging, and found that it was due to having been formatted as GUID before (in the Mac). I used dd to wipe out the first and last sectors of the drive, and tried to create a new partition via fdisk as per <a rel="nofollow" target="_blank" href="http://www.vm-help.com/esx/esx3i/ESXi_35_common_issues.php#unable_to_read_partition_information" onclick="pageTracker._trackPageview('/outgoing/www.vm-help.com/esx/esx3i/ESXi_35_common_issues.php_unable_to_read_partition_information?referer=');">these</a> instructions. Again, no go. After several attempts, I discovered that immediately after creating the partition table with fdisk, I had to reboot before using the vmkfstools command to create a datastore. After rebooting the server, I was able to format the drive appropriately. I logged into the Windows GUI console and deleted the new datastore. I then added the drive to the existing datastore, and fired up Ubuntu. I created several more 256GB thin-provisioned disks, and added them to the LVM. </p>
<p>I&#8217;ve installed &#8216;forked-daapd&#8217; as a service on Ubuntu. This allows me to open Front Row and select the server as a source. I&#8217;ve also &#8216;tightvncserver&#8217; set to run on startup, and have advertised the service in Avahi/Bonjour. This allows me to see the &#8216;Share Screen&#8230;&#8217; button in OS X finder, and control the MediaServer via Screen Sharing, rather than a dedicated VNC client.</p>
<p>It&#8217;s been a great experiment, and now a great production home-media server. I&#8217;m looking forward to setting up my lab environment in other VM&#8217;s on ESXi. Feel free to leave me any questions/comments below that you might have on the process.</p>


<p>Related posts:<ol><li><a href='http://www.kroesbergens.com/portfolio/2010/05/esxi-zfs-and-home-server-data-storage-part-1/' rel='bookmark' title='Permanent Link: ESXi, ZFS, and Home Server Data Storage &#8211; Part 1'>ESXi, ZFS, and Home Server Data Storage &#8211; Part 1</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/08/update-re-esxi-zfs-storage/' rel='bookmark' title='Permanent Link: Update re: ESXi &#038; ZFS Storage'>Update re: ESXi &#038; ZFS Storage</a></li>
<li><a href='http://www.kroesbergens.com/portfolio/2010/04/thoughts-on-the-ipad/' rel='bookmark' title='Permanent Link: Thoughts on the iPad'>Thoughts on the iPad</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.kroesbergens.com/portfolio/2010/01/vmware-esxi-as-a-media-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
