Download, Install & Set Up ConVirt 2.0

 
 
 

Setting up the ConVirt 2.0 environment involves:

  • Installing ConVirt Management Server (CMS) on at least one computer on in a virtual machine.
  • Preparing each Managed Server to be managed by ConVirt.
  • Using a browser to access ConVirt and start managing your infrastructure.


Contents


CMS Download and Installation

There are two ways of getting CMS up and running.

  • Download a pre-packaged, configured appliance
  • Follow the step by step instructions given to setup the CMS


Using Appliance

You can use this approach if you have a high speed internet connection and an already running virtualization environment that allows you to import disk images.

Prerequsites :

  • ConVirt 1.1 environment with all patches applied. (Refer to [Patches])
  • Good internet connection to download large virtual appliance image.
  • 10 GB of hard disk space.
  • VT enabled hardware to run HVM image.

Procedure :

  • Start ConVirt 1.x
  • Select and Image Group and invoke the Import Appliance menu.
  • From the list select the ConVirt Appliance and Import it. Depending on your connection it will take few minutes to download the appliance.
  • If you do not have access to the internet from the ConVirt 1.x workstation, then download the appliance disk separately from this location and follow the instructions outlined here.
  • Now you should have ConVirt Appliance Image under the selected Image Group.
  • Select the ConVirt Appliance Image and press Edit Settings and do the following changes.
    • On the General Tab
      • CPU = 2
      • Memory = 512
    • Move to the Miscellaneous tab and make the following changes.
      • acpi = 1
      • apci = 1
      • network_mode = tap
  • Select the ConVirt Appliance image and provision it.
  • Start the appliance and go to its console window.
  • Login as convirt/convirt. It is recommended to change the password.
  • Change the directory to convirt and start CMS
 cd ~/convirt
 ./convirt-ctl start
  • Run the ifconfig eth0 command to find the IP assigned to it. For example,
 sudo ifconfig eth0
  • Start Firefox browser on other machine on the network and type in the url. http://ip-address:8081, The default credentials are admin/admin

Step by Step procedure

Either for the bandwidth reason or some other reason, if you wish to setup your CMS from scratch, follow instructions given below.

Ubuntu/Debian distribution

Fedora/RHEL/CentOS distribution

SUSE/SLES distribution

Firewall setup for VNC

In addition to CMS port (8081) as mentioned before, you should open up 6900:6999 port range for VNC. This is used by the ConVirt to allow VNC applet to access Virtual machine consoles. To do so,

  • Login as root on the CMS server and run the following command.
       iptables -I INPUT -m state --state NEW -p tcp --dport 6900:6999 -j ACCEPT


Preparing Managed Servers

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.

  • Install (if necessary) and configure Xen (3.0.4 or higher) or KVM (kvm-70 or higher) on the managed server. Note: chances are your linux distribution already includes either Xen or KVM. Almost all modern distributions do.
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: apt-get install ssh kvm socat dnsmasq uml-utilities lvm2 should do the trick.
  • Install required dependencies
For Xen and KVM ConVirt 2.0 requires
* dnsmasq and tunctl utilities for managing virtual networks on the managed server. The tunctl utility comes in tunctl package on Fedora/CentOS/RHEL while is part of uml-utilities package on rest of the linux distributions.
* socat is required for communicating to KVM console as well as for VNC. ( For rpms : rpm.pbone.net)
* For SLES 11: you need to install bc util.
  zypper in bc


Here are few links that might be also be useful for finding dependencies. Dependencies, Virtualization KVM, KVM downloads
  • From your ConVirt workstation (the machine where you installed ConVirt), verify that you can log on to the managed server using ssh.
  • Download the convirture-tools tar ball from:
 http://www.convirture.com/downloads/convirture-tools/2.0/
  • Extract the contents of the archive into a directory. For example:
 tar -xzf convirture-tools-2.0.tar.gz


  • Change to the <install_dir>/convirture-tools/install/managed_server/scripts directory, then use the convirt-tool command to check or configure the managed server. You will need to login as root user.

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
To configure the server, run:
  ./convirt-tool setup
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 detects the bridge and writes a summary of its operations to the /var/cache/convirt/server_info file. The convirt-tool version 2.0 also creates public bridge for KVM.
If you are using a firewall on Debian/Ubuntu you should verify that TCP port 8002 is open to allow migration (for both KVM and Xen), and TCP port 8006 is open in case of Xen to allow ConVirt to talk to the xend server.

Using ConVirt to manage your environment

Once the CMS and the managed servers are prepared,

  • Typical CMS startup
* 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.
  • Point the browser to CMS http://ip-address:8081/
  • Login using credentials (default admin/admin)
  • Select the Server Pool to which you'd like to add the new managed server. For example : QA Pool
  • Right mouse click to get to the context menu and select 'Add Server'.
  • Select the virtualization platform.
  • Provide the IP address or hostname of the managed server prepared in the previous section. Also provide ssh credentials and check the "Use Keys" option in the advanced section. Press ok to add the server.

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

  • To see the Graphic console of a Virtual Machine from the browser, you need to do some extra steps.
    • Install Java Plugin in to the browser. This is required to run the VNC applet.
    • ConVirt allows you to designate a host as VNC proxy, i.e. all VNC connections would be forwarded to this host and made accessible to the browser. The default VNC proxy is same host as the CMS. (If you wish to change, you can do that in the development.ini under src/convirt/web/convirt directory). For this to work, all managed servers should trust the VNC Proxy host via ssh keys. To do this, follow this procedure for EACH managed server.
* Login to the VNC Proxy | CMS host as the convirt user.
* As a part of the CMS setup, a ~/.ssh/cms_id_rsa and cms_id_rsa.pub files are already generated.
* Now from the VNC Proxy/CMS host. Login as convirt user and try logging in to management server using the key setup.Enter the passphrase that was used at the time of generating the keys in step above.
       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


* Similar trust is required to be setup between CMS and VNC proxy. In the default configuration as both are the same, this step can be skipped.
    • Change the Firewall to allow TCP traffic on port range 6900-6999. This port range is used by the ConVirt to allow VNC applet to access Virtual machine consoles. Login as root on the CMS server and run the following command.
       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

 
Tem mais dúvidas? Submeter um pedido

Comentários

 
Adding comment, please wait....

Provide Feedback on Article:

Subject:
Comments:*