Virtualization With KVM On An OpenSUSE 12.2 Server - Page 2
On this page
5 Connecting To The Guest
OpenSUSE 12.2 Desktop:
The KVM guest will now boot from the Debian Squeeze Netinstall CD and start the Debian installer - that's why we need to connect to the graphical console of the guest. You can do this with virt-manager on the OpenSUSE 12.2 desktop.
To make this work with virt-manager, we have to configure the local and the remote system in such a way that a password-less SSH login is possible from the local system to the remote system. To do this, we create a private/public key pair on the local system as a normal user (not root)...
Generating public/private rsa key pair.
Enter file in which to save the key (/home/falko/.ssh/id_rsa): <-- ENTER
Enter passphrase (empty for no passphrase): <-- ENTER
Enter same passphrase again: <-- ENTER
Your identification has been saved in /home/falko/.ssh/id_rsa.
Your public key has been saved in /home/falko/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| ..+.E |
| o = . |
| + + |
| o B |
| S o = o |
| o o + o |
| . o . o |
| . = |
| ..o |
... and copy the public key to the remote KVM host:
ssh-copy-id -i $HOME/.ssh/id_rsa.pub firstname.lastname@example.org
as a normal user (not root) on the desktop to start virt-manager (this is exactly the same on an Ubuntu desktop).
When you start virt-manager, you will most likely see the following message (Packages required for KVM usage). Click on No because we don't want to connect to the local libvirt daemon, but to the one on our OpenSUSE 12.2 KVM host.
For the same reason you can ignore the message Could not detect a default hypervisor.:
Go to File > Add Connection... to connect to our OpenSUSE 12.2 KVM host:
Select QEMU/KVM as Hypervisor, then check Connect to remote host, select SSH from the Method drop-down menu, fill in root in the Username field, type in the hostname (server1.example.com) or IP address (192.168.0.100) of the OpenSUSE 12.2 KVM host in the Hostname field, and click on Connect:
You should see vm10 as running. Mark that guest and click on the Open button to open the graphical console of the guest:
You should now be connected to the graphical console of the guest and see the Debian installer:
Now install Debian as you would normally do on a physical system. Please note that at the end of the installation, the Debian guest needs a reboot. The guest will then stop, so you need to start it again, either with virt-manager or like this on our OpenSUSE 12.2 KVM host command line:
OpenSUSE 12.2 KVM Host:
virsh --connect qemu:///system
Afterwards, you can connect to the guest again with virt-manager and configure the guest. If you install OpenSSH (package openssh-server) in the guest, you can connect to it with an SSH client (such as PuTTY).