Archive

Archive for March, 2012

Quick note on running vSphere on Virtualbox

March 16th, 2012 No comments

So I’ve got 2 HP servers I use at home as VM hosts. An older DL380 G4 and a less old DL360 G5. Neither has much RAM or disk space (8G/~340GB and 6GB/200GB respectively), but the price was right… They were tagged for recycling at my workplace. One person’s trash is another person’s lab gear. After a few days of playing with ESXi, I knew I was going to want to play with vCenter. As one of my coworkers said, “VMware isn’t VMware without vCenter”. I basically didn’t have the spare resources to drop vCenter on either VM host without having it do nothing but vCenter, which was a poor option. I thought about it for a while and eventually decided to try to throw it on my “main” server in Virtualbox. My “main” server is just a pile of commodity bits and pieces sourced from the local Buy More for under ~$800 total. But what it lacks in performance and grace it makes up for in storage. On this server I used to run a to lab/learn for work on Virtualbox. I thought I’d give running vCenter on it a shot. Turns out VMware doesn’t really put much in your way in terms of doing this. There was an upside and a downside.

The upside is that in VMware, vCenter whined at me when I tried to trim down its RAM usage. I couldnt get vpxd to start, it would just crap out. The Googles told me errors I was getting were related to reducing the RAM on the guest below what the template had set up. However on Virtualbox it seemed more lenient. My environment isn’t terribly demanding and I’m getting by fine (for now) on only 5GB of ram for the guest.

The downside is a minor annoyance. During boot, the vCenter server does a quick check to see if it’s running on VMware flavored virutal hardware. The part that sucks is if you’re starting the VM from the CLI or a web interface, it stops during boot if it thinks it’s on a non-vmware host machine and requests you hit the any key. Its very minor, but not cool if you’re starting/restarting it on the command line or via a web interface. Basically it runs this little diddy in /etc/init.d/boot.vmware_warning:

       # Check if the vendor of the graphic card is VMware
       if ! hwinfo --gfxcard | grep -i "0x15ad" ; then

And then goes on to put a wall of text warning you about the sins of running non-vmware hypervisors. To get around this on my machine I simply ran that command (hwinfo --gfxcard), looked for the line the VMware script was most likely referencing (any string in the output would probably suffice), and dropped the string that appears for my Virtualbox hypervisor (and left the old one in for posterity)

        # Check if the vendor of the graphic card is VMware
        #if ! hwinfo --gfxcard | grep -i "0x15ad" ; then
        # Check if the vendor of the graphic card is Virtualbox
        if ! hwinfo --gfxcard | grep -i "0xbeef" ; then

Now it boots without missing a beat, and so far it’s been doing just fine running on virtualbox. No big hack, but I’m hoping it’ll help at least one of you out there in internet-land.

Standard disclaimer: I have and use free or legit licenses for everything I run. Don’t copy that floppy.

Categories: Uncategorized Tags: