Remote libvirt access
There are two opportunities to access libvirt remotely:
- command line access: remote access to virsh
- graphical user interface (GUI) access: Virtual Machine Manager
Both opportunities need a mechanism of remote access from the client host to the remote KVM server. That's why the remote access mechanisms are described first before command line and GUI access are described.
remote access mechanisms
ssh access
The easiest access mechanism from client to KVM server is ssh. Authentication can be done per password, per ssh authorized keys or kerberized via GSSAPI. The known authorization mechanisms for ssh apply.
The URI for remote access via ssh to a KVM server is: qemu+ssh:<servername>/system
.
tcp access
Kerberized access to libvirt is the most secure way for tcp access to a KVM server. The implementation is described here. The users that are allowed to access libvirt can be configured per KVM server and independently of ssh access or local user accounts.
The URI for remote access via tcp to a KVM server is: qemu+tcp:<servername>/system
.
remote access to virsh
The package 'libvirt-clients' has to be installed on the client to be able to execute the command 'virsh'. Via command line parameter '-c' the access is redirected to the KVM server. The command for ssh access is:
user@client:~# virsh -c qemu+ssh://kvm55/system Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh #
The command for tcp access is:
user@client:~# virsh -c qemu+tcp://kvm55/system Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh #
From the virsh command line all virsh commands can be executed like locally on the KVM server. See page 'Local libvirt access' for details.
Virtual Machine Manager
The best choice of a graphical user interface (GUI) for the administration of virtual hosts based on KVM is the Virtual Machine Manager (VMM). It can be installed on current Linux distributions. Under Linux Debian or Ubuntu the installation is done as follows:
root@client:~# apt-get install virt-manager
The VMM allows the administration of KVM hosts, virtual networks, storage and network interfaces. Virtual hosts can be configured, started, stopped, moved and suspended via VMM. The vhosts graphical consoles could also be accessed by VMM. In contradiction to the free versions of VMWare ESX/ESXi the VMM allows the administration of all KVM hosts and all vhosts of a site from one program window.
previous chapter | contents | next chapter