Palegray.net - Code, Linux/BSD, Tech, and more
Home Projects Tutorials Forums About Contact

Debian 6 (Squeeze) KVM Virtualization Howto

Install and Configure virt-manager on the Workstation

After your Debian 6 VM reboots in VirtualBox, you'll be greeted with the initial boot screen.

Debian 6 first boot in a VirtualBox VM.

Log into the user account you created during the install.

Login page for a Debian 6 workstation.

Launch the "Synaptic" package manager from the "System" menu.

Synaptic package manager menu entry.

Click the "Search" button, enter "virt-manager" into the search field, and select the virt-manager package for installation.

Package search for virt-manager in Synaptic on Debian 6.

Perform another search for the "ssh-askpass" package, and select it for installation as well.

Package search for ssh-askpass in Synaptic on Debian 6.

Click the "Apply" button to start the installation process and confirm your requested packages.

Applying changes in Synaptic on Debian 6.

Confirming package installation in Synaptic on Debian 6.

Within a few minutes, your requested packages will be downloaded and installed.

Package installation progress in Synaptic on Debian 6.

From the "System" menu, click "Administration" followed by "Users and Groups" to open the user and group management tool.

Users and Groups menu entry on Debian 6.

In the dialog that appears, click the "Manage Groups" button.

Users Settings dialog on Debian 6.

A list of groups will be displayed. Select the "libvirt" group and click the "Properties" button.

Group listing dialog on Debian 6.

Check the box next to your user account in the "Group Members" list shown in the properties dialog box, and click "OK" to proceed.

Members of the libvirt group on Debian 6.

From the "System" menu, select the option to reboot the system. Click "Restart" in the dialog that appears.

System reboot dialog on Debian 6.

Once the system has rebooted, log back into your user account and select the "Terminal" program from the "Accessories" menu.

Terminal menu entry on Debian 6.

In the terminal window that appears, issue the following commands to edit your workstation's "/etc/hosts" file. As with all operations requiring administrative privileges, you will be prompted to enter your workstation's root password.

su - root
nano /etc/hosts

Add an entry for your KVM server as follows, replacing "192.168.2.10" with its IP address, "socrates" with its hostname, and "palegray" with your local domain name.

File: /etc/hosts

127.0.0.1        localhost.localdomain        localhost
192.168.2.10     socrates.palegray            socrates

Issue the key combination "Ctrl+x" to exit the editor. You will be prompted to save your changes before the editor returns you to the shell prompt. Next, issue the following command to generate an SSH keypair. You may accept all defaults when prompted.

ssh-keygen -t rsa

Issue the following commands to copy your workstation's public SSH key to the KVM server's "authorized_keys2" file. Substitute your KVM server's IP address for "192.168.2.10" in these commands.

scp ~/.ssh/id_rsa.pub root@192.168.2.10:/root/workstation-key.pub
ssh root@192.168.2.10 "cat ~/workstation-key.pub >> ~/.ssh/authorized_keys2"

This concludes the initial setup steps for your KVM management workstation. Next, you'll deploy your first virtual machine.

Continue: Deploy Your First KVM Virtual Machine
Previous: Install a Debian 6 Desktop System in VirtualBox