Cloud Computing Course, Part 3: Introducing the Virtual Machine Manager

In your own private cloud, there are a number of ways to work with virtual machines. Amazon's cloud uses Xen for its virtualization infrastructure, but in your own cloud, you are free to use Xen or KVM or Virtualbox, or whatever else you want. Lacking an EC2 console, administering and working with VMs in your cloud will require you to choose your own admin tools. There's always the command line, of course; you can launch a KVM or Xen machine without a GUI, but there's also a nice graphical program called virt-manager that I'm rather fond of; literally the 'Virtual Machine Manager' (see Figure 1). Using this tool, you get a bird's eye view of running virtual machines, including live performance graphs for network, CPU, and disk usage. The Virtual Machine Manager also makes it easy to communicate with other hosts running virtual machines; that would be your private cloud. It gets better; virt-manager works with both KVM and Xen, two common virtualization frameworks.

Figure 1 : Once connected Virt-Manager shows you all configured machines whether they are running or not.

The virt-manager application displays information about each machine, its run state, number of processors (VCPUs), memory usage, and CPU usage. It also lets you adjust the resources for a given virtual machine, adding processors,  memory, or even extra storage. There are tools for cloning VMs, creating new VMs, and communicating with VMs using a full graphical console; point and click. The latter is done using a built-in VNC client.

Most distributions have virt-manager in their repositories, but they sometimes tend to run well behind the version available directly from the Website itself (long term support distributions are particularly problematic that way). I don't find myself suggesting this often in 2011, but I highly recommend that you get the source and compile the latest version yourself. It's all Python code so perhaps compile isn't quite the right word but while you're there, make sure you also download the latest 'virtinst' code and prep that as well; virt-manager relies on it.

When you run virt-manager for the first time (see Figure 2, from a different machine), you'll find yourself looking at a rather sparse window, especially if you have no VMs currently running on the host system.

Figure 2 : The virt-manager application at start. No connection and no virtual machines.

When Virt-Manager starts, it will look to the host system, the 'real' hardware on which the virtual machines are running. Depending on the setup, the machine may be disconnected, at which point you will right click on the 'localhost' machine, and select Connect. Once this is done, you should then see all the virtual machines running on the system as shown in Figure 1).

What's particularly cool here is that you can run the Virtual Machine Manager on one machine, then monitor and with hypervisors on other machines. Click File on the menu bar then select Add Connection. You'll be asked to provide the remote hostname and authentication information for an SSH connection (see figure 3). You can also decide whether you want the remote monitor to connect automatically.

Figure 3 : On virt-manager instance can be used to connect to and monitor multiple hosts.

Click to highlight a machine (in any state), then click the Details button below and you can get more detailed information on the machine. The details window has two tabs, one labeled Overview and one labeled as Hardware. The overview window includes basic machine information, including a detailed graph of the CPU usage and memory use over time. There are also some basic configuration details such as the disk UUID and the machine's name.

Click the Hardware tab and you'll find out about your virtual iron,  including configured network cards, disks, CPUs, configured memory, and so on (see Figure 4). Some of the settings, memory, for instance, can be changed, but the machine must be in a stopped state for these changes to be made.

Figure 4 : A running machine and the hardware details.

You can also add additional virtual hardware to the machines by clicking the Add button below the left hand sidebar.  For instance, if you needed to add disk storage after the fact, you could create and add a disk image file and attach to that. 

Now that you have been properly introduced, stay tuned for the next part of this story where I will show you how you go about creating and starting a new virtual machine.

For part 1 of this series, click here.
For part 2, click here.

Facebook Comments Box

Leave a Reply

Your email address will not be published. Required fields are marked *