Thursday, November 5, 2009

VMWare + iWeb - network briding over different networks.

How to get VMWare Server working with iWeb's "Usable secondary addresses"

iWeb sets up their servers with a primary IP on 1 network, then allocates a group of IP's
on a secondary network. The problem is if you want to use VMWare Server to virtualize,
it's not so easy to get bridging mode working.

I was able to get it working and here's what I did (linux):

Enable IP forwarding on your server:

Edit the appropriate line in /etc/sysctl.conf like this:
net.ipv4.ip_forward = 1

You can enable it immediately for testing like this:
echo "1" > /proc/sys/net/ipv4/ip_forward

---------

Take a look at the other small network iWeb has allocated.. eg. 100.100.100.100-105/ 255.255.255.248

Bind the 1st IP to the host. Edit your corresponding /etc/network/interfaces file (ubuntu) to create the ethernet alias.

We're going to use that IP as the gateway for this small network and the linux host will route/forward between the 2 networks.

At this point you can use the other IP's in the network in VMWare with the 1st IP as the gateway.

I just tested this out by copying a 656MB ISO image to test the speed out, and I was able to copy the file over in 1 minute (10MB/s).

So there appear to be no performance issues related to this configuration.

Any other suggested solutions would also be appreciated.

Friday, January 30, 2009

How to convert a linux physical server to a VMWare virtual server (P2V)

I was recently asked by someone to help them convert their older physical dell poweredge server into a virtual server. They already have a nice new server running the free version
of VMWare Server (formerly GSX), hosting a number of machines already.

The software I decided to use is called BackupEdge, from Microlite. They offer a free 60 day trial, so there was no need to purchase it, however using it with such success, has forced me to consider buying it as a backup software.

BackupEdge supports most flavours of linux (in this case a very old Redhat 9 box), and supports lots of different backup targets (CD/DVD drive, ftp, S3, etc.). I decided to backup the machine to ftp as there was already an external ftp server on the same local network.

The procedure was really easy, basically start a full backup of the system, and I ended up with a number of large files on the FTP server.

Then I used BackupEdge to create a recovery boot cd. The image itself was only around 5MB and is configurable to include extra drivers/modules for your boot environment. Remember we are switching from a hardware environment (some kind of raid card + physical hardware NIC) to a BusLogic/LSI Logic scsi controller and PCNet32/Intel 1000 virtual nic.

I had to modify the modules.conf and re-generate a new initial ramdisk before creating the recovery cd image. Be sure after creating your recovery image, to revert your initial ramdisk back to the original, if you don't any your machine is forced to reboot, it may not come back up.

The ftp backup took only around 45 minutes. Then I created the target virtual machine, mounted the ISO image created as a cdrom drive, and started it. The recoverEdge software started with support for the scsi and network. I was able to configure the network parameters and pull the backup files from the FTP server. About 20 minutes to restore the filesystem, reboot the virtual machine and everything was running virtually.

If you are switching a physical machine with active/running IP's, be sure to disconnect the port that server is connected to after backing it up. Otherwise you'll potentially have IP connectivity issues.

I think Microlite needs to start marketing their software also as a good solution to P2V conversion, even add a features into their recovery cd creation tool to add in the required modules/drivers/config.

Enjoy.