Monthly Archives: February 2009

Threepwood Goes to VMware ESXi

My home server, Threepwood, named after the main character in the popular game series “Monkey Island”, has finally taken the step out of this world and into the virtual space.

For a few years it resided within a Compaq Proliant 400 with whooping 384MB of RAM and 450MHz CPU. Running Ubuntu Linux, this has actually been enough for most of the tasks. It has mainly been used to host a few blogs, my brother and mine, thus running Apache2, MySQL and PHP5.

Now that I’ve got VMware ESXi running, I decided it was time to move already. To move it I used VMware Converter, which can move physical machines into VMware ESX and ESXi while the source machine is online. To minimize data loss I stopped the Apache and MySQL services.

The conversion took about 1 hour, but then again I only had a 40GB hard drive, so times may vary depending on hard drive size and network capabilities.

After the conversion I took the time to upgrade the kernel and other packages. Until today my server had 294 days uptime, so one might say it was due for a new kernel. I also gave it some more memory to play with, 1596MB to be exact, and a 2.40GHz CPU.

Yeah, I know. I’m spoiling him.

Running VMware ESXi Hypervisor

This guide applies to VMware ESXi 3.5.0

VMware ESXi is a free Hypervisor from VMware. In simple terms, a host for virtual machines. The difference from VMware Server, which also is a free Hypervisor, is that ESXi runs directly on the hardware whereas VMware Server need to run on top of another operating system.

When I first started thinking about virtualizing my home server, I initially though about VMware Server. Simply because that was the only free alternative I knew about. It was only when I attended a VMware Infrastructure course a few weeks ago I learned about ESXi. What intrigued me about ESXi was the fact it could boot from a USB pen drive.

But where VMware Servers can use of all the hardware available to the underlying operating system, ESXi has very limited hardware support. However, rules are meant to be broken. Right?

Making a bootable ESXi USB pen drive:

Let’s make a bootable ESXi USB pen drive. The easiest way to do this is using Linux and some more or less standard programs. You can also do this on Windows, just follow this guide from Yellow Bricks which is the guide I used to make this one.

  1. Download the free ESXi ISO-image from VMware. You need to register so you can get your free licence code.
  2. Mount the ISO-file. ( “mount -o loop ESXi.iso /mnt/iso” )
  3. Extract “install.tgz” ( “mkdir /root/esxi; tar xvf install.tgz -C /root/esxi” )
  4. Go to the directory where you unpacked the files, and then some. ( “cd /root/esxi/usr/lib/vmware/installer” )
  5. Unzip the big-file. (” bunzip2 VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd.bz2“)
  6. Place this image onto your USB stick. This WILL destroy all data on the USB pen drive. Also, you need to know which device your pen drive is. Mine was “/dev/sdb” ( “dd if=VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd of=/dev/sdb” )
  7. Step 6 will take a while since we’re writing 750MB of data to the USB-stick. When it’s finished you will have stock ESXi installation on a bootable USB pen drive. Congrats!

More hardware support.

As mentioned earlier, ESXi has very limited hardware support out of the box. However, the VMkernel itself has better hardware support which VMware doesn’t wants us to know about. You only need to find out how to enable it.

For my own part I added a 3Com network adapter, since there is no way my onboard Realtek is supported. 3Com and Intel cards should be a safe bet, but don’t take my word for it. Also I wanted to use the computers local SATA disks as datastores. Thus the hacking begin.

I used several hours on reading different websites on how to enable VMkernel to recognize my SATA controller, but I could have saved me the trouble. In the end I found a site which already had the files ready to go.

Short and simple.

  1. Download the Community Unified oem.tgz file from this lovely website.
  2. Mount the partition on the USB drive called Hypervisor1. This should be the second partition on you USB drive. Mine was “/dev/sdb2”. ( “mount /dev/sdb2 /mnt/usb” )
  3. Replace the oem.tgz file on the USB drive with the one you downloaded. ( “cp oem.tgz /mnt/usb/” )
  4. Umount and you’re done. ( “umount /mnt/usb” )

I can’t guarantee that this setup will recognize your hardware, but it sure found mine. I couldn’t have made this guide without the information I found on the Internet, so it’s time for credit:

[1] http://www.grid.org/blog/cameron/development-using-vmware-server-esxi

[2] http://www.grid.org/blog/cameron/updating-vmware-esxi-disk-dump-file

[3] http://www.yellow-bricks.com/2008/07/29/esxi-35-update-2-on-a-usb-memory-key/

[4] http://www.vm-help.com/esx/esx3i/customize_oem_tgz.php

As always, comments are appreciated.

Running Web Server as a Virtual Machine

For several months now I’ve been planning to virtualize my home server. That’s the server hosting this blog, among other things. For starters it would give me some more room to test different applications on separate operating system, but without the hassle of dealing with several physical computers.

One of my ideas is to test web application prior to deployment. This is kind of hard now that I only have one machine. It’s would be shameful if I accidently killed the web service because of a faulty configuration. Also I have a few projects which I want to separate from the machine visible on the internet.

VMware Server is a free product which can be installed on top of either Windows or Linux, so it’s not a bare-metal hypervisor. I recommend running it on top of Linux for minimal footprint, not to mention all the rebooting you have to do with Windows. A minimal Ubuntu server installation takes less than 1GB of disc space, and use next to nothing when it comes to terms of memory.

For the moment I’m doing some testing with one mySQL server, one Apache web server and one server running Varnish, which is a cache/proxy service. It’s not because I’m expecting high load in the near future, but it’s an interesting solution.

Anyway; the next few months I expect this blog to focus more on virtualization, but I can’t guarantee anything. I would be satisfied if I keep writing semi regular, no matter the topic.

Marte Thorsby og IFPI

Nok engang har Marte Thorsby vært i media og uttalt seg om ting hun tydligvis ikke har peiling på. I følge Dagbladet.no gir hun nå Telenor 2 ukers frist til å sperre norske brukere ute fra ThePirateBay.

Mener hun oppriktig og seriøst at sensur er veien å gå i et demokrati? At indekseringstjenester som ThePirateBay, Google, Sesam og Kvasir ikke har livets rett?

Søk gjort på ThePirateBay peker kun til torrent-filer, og disse inneholder som kjent ikke informasjon som er beskyttet av opphavsrett. Et raskt søk på hvilken som helst av de andre tjenestene peker derimot både direkte til mp3-filer, pdf-filer av bøker og annet materiell som er beskyttet av opphavsrett. Er ikke disse andre tjenestene verre da?

Eller er det kun det faktum at ThePirateBay har kategorisert informasjonen så grundig som gjør at IFPI reagerer og ønsker å sperre tilgangen for det norske folk?

Forresten; Enda ett kjapt søk på ThePirateBay gir meg side opp og side ned med torrenter som linker til helt lovlige filer. Skal IFPI nekte meg tilgang til dem også?

Loven er som kjent lik for alle. Faller det en dom i Norge som skal hindre norske brukere å nå ThePirateBay forventer jeg at myndighetene utøver samme praksis mot samtlige andre søketjenester tilgjengelig på nettet i dag.