Saturday, October 18, 2008

ESXi, VMware, winscp for backup

All the clients I work with primarily use Microsoft products. I realise it's very difficult to get away from working with MS software because of interoperability and the extent to which most enterprises have become entrenched with their software over the past 15 years. Although I'd love to see companies universally adopt Open Source software, porting various aspects of industry applications would be unseemly expensive. In saying all this, however, the advent of free ESXi means that everyone can build a server and try out all manner of configurations.

Up until recently, convincing someone to move to anything Open Source could be difficult. Let me explain how ESXi has made this so much easier. 

Let's take a server and install ESXi (you can download the .iso from here - you need to register)

I set this up on a 2u HP server using a 2 disk mirrored RAID1 for the OS and 3 disk RAID5 for adding VMs. I also have a hot-swappable disk in there for a rainy day. 

ESXi runs on a VMware version of Linux. As far as I can gather, ESX runs on a modified version of Red Hat though ESXi is simpler than this. A tip after installing ESXi is to enable SSH as using the Virtual Infrastructure client later won't provide you access to the base OS. Believe me, this can simplify your future!

Enable SSH as follows (from this site)
  • Alt-F1 and then type in ‘unsupported’
  • edit /etc/inetd.conf (using vi)
  • remove the # (remark) sign in front of the SSH line
  • kill and restart the inetd process (or just reboot your server) - if you already have VMs on there you don't want to stop running so can't reboot your server do the following (unfortunately restarting services doesn't restart inet so you need to find and restart the specific process. 
  • At command prompt enter to get process id: ps -a |grep inetd
  • Once you've the pid enter: kill -HUP
SSH was a bit of a lifesaver for me. There are precious few free ways of backing up your virtual infrastructure using ESXi. By enabling SSH, you can create scheduled backups using winscp or you can synchronise your virtual machines with another file store using the winscp switch -keepuptodate

Once you've got VMware ESXi up and running you can create and install a multitude of Operating Systems and software configuration to play with. The VMs will be installed in the datastore on the ESXi machine and there will be 1 folder per vm. These can be uploaded to another location on your network or to disk. If you're using winscp, the VMs are in VMFS/volumes/datastore1/

Confirming interoperability of various systems and software means you can experiment with your clients systems at home. The ability to save your virtual machine to USB key means you can run it in your clients environment (with minor or no reconfiguration) on VMware server or player and work away!

No comments: