ConVirtMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

Convirt2 Installation

From ConVirt


Download, Install & Set Up ConVirt 2.0

Setting up the ConVirt 2.0 environment involves:

Note If you are upgrading an existing ConVirt Open Source deployment, please use Upgrade Guide



Contents


CMS Setup

Pick one of the following options to setup ConVirt Management Server.

Preparing Managed Servers

Install Virtualization Platform

Before you start managing a remote server using ConVirt, you need to ensure that it's properly configured. This can be done easily in a few quick steps.

NOTE: Each managed server needs to be prepared using the following procedure.

Here are some tips and pointers :
For Xen on CentOS/RHEL : Select the Virtualization option at the time of installation.
For Xen on SLES  : Select Xen Virtual Machine Host Server option. Here is a good link. Novell Doc
For KVM on Debian lenny/Ubuntu 8.10/9.04/10.04: sudo apt-get install ssh kvm socat dnsmasq uml-utilities lvm2 expect should do the trick.
For KVM on SLES : Go to Yast and choose "Install Hypervisor and tools", select KVM
For KVM on CentOS/RHEL 5.x :
yum groupinstall KVM; modprobe kvm;
Depending on your processor, modprobe kvm-amd or modprobe kvm-intel
For KVM on CentOS/RHEL 6.x : Select "Virtual Host" at the time of installation.
NOTE : RHEL 6 users, please visit RHEL 6 Networking section, before proceeding to next step.


Run convirt-tool

The convirt-tool script helps you do necessary changes to the managed server, so it is easily managed by ConVirt (CMS).

For the Xen platform, running this command configures the Xend Server to listen on port 8006 and opens port 8002 for migration. The command also detects the default bridge and writes a summary of its operations to the /var/cache/convirt/server_info file.
For the KVM platform, the command creates appropriate public bridges, required scripts and writes a summary of its operations to the /var/cache/convirt/server_info file.


Please follow the steps.

 wget --no-cache http://www.convirture.com/downloads/convirture-tools/2.1.1/convirture-tools-2.1.1.tar.gz
 scp convirture-tools-2.1.1.tar.gz root@managed-server:/root
 ssh root@managed-server
 
 Note ConVirt requires ability to login remotely using root account. For certain distribution root password 
            is not set by default. On such distribution, root password must be explicitly set. 
 tar -xzf convirture-tools-2.1.1.tar.gz

For example:

  cd ./convirture-tools/install/managed_server/scripts
To view the usage message, run:
  ./convirt-tool -h
To validate the platform without making any changes, run:
  ./convirt-tool --detect_only setup


Install required dependencies
  ./convirt-tool install_dependencies


To have a virtual machine connect to a network, bridge setup is required. With virtualization platform installation, depending on the version, you would have either xenbr0 or eth0 or br0 setup. You can verify this using the brctl show command. If you do not have any bridge, convirt-tool can set up bridges for each network interface.
  ./convirt-tool setup 

Warning : This might disconnect the server from the network, so please make sure you have an alternative way of getting to the server (Be on the server, iLO, DRAC etc). Also, in case the managed server is part of cluster, the server might reboot because of network connectivity loss resulting in node fencing.

If you have the bridge set up already done or want to handle bridge setup separately, run the following command. (er. ./convirt-tool --skip_bridge setup
NOTE : Make sure that you have atleast one bridge setup to which the virtual machines can connect.

For the Xen 4.0 /SLES 11/SLES 11 SP1 user, xen server should be listening on SSL option

./convirt-tool --xen_ssl --all setup


If you are using a firewall on Debian/Ubuntu you should verify that following ports are open
For Both: ssh port (usually 22)
For Both:6900-6999 ports for VNC tunnels
For Xen : TCP port 8002 to allow migration, 8006 to allow ConVirt to talk to Xend Server.
Fox KVM : TCP ports 8002 to 8012 for migration.


For Xen, you should also specify the default memory for dom0. (new since version 2.0.1)
 ./convirt-tool --dom0_mem 1024 setup

This will set the dom0_mem using xm command as well as change the grub.conf file to have dom0_mem parameter added to the kernel line.

Additional steps for configurations with ConVirt-Connector

This section is required only for setup using ConVirt-Appliance in Amazon EC2.


NOTEYou can skip this section, if during the ConVirt-Connector setup, you were able to add static route your router

 convirt-tool add_appliance_network appliance_network appliance_netmask connector_ip adapter

 This is to be used to setup access to remote ConVirt-Appliance management network via ConVirt-Connector.
 Adds a static route to the appliance network.
   
   appliance_netwok  : Typically 10.8.0.0 unless defaults in ConVirt-Appliance changed.
   appliance_netmask : Typically 255.255.255.0, unless defaults in ConVirt-Appliance changed.
   connector_ip      : IP of the connector appliance, this should be on the same network as the managed server.
   adapter           : The ethernet adapter which via which the connector_ip is reachable. Typically br0 or eth0.
   e.g  convirt-tool add_appliance_network 10.8.0.0 255.255.255.0 192.168.12.243 br0
         

In case, you want to revert changes, you can use the remove_appliance_network as follows.

   e.g  convirt-tool remove_appliance_network 10.8.0.0 255.255.255.0 192.168.12.243 br0

Using ConVirt to manage your environment

Once the CMS and the managed servers are prepared,

* Start the CMS
    cd ~/convirt
    ./convirt-ctl start
NOTE You would be prompted for passphrase if you have done ssh key based setup. By default the ~/.ssh/cms_id_rsa identity is used, if not found, it would use ~/.ssh/id_rsa. If neither of these are found, ConVirt would use passwords.

The new managed server would show up under the Server Pool. Now you can use ConVirt to create and manage complete life cycle of Virtual Machines on this server. Refer to documentation for more details.

You may want to do additional steps to further customize/setup your environment.

VNC setup

* Login to the CMS host as the linux user that starts the CMS ( ./convirt-ctl start)
* As a part of the CMS setup, a ~/.ssh/cms_id_rsa and cms_id_rsa.pub files are already generated.
* Now from the CMS host, try logging in to management server using the key setup. Enter the passphrase that was used at the time of CMS installation. (typically none)
       eval `ssh-agent -s`
       ssh-add ~/.ssh/cms_id_rsa
* Now you should be able to login to any managed server for which the keys were setup without requiring password.
        ssh root@managed-server
This should work most of the time, if you entered credentials as well as checked the "Use Keys" options while adding the managed server. ConVirt automatically adds a cms_id_rsa to authorized host of the managed server. If for some reason, this does not work, you need to copy ~/.ssh/cms_id_rsa.pub on to EACH managed server and append it to ~/.ssh/authorized_keys file.
       scp ~/.ssh/cms_id_rsa.pub root@managed-server:/root/.ssh/vnc_proxy_id_rsa.pub
       ssh root@managed-server
       cat ~/.ssh/vnc_proxy_id_rsa.pub >> ~/.ssh/authorized_keys


       iptables -I INPUT -m state --state NEW -p tcp --dport 6900:6999 -j ACCEPT

Setting up SSL for CMS

To setup SSL for CMS follow the links here.

Ubuntu/Debian distribution

Fedora/RHEL/CentOS distribution

SUSE/SLES distribution

NOTE : There is a known issues of login and logout redirects going to the non-http url causing error.

Retrieved from "http://convirture.com/wiki/index.php?title=Convirt2_Installation"

This page has been accessed 310,627 times. This page was last modified on 10 February 2014, at 23:30.


Find

Browse
Wiki Home
Installation
Documentation
HOWTOs
FAQ
Developer Resources
Forums
Blog
Website
Recent changes
Wiki Editing Help
Edit
View source
Editing help
This page
Discuss this page
New section
Printable version
Context
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list
Statistics
More...