14 Jul 2011

VMWare vSphere Hypervisor - Part 2 : Tools and Snapshots

In Part 1 of this series we looked at the VMWare vSphere Hypervisor product, the reasons for use plus installation and server VM image creation, in Part 2 I'm going to run through VMWare Tools for both platforms with accompanying machine instance snapshot and restore.

To provide maximum control of server VM's inside the ESXi environment you need to install the VMWare Tools for each instance. Doing so enables extra functionality such as dynamic vDisk resizing and controlled shutdown/restart.

VMWare Tools for Microsoft Servers
  • Open the vSphere client and connect to the ESXi hypervisor.
  • Right click the relevant MS Server instance from the left hand panel.
  • Select  'Guest / Install VMWare Tools'.
  • The CD image will mount inside the Server VM.
  • Access the image and install.

VMWare Tools for Linux Ubuntu Servers
  • Open the vSphere client and connect to the ESXi hypervisor.
  • Right click the relevant Ubuntu Linux server instance from the left hand panel.
  • Select  'Guest / Install VMWare Tools'.
  • Access the server instance CLI via the vSphere console (or SSH/terminal).
  • Log in and promote to su.
  • Install the prerequisite build tools and kernel headers.
apt-get install build-essential linux-headers-generic
  • Mount the CD and access the VMWare tools image.
mount /cdrom 
cd /cdrom
  • Copy the tools image to a temp directory (Replace with the given tools version name).
cp /cdrom/VmwareTools-x.x.x-xxxxx.tar.gz /tmp
  • Go to tmp.
cd /tmp
  • Extract the installation files.
tar -zxf VmwareTools-x.x.x-xxxxx.tar.gz
  • Change to the install directory.
cd vmware-tools-distrib
  • Start the installer.
./vmware-install.pl
  • Accept all defaults and once installed restart the server instance.
shutdown -r now
With VMWare Tools installed to either your Linux or Microsoft servers you can now safely and cleanly shutdown and restart directly from the vSphere Client.

VM Snapshots

One of the most beautiful things about server virtualisation has to be the snapshot facility, i.e being able to take an instant image of a running server, archive it, and restore if needed just as quickly. Something that just wasn't possible in the 'old days'of 'real' servers. Taking instance snapshots in ESXi couldn't be easier.

  • Open the vSphere Client
  • Connect to the ESXi hypervisor
  • Right click over the server instance (or highlight and use the menu bar snapshot icon).
  • Take Snapshot and name/save accordingly.

Once done you can view, edit and organise your snapshots in the Snapshot Manager. To revert to a previous image simply choose and click 'Go To'.



Server Logs

Another cool tool in vSphere Client provides the ability to access and view server logs from inside the management console. Very nice, no more trawling around the CLI, simply drop down the View menu and go to Administration / System Logs to see what's been going on behind the scenes.

In Part 3 we'll look at alternative methods of access and administration.

No comments:

Post a Comment