Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter 17. Remote management of virtualized guests

This section explains how to remotely manage your Red Hat Enterprise Linux Virtualization guests using ssh or TLS and SSL.

17.1. Remote management with ssh

The ssh tool can be used to manage remote virtual machines. The method described uses the libvirt management connection securely tunneled over an SSH connection to manage the remote machines. All the authentication is done using SSH public key cryptography and passwords or passphrases gathered by your local SSH agent. In addition the VNC console for each guest virtual machine is tunneled over SSH .
SSH is usually configured by default so you probably already have SSH keys setup and no extra firewall rules needed to access the management service or VNC console.
Be aware of the issues with using SSH for remotely managing your virtual machines, including:
  • you require root log in access to the remote machine for managing virtual machines,
  • the initial connection setup process may be slow,
  • there is no standard or trivial way to revoke a user's key on all hosts or guests, and
  • ssh does not scale well with larger numbers of remote machines.
Configuring SSH access for virt-manager
The following instructions assume you are starting from scratch and do not already have SSH keys set up.
  1. You need a public key pair on the machine virt-manager is used. If ssh is already configured you can skip this command.
    $ ssh-keygen -t rsa
    
  2. To permit remote log in, virt-manager needs a copy of the public key on each remote machine running libvirt. Copy the file $HOME/.ssh/id_rsa.pub from the machine you want to use for remote management using the scp command:
    $ scp $HOME/.ssh/id_rsa.pub  root@somehost:/root/key-dan.pub
    
  3. After the file has copied, use ssh to connect to the remote machines as root and add the file that you copied to the list of authorized keys. If the root user on the remote host does not already have an list of authorized keys, make sure the file permissions are correctly set
    $ ssh root@
    somehost
    # mkdir /root/.ssh
    # chmod go-rwx /root/.ssh
    # cat /root/key-dan.pub >> /root/.ssh/authorized_keys
    # chmod go-rw /root/.ssh/authorized_keys
    
The libvirt daemon (libvirtd)
The libvirt daemon provide an interface for managing virtual machines. You must have the libvirtd daemon installed and running on every remote host that you need to manage. Using Red Hat Virtualization may require a special kernel or CPU hardware support, see Chapter 1, System requirements for details.
$ ssh root@
somehost
# chkconfig libvirtd on
# service libvirtd start
After libvirtd and SSH are configured you should be able to remotely access and manage your virtual machines. You should also be able to access your guests with VNC at this point.

 
 
  Published under the terms of the GNU General Public License Design by Interspire