Download, Install & Set Up ConVirt 2.0

 
 
 

Download, Install & Set Up ConVirt 2.0

Setting up the ConVirt 2.0 environment involves:

  • Installing ConVirt Management Server (CMS) on one computer or in a virtual machine.
  • Preparing each Managed Server to be managed by ConVirt.
  • Using Firefox 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 with ConVirt 1.x

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 Download and 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 cms user with convirt as password. 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


Using Appliance with Xen

You can use this approach if you have a high speed internet connection and an already running Xen virtualization environment

Prerequsites :

  • Xen virtualization enabled Server
  • Good internet connection to download large virtual appliance image.
  • 10 GB of hard disk space.
  • VT enabled hardware to run HVM image.


Procedure :

  • Download the appliance disk image here.
  • Get the appliance xen config file from here.
* Change the path in the disk parameter.
* Change the bridge name in the vif entry
  • Start the appliance using the config file name.
xm create convirt_appliance 
  • get the vnc port using the following command. Use xm list to get the DOMID of the appliance.
xenstore-read /local/domain/DOMID/console/vnc-port
  • connect to the appliance using vncviewer and port obtained from previous command.
vncviewer :PORT_NO
  • Login as cms user with convirt as password. 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


Using Appliance with KVM

You can use this approach if you have a high speed internet connection and an already running KVM virtualization environment

Prerequsites :

  • KVM virtualization enabled Server
  • Good internet connection to download large virtual appliance image.
  • 10 GB of hard disk space.
  • VT enabled hardware to run HVM image.


Procedure :

  • Download the appliance disk image here
  • Start the appliance using the following command.(Change the path to the location where you downloaded the disk)
 qemu-system-x86_64 -hda "/mnt/storage/vm_disks/c2_appliance.disk.xm" -net "nic,vlan=0,macaddr=00:16:3e:20:d4:44" -net "user,vlan=0" -std-vga "" -boot "c" -m "512" -vnc ":25" -name "convirt_appliance" -smp "2" -redir tcp:2222::22 -redir tcp:8888::8081 -daemonize
  • Connect using vncviewer. In the above command port :25 is used.
 vncviewer :25 
  • Login as cms user with convirt as password. 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
  • Make the change in such a way so that it survives reboot. Please refer to distribution specific instructions.

Apply Recommended patches

  • No patches for ConVirt 2.0.1 as of now.

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.

  • 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/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.

  • Login to CMS server as CMS user account.
  • Copy the convirt-tool tarball to managed server.
 scp convirture-tools-2.0.1.tar.gz root@managed-server:/root
  • As a CMS user, Login to the managed server as root. DO NOT SKIP THIS STEP.
 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. 
  • Extract the contents of the archive into a directory. For example:
 tar -xzf convirture-tools-2.0.1.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


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 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 with 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.

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. We will assume this for rest of the setup procedure.
* 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


    • 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
  • Please checkout this page that explains how VNC setup works. This might help troubleshoot VNC problems.

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.

 
또 다른 질문이 있으십니까? 문의 등록

댓글

 
Adding comment, please wait....

Provide Feedback on Article:

Subject:
Comments:*
Zendesk 제공