matt's debates

because matt's debating is not a crime

Some notes on VMWare Converter

VMWare converter is a free tool from VMWare to convert Virtual Machines from one format to another. I’ve recently built an ESXi server and was looking to move some machines from VMWare Fusion 5 over to it. There are a few pitfalls to be aware of:

1) VMWare Converter 5.0 is not compatible with ESXi 5.1 (yet). Don’t even try – Converter will just hang.
2) Converter 4.3 is allegedly compatible with 5.1, but I didn’t have any success. I would get “invalid fault” exceptions.
3) Convert 5.0 with ESXi 5.0U1 is painfully slow to transfer machines, even on gigabit lan. There is one option here that explains how to improve conditions. However, even with that fix, I only got transfer speeds of around 5mb/s when transferring file-based VMs.
4) It may not help, but check DNS and network config between you and your ESXi server is setup. DNS in my ESXi was set up to be some random IP address which presumably did not help.
5) Installing the converter on the machine you want to transfer is much faster. So rather than targetting a .vmx file, you can tell it to transfer the “currently powered-on machine”. Doing this with a simple W7 machine achieved speeds of anywhere up to 14mb/s. (Not great if you want to transfer a non-Windows machine, though!)
6) You may encounter issues with VMs that have multiple virtual hard drives. I had a SQL Server with 3 separate drives installed, and whilst it did transfer all drives, with data intact, only the C: drive was alive when starting the machine. You may need to use DISKPART to get the other drives going again.

Will add more issues as I encounter them.

Comments Off

My VMWare ESXi build – Part 2 – Building ESXi

This is the second post in a series about running ESXi on a home server. See the first part, here.

ESXi is a free download from VMWare. You just need to register an account and install it. Simple huh? Well, not all the way. Two main issues:

1) I didn’t install an optical drive (intentionally, although with hindsight it would have been a bit easier to have one)
2) The Broadcam NetXtreme BCM57781 LAN card on my ASROCK board is not supported by ESXi. D’oh.

However, there are ways around this. If you’re running the same build as me, you should be able to follow these steps. If you’re using different hardware, substitute in the relevant bits!

Creating a custom ESXi image

The first thing you need to do is to create an ESXi image that includes the NIC driver. This sounds complicated but is actually surprisingly easy. The easiest way to do this is to use a free piece of software called ESXi-Customiser, and then follow the instructions provided by loadingsysadmin. I’ve copied them here with some amendments in case that site goes down. Note: I followed this for ESXi 5.1 with no issues.

Update – whilst the below method works fine for ESXi 5.1 I’ve since tripped over an issue. At the time of writing, the current Virtual Machine Converter (5.0) does not support converting machines for use in 5.1. So if you’re like me and you’re moving VMs from VMWare Fusion which you don’t want to recreate manually, then you’re probably out of luck. I tried using VMWare Converter 4.3, and this failed as well. So, in the end, I had to downgrade VMWare ESXi to 5.0U1 (using the method below). Seems crazy…

Further update – two things I’ve since discovered. 1. The software RAID controller on the ASROCK Extreme4 motherboard is not supported by ESXI. That sucks. No sign of a driver either.

2. VMWare Converter is a bit of a pig to run. I’ve been trying to convert some VMs from my VMWare Fusion 5 and it is dog slow to copy. There is some info out there about disabling SSL. Even after doing this, I had a small performance increase, but was still only copying at around 5-6mb/s. On a gigabit LAN! Rubbish.

3. I also had issues with VMWare Converter 5.0 copying VMs with multiple virtual hard drives. The first drive (C:) was copied fine, but the other two drives, whilst appearing in the guest OS were showing as offline. You can bring them back online by:

1. Open a command prompt, and type DISKPART
2. Type DISK LIST
3. SELECT DISK {#}
4. ONLINE

You may also find it comes back read only, in which case, you can type

ATTRIB CLEAR READONLY

Anyway, moving on… to how to create the disk image:

1) Download ESXi 5.1, ESXi Customizer and the Broadcom driver

2) Extract ESXi Customizer and the Broadcom driver to a directory of your choosing

3) Run the file called ESXi-Customizer.cmd located in your ESXi Customizer directory

4) In the first field, select your ESXi 5.1 ISO you downloaded earlier

5) In the second field, change the file type filter to Offline Bundles (*.zip), browse to the Broadcom driver directory, and select tg3-3.120h.v50.2-offline_bundle-547149.zip

6) In the third field, select the directory you would like to save the final ISO to

7) Check the Create a (U)EFI-bootable ISO (ESXi 5.0 only) box before clicking Run! to create the new ESXi 5.0 ISO

8) After ESXi Customizer does its thing, you’ll end up with an ISO image of ESXi 5.1, Broadcom driver support and non-broken onboard SATA ports. Burn it to a disc and you’re done!

Note the bits with strikethrough. This will work fine for burning to a disc, but if, like me, you want to use a USB flash drive to install from, do not do that. Instead, do not check the “Create an EFI bootable…” option, and instead….

1) Get Unetbootin for your client (I tried in both Mac and Windows with no issues.)
2) Plug in your flash drive. I reformatted it just to be sure (FAT32 seemed to be fine.)
3) Select the image that ESXi-Customiser created and target it to your flash drive.
4) Let it do its thing.

At the end, you’ll have a bootable flash drive with ESXi 5.1 ready to go.

So, what’s next?

Put the flash drive in to your server and switch it on. When prompted, go in to the BIOS (F2 or DEL in the EFI bios.) Switch to the boot options page. You should now see three options – AHCI, USB and EFI. Change the boot order so that EFI is first. Save your changes and exit, and let the machine reboot. Your server should now pick up the installer on your flash drive and the ESXi installer should start.

Fill in the blanks as it prompts and let it finish. Remove the flash drive and let it boot – you should now boot in to ESXi. Awesome. Hit F2 to enter setup and the key thing here is to check the network settings. If you’re on a DHCP network then in theory it will have already picked up an IP address. I switched mine to a static IP address and ran the network tests – all went OK.

Now install vSphere Client on a Windows machine somewhere (I had to do it inside a VM running on my Mac…!) and see if you can connect to your ESXi Server. Note that if you’re using the free ESXi license then you don’t get a lot of cool functionality against if you had a paid version. The two things you can’t do (which would be awesome) are:

1) Use the VMWare Web Client – this requires vCenter which is not free
2) Use the vCMA Web appliance with the iPad – OK, you can actually install the appliance and connect to your host using the iPad app – but in a read only state only – i.e., you can’t start/stop virtual machines.

Now you’re ready to start deploying VMs!

My VMWare ESXi 5.1 build – Part 1 – The Hardware

This is the first part of a series on running ESXi on a home server. See the second part, here.

It’s a been a while since updating this blog. Apologies, but it’s mostly because I’ve been really busy doing what I do As part of that though, I use a lot of VMWare Virtual Machines. Being an Apple “fanboy” (gah) I use VMWare Fusion on my Macs which is great for running various virtual machines. (In fact, Windows 7 and Windows Server 2008 R2 seem to run a hell of a lot better virtualised rather than natively. Go figure.)

Anyway, it got to a point where I decided I needed a bigger and more robust framework to run virtual machines on. Simply speaking, running one or two VMs on my Mac is fine, but when you need to run several at one time with limited resources, it starts to get a lot more involved. Given that VMWare ESXi Hypervisor is a free platform for running a single server VM host, I figured I’d experiment with building an ESXi server for home use. This blog post details some of the pain I went through in getting there.

Before I get started, there are a few terms I will use:

HOST – the physical machine, that is running ESXi
GUEST (or guest OS) – this is the virtual machine(s) that then runs on ESXi

And quickly:

What is ESXi

ESXi is a cut down linux kernel that acts as a hypervisor. That is, it’s a piece of software that runs on the physical machine, and then presents the physical hardware to the guest machines that want to use it. It in itself is not an OS. So they key difference here between say VMWare Fusion or Workstation is that you’re not running an edition of e.g., Windows Server which itself is running Virtual Machines – you’re, moreorless, cutting out the middle man.

Read the rest of this entry »

Painted Lady butterfly timelapse

Comments Off

Snowboarding… Guernsey style

Snowboarding in Guernsey. Weird.

Comments Off

GoBoat HD

Strapping a GoPro HD to a remote controlled boat

Comments Off

Simplified deleting in OSX Finder

I finally got around to solving a longstanding irritation I’ve had with Finder. Well, when I say that, what I mean is, I posted the irritation to a forum, and some helpful folks there gave me the inspiration for the solution.

The irritation:

Quite often I copy a bunch of images off my phone on to my laptop. In Finder I open them up and use the quickview (using spacebar) to quickly view and delete items [using the keyboard only]

However, when I delete an item, Finder loses focus. If I press UP or DOWN I start at the top or bottom of the list. Is there a way to delete an item from the list and it to stay at the same place in the list?

Your workflow is completely ruined when every time you delete, Finder loses focus and you have to use the mouse to get back to where you were. The solution? Labels. This is some simple functionality that allows you to set the backgorund color/label of a Finder item. It’s been in the OS for donkey’s years… but I’ve never got in to it. Little need, maybe. After this, I might use it more.

You can see above how to set the label/colour of a finder item and the effect. The trick though is being able to do this via the keyboard only which is not possible out of the box. Step up cute application of the year: Spark. Completely free (unlike your Butler/Quiksilver) it lets you assign keyboard shortcuts to a bunch of activities, including executing Applescript. Nice guide to it is here.

Which rather alludes to how we’ll do this: with some simple Applescript:

property file_color : 2
– replace ‘2′ above with the number for the color you’d like to use:
– 0=none, 1=orange, 2=red, 3=yellow, 4=blue, 5=purple, 6=green, 7=grey

tell application “Finder”
activate
set selected to selection
repeat with n_file in every item in selected
set label index of n_file to file_color
end repeat
end tell

So in Spark, create a new Applescript hotkey, paste in the script and away you go. Open the image in quickview, and if it needs to be flagged for deletion, hit your new hotkey. Then when you’re done, sort by label and you can quickly find all the flagged images and delete in bulk.

Note: you may need to enable labels in the finder view. Hit Apple + J and check against label

Job done.

(Freebie: in researching this I “found” a neat little keyboard shortcut: CTRL + Apple + 4 = rearrange desktop icons!)