One of the pitfalls with using Windows as a workstation (which I need to as my wife uses the same machine – we consolidated into one machine) is that you cannot run virt-manager to handle your virtual machines. Additionally, the ESXi VMWare client only runs natively on Windows, so you must have at least one Windows machine, either hardware or virtualized. So what I will do is fire up a workstation (I will use Ubuntu as it has a lot of packages in its repos) and the install virt-manager on that machine. Not much horsepower is needed for this machine, just a GUI. I used a default Ubuntu distro (12.10), with 2 cores, and 2GB of RAM.
I won’t go through the steps on install Ubuntu as that for the most part is a next ~> next type of installer (as is common for many GUI based OS installs today). What we’re going to cover are the following steps:
- Install virt-manager package on our Ubuntu desktop
- Create SSH root keys
- Copy the SSH keys to the hypervisors we want to manage using ssh-copy-id
In Ubuntu, this is as simple as opening a terminal window and typing in
apt-get install virt-manager
Accept the prompts and off you go.
Create SSH root keys
The reason we are going to create these keys is that we are going to copy them to the hypervisors, so that if we need to SSH into them, we will login automatically, instead of entering credentials each time. Additionally, since virt-manager uses SSH to communicate with hypervisors, it will not ask for credentials each time it wishes to connect to a hypervisor. To create your SSH keys, simply enter
and accept all the prompts (or enter values for prompts if you would like – either way the key is secure, although the null method is said to be a potential loophole – I would use a small phrase, 10-30 chars in length, such as ‘a man a plan a canal panama’).
Copy the SSH keys to the hypervisors
Once you have the key created, you can copy the keys from the machine (and user you are logged in as) to the target machine by entering
ssh-copy-id account@target #example ssh-copy-id email@example.com
The target system will prompt you for the root password. Once this is completed, this will permit your currently logged in account to login to the hypervisor as root automatically. Simply type ssh wolverine.home.lab and you login as root automatically without a credential check.
Obviously please be careful with this machine, as that has carte blanche to your hypervisors and can be very dangerous if compromised. If you will be using this machine to manage your hypervisors, you may want to isolate this machine for this specific purpose, and perhaps disable internet access (or even its gateway).
You will find using virt-manager as not only an excellent tool for keeping an eye on your machines, but also for creating and moving machines (the one-step migrate feature is tremendous). More on that in its own page.