Friday, 9 February 2007

Creating a Virtual Machine

Yesterday I created my first virtual machine on the VMware Server. Again a piece of cake.

First you create the virtual machine via the VMware client console. You tell the console what type of machine you are creating. In my case it was a Solaris10 server. You assign a portion of the available memory and a portion of the available storage to the virtual machine.

Once you have done this, insert the Solaris Installation CD/DVD into your PC's CD/DVD drive, and press the green play button. The virtual machine powers up, and you are then presented with a virtual console to the server. At this point you obviously need experience in the installation of the Solaris Operating System.

Enter the details required eg Server Hostname, IP Address, Subnet Mask, Name Service, Default Gateway etc etc....

Next slice up the virtual disk into slices just as you would if you were installating a normal Solaris Server, tell it which pieces of the Solaris OS you want to install and then wait whilst the Operating System installs.

Once the OS has installed the server will reboot and there you have it, your virtual server. All you need to do then is treat it like a real server, install the latest OS patches and configure any services you want enabled or disabled, for example it is good practice to switch off NFS services and things such as sendmail to close down as many ports as possible to protect against portscanner attacks. You do this on Solaris10 using the svcadm disable network/nfs/client command or svcadm disable network/sendmail command.

Don't forget to allow console access if you want to be able to logon to the server via the network as root by commenting out the console line in /etc/default/login file.

Now your server is ready for whatever you then want to install on it eg Oracle.

The great thing about virtual machine is that once you have completed this default image, you can then save this image and use it to create other virtual machines.

A good example of this is a training environment where you may have a database with specific information set up for a training course. Once the training course has completed you will want to roll this database back to prior to the course. Traditionally this is done by creating a 'Gold Save' or 'Cold Backup' of this database which you keep and then restore as required which can take quite a bit of time depending on the size of the database. With VMware, all you need to do is re-instate the saved image, which takes minutes, eg Stop the Virtual Machine and re-create from the saved image, which is really just a reboot of the server back to a point in time saved VIM file.

Easy Peasy Lemon Squeezy.....

Next post will explain in more detail the rewind of a server...

No comments: