Getting Started Guide: ConVirt for KVM and Xen

 
 
 

Contents



1 Introduction

Welcome to ConVirt for KVM and Xen. ConVirt is a multi-platform solution for managing your virtualization and cloud infrastructure, including VMware, Hyper-V, KVM, Xen, Amazon Web Services, OpenStack, and more. ConVirt enables you to manage thousands of hosts and virtual machines throughout their full lifecycle in a highly scalable and secure fashion, with advanced automation and orchestration features such as high availability, backup and recovery, policy-based workload management, and quota-managed self-service.

This document is a step-by-step guide for setting up a small "learning" environment to deploy ConVirt and try out its features. The steps are simple:

  1. Set up the ConVirt Management Server (CMS)
  2. Configure your KVM or Xen hosts (no agent required!)
  3. Open your browser and start managing your KVM and Xen infrastructure

Note - this guide applies to ConVirt Enterprise 3.x and ConVirt Enterprise Cloud 3.x versions.


2 What You Will Need

The physical deployment architecture for ConVirt for KVM and Xen shown in the diagram below is the minimum configuration needed to set up a "learning" environment.

Kvmxen phys arch.png

You'll need to ensure that the following pre-requisites are in place:

2.1 Host Servers

You will need 2 freshly installed host servers in order to use ConVirt's advanced features. Each host should have the following minimum configuration:

  • Recommended Hardware
    • Dual-socket server
    • x86 hardware containing virtualization extensions (Intel VT or AMD-V)
    • 16 GB RAM
    • 50 GB free disk space
  • NICs
    • Two 1-Gbps network interfaces - one for management and another for creating VMs on an isolated network
  • Supported Operating Systems
    • Fresh install of Ubuntu 12.04 or one of the platforms in the Support Matrix:
      • CentOS
      • Debian
      • Fedora
      • RHEL
      • SUSE/SLES
      • Ubuntu
  • Hypervisor
    • One of the platforms in the Support Matrix. Generally:
      • kvm-70 or higher, or
      • Xen 3.0.4 or higher
      • NOTE: For libvirt-managed KVM or Xen, the host import process is slightly different, make sure to refer to this libvirt addendum.

2.2 Storage

  • Shared storage - you will need a shared storage system that your ConVirt-managed hosts can access. ConVirt supports a wide variety of storage types, including:
    • ATA Over Ethernet (AOE)
    • Network File system (NFS)
    • ISCSI
    • CLVM
    • CIFS
    • GFS
    • OCFS2
    • Fiber Channel (FC)
For the examples in this guide, we will use NFS storage.

2.3 Network

  • Internet access - you will need Internet access during your ConVirt setup, as some of the packages are downloaded over the network.
  • Firewall - you will need to change the firewall on your network to allow TCP traffic on port 8091 and port range 6900-6999.

2.3.1 Self Service Option

In order to create self-service Virtual Data Centers, ConVirt transforms existing virtualized infrastructure into a cloud by overlaying an Infrastructure-as-a-Service (IaaS) layer. To manage this layer, you need to set up several network resources:

  • Network Service - one additional VM to be used as a network service (with Ubuntu 12.04 or CentOS 5.x/6.x). This VM will have connectivity to
    • Management Network : to configure/manage the Network Service
    • Private VLAN Network : for running virtual machines owned by different tenants/VDCs using VLAN
    • Public Network : to make virtual machines available on the public network.
  • VLAN ID pool - a set of free VLAN IDs.
  • Public IP pool - a few unused IP addresses on public networks to allocate to virtual machines

Instructions for setting up these resources can be found in the Set Up Network Resources section of the Feature Walkthrough: ConVirt for KVM and Xen.

2.4 Client Machine/Browser

  • Browser - we recommend using Firefox as your browser for accessing the ConVirt Management Server





3 Setting Up ConVirt

ConVirt is built on a 3-tier agentless architecture that delivers enterprise-grade scalability, security, and integration.

  • Web-based Console
    • ConVirt allows you to monitor and manage your virtual and cloud infrastructure from anywhere via your web browser.
  • Data Repository
    • ConVirt provides a centralized, configurable data store for all of your virtual machine and server configuration, task history, and availability and performance information.
  • Agent-less Architecture
    • Because ConVirt does not require that you deploy an agent on the hosts being managed, it requires minimal effort to setup and install, it can be rolled out very quickly, and it scales effectively.
  • Multi-user Administration
    • ConVirt enables you to share responsibility for managing your virtualized environment between multiple administrators while maintaining full accountability.



Logical kvmxen.png

Because we are setting up a simple "learning" environment, we will install the ConVirt Management System (CMS) as a virtual machine on Host A, rather than on its own dedicated server. The physical and virtual deployment architecture is shown in the diagram below:

Virt arch1.png

3.1 Set Up the Virtualization Environment

If you are going to provision some new hosts for this learning environment, here are some high level instructions to get you started. If you are going to import existing host servers, you can skip this step.

  • Install and configure KVM (kvm-70 or higher) or Xen (3.0.4 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 RHEL 6 users, please visit the RHEL/CentOS 6 Networking section before proceeding to next step.
    • For KVM on CentOS/RHEL 6.x : Select "Virtual Host" at the time of installation.
    • For KVM on CentOS/RHEL 5.x (depending on your processor):
yum groupinstall KVM; modprobe kvm-amd;, or
yum groupinstall KVM; modprobe kvm-intel;

3.2 Set Up ConVirt Management Server

Install the ConVirt Management Server (CMS) as a Linux virtual appliance running on Host A:

  1. Download the CMS appliance disk image to Host A
    • Use the link you received in the Trial email from Convirture.
    • For KVM or Xen, use the .gz file, which contains the raw disk image
  2. Unpack it
    gunzip -c CMS-3.4.3-disk.gz > CMS-disk.img
  3. Start and connect to the CMS appliance
    1. Start/connect on Xen
      1. Use the appliance xen config file information from here CMS Xen Trial Config, save it as a file named "cms" (no extension), and make the following change:
        • Change the path in the disk parameter to wherever you unpacked the CMS-disk1.img appliance file
        disk=['file:/path-to-disk-image/CMS-disk.img,hda,w']
        • Change the bridge name in the vif entry to the appropriate bridge for your network (in this example, its set to "br0")
        vif=['mac=00:16:3e:20:d4:44,bridge=br0']
        • Optionally, you can also change the "name" value in the config file
      2. Start the appliance using the config file name
        xm create cms
      3. Get the vnc port
        • Use xm list to get the DOMID of the appliance
        xenstore-read /local/domain/DOMID/console/vnc-port
      4. Connect to the appliance using vncviewer
        • Use the port obtained from previous command
        vncviewer :PORT_NO
    2. Start/connect on KVM
      1. Start the appliance using the following command
        • Change the path to the location where you created the CMS-disk.img disk
        qemu-system-x86_64 -hda "/mnt/storage/vm_disks/CMS-disk.img" -net "nic,vlan=0,macaddr=00:16:3e:20:d4:44" -net "user,vlan=0" -std-vga "" -boot "c" -m "2048" -vnc ":25" -name "convirt_appliance" -smp "2" -redir tcp:2222::22 -redir tcp:8888::8091 -daemonize
        Or
        /usr/libexec/qemu-kvm -hda "/mnt/storage/vm_disks/CMS-disk.img" -net "nic,vlan=0,macaddr=00:16:3e:20:d4:44" -net "user,vlan=0" -boot "c" -m "2048" -vnc ":25" -name "convirt_appliance" -smp "2" -redir tcp:2222::22 -redir tcp:8888::8091 -daemonize
      2. Connect to the appliance using vncviewer
        • Note that in the above command port :25 is used
        vncviewer :25
  4. Log in to the CMS appliance
    • user : cms
    • password : convirt
  5. Find the IP address of the appliance to use in your browser
    • Run ifconfig to find the IP assigned to the CMS appliance
    sudo ifconfig eth0
  6. Open the CMS in your browser and activate the license
    • Start Firefox browser on another machine on the network
    • Using the IP address your discovered above, type in the url http://ip-address:8091
      • Troubleshooting - if the CMS does not come up in your browser, make sure that it is setup and running on the CMS appliance correctly:
        • Go into the CMS appliance and setup the CMS
          cd convirt-enterprise
          ./convirt-ctl setup
        • Start the CMS
          ./convirt-ctl start
        • Open the CMS in your browser at http://ip-address:8091
    • When the CMS opens, the License Management dialog will come up, so you can activate your trial license
    Licensemgmt licenseactivate.jpg
  7. Activate your Trial license
    • In the License Management-Activate License dialog, select the "Trial" radio button
    • Paste your Customer ID into the Customer ID text box
      • You received this ID in your ConVirt Trial Credentials email
    • Select "Activate" at the bottom of the dialog box
      • The CMS will connect to Convirture's license server
    • You should receive an alert "License applied successfully - Click OK to restart ConVirt". Click OK.
    Lic applied success.jpg
    • You should receive an alert "License activated successfully and ConVirt restarted - Click OK to login". Click OK.
    Lic activated success.jpg
    • You should see the Login panel for the CMS - login using the default credentials:
      • user : admin
      • password : admin
    Login.jpg

3.3 Set Up Managed Hosts

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

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

3.3.1 Run convirt-tool

The convirt-tool script helps you make necessary changes to the managed host, 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.

  1. Log in to the CMS virtual machine as CMS user account
  2. Copy the convirt-tool tarball to the managed host
    scp convirture-enterprise-tools-3.4.3.tar.gz root@managed-host:/root
  3. As a CMS user, log in to the managed host as root. DO NOT SKIP THIS STEP.
    ssh root@managed-host
    • NOTE: ConVirt requires the ability to log in remotely using the root account. For certain distributions, the root password is not set by default. On such distributions, the root password must be explicitly set.
  4. Extract the contents of the archive into a directory. For example:
    tar -xzf convirture-enterprise-tools-3.4.3.tar.gz
  5. Check compatibility between ConVirt and the managed host
    • Change to the ~/convirture-enterprise-tools/install/managed_server/scripts directory
    cd ./convirture-enterprise-tools/install/managed_server/scripts
    • Use the convirt-tool command to check or configure the managed host
      • To view the usage message, run:
    ./convirt-tool -h
      • To validate the platform without making any changes, run:
    ./convirt-tool --detect_only setup
  6. Install required dependencies:
    ./convirt-tool install_dependencies
  7. Setup network bridge
    • 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 host 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 host is part of a 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.
    ./convirt-tool --skip_bridge setup
    • NOTE : Make sure that you have at least one bridge set up 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.





4 The ConVirt Management Console

The ConVirt Management Console is a web-based dashboard that provides a single point of management and visibility into of your entire virtualized environment. ConVirt is multi-user, allowing the same environment to be managed by multiple administrators, and extensible, with multiple hooks for enterprise integration including LDAP/AD support, CLI, and API-based approaches.

Now that you have set up your hosts and installed the CMS, you are ready to log in to the ConVirt Management Console to start managing your virtualization environment. Open the ConVirt Management Console in your Firefox browser:

http://<appliance-ip-address>:8091/

The default application credentials are :

user : admin
password : admin

The Console has 3 basic elements:

  A. Navigation Pane
  B. Detail Tabs
  C. Task Pane


Console.gif


4.1 Navigation Pane

This pane displays an organized, hierarchical view of each entity managed by the system, including Data Centers (Server Pools, Hosts, VMs, and Templates), Infrastructure-as-a-Service Clouds (IaaS), and Virtual Data Centers (Self Service). ConVirt has a highly interactive interface that allows you to use a context-sensitive menu on any entity to invoke the appropriate operations. For example, if you select a VM, you can right mouse click to get to the context menu and invoke the desired operations.

4.2 Detail Tabs

Each entity in the system has at least an Overview tab and a Configuration tab, and if appropriate, a Servers tab. The Overview tab shows summary information as well as information that requires attention. It also shows various charts that shows recent performance.

4.3 Task Pane

All operations within ConVirt are carried out via the task engine subsystem. It runs periodic tasks of monitoring hosts and virtual machines, data rollups and periodic maintenance. Information about the tasks submitted and their status is presented in the task pane at the bottom.






5 Adding Managed Hosts

When you first open ConVirt, you're faced with an empty Data Center. But with ConVirt's agentless architecture, bringing your virtualization hosts under management is a very simple discovery process. Just create a new server pool, then point to the hosts in your environment you want to add to the pool:

5.1 Create A Server Pool

  • Server pools allow you to manage a set of hosts in a uniform fashion, including shared storage, network resources, and automation policies.
  • In the Navigation pane, right click on the Data Center and select "Add Server Pool"
Add server pool.png
  • Select the virtualization platform, give your new server pool a name, then click OK.
003.jpg
  • You should get a confirmation, and the new server pool should show up in the Navigation pane under the Data Center.
004.jpg

5.2 Add Managed Hosts

  • Now that you've added a server pool, you can import your hosts
  • In the Navigation pane, right click on the server pool created above, and select "Add Server"
005.jpg
  • You will be prompted to select the platform. Choose the appropriate platform, then click OK.
006.jpg
  • Type the host name or IP address of the server, and a user name and password for an account with permission to access the server.
007.jpg
  • If the connection is successful, the managed host is added to the Convirt console. You can now create and manage the complete life cycle of virtual machines on this managed host.
009.jpg
  • Use the same procedure to add your second managed host.
010.jpg

6 Add Shared Storage

  • ConVirt allows you to centrally declare your storage, and share it with your server pools. Once storage is shared, ConVirt automates the configuration and mounting of the storage on all hosts in the server pools.
  • The first step is to create a new storage resource at the Data Center level.
011.jpg
  • This dialog shows all the storage resources currently defined at the Data Center level (currently none). Click New to create a new resource.
012.jpg
  • This Storage Details dialog will walk us through the process of configuring and testing a new storage resource. Select NFS from the drop down menu and specify details.
    • The Mount Point here is key - ConVirt will automatically create this Mount Point and mount the storage on all the hosts on all the server pools where this storage is available. This is a key piece of automation you don’t have to worry about any more.
014.jpg
  • The next step is to validate that the storage configuration is correct and working. Convirt allows you to test this by temporarily mounting the storage to ensure that the entries are valid, and appropriate permissions exist.
    • Select a managed server where the mount point is already setup, and click Scan
    • If successful, ConVirt will show total and available storage.
017.jpg
  • The last step is to identify which server pools will have access to this storage. Click on the Server Pools tab, select the appropriate pools, and click Save.
018.jpg
  • We have now created a new NFS storage resource, validated it, and shared it with selected server pools.
019.jpg
  • Note that when we created the storage, ConVirt automatically mounted the storage on all the host servers in our selected server pools. Click the green Status button to see the detail. Any new hosts added to these server pools will automatically inherit access to this storage as well
020.jpg







7 Create And Manage Virtual Machines

ConVirt provides a toolset for day-to-day VM administration and lifecycle management, including templates-based provisioning, monitoring, configuration management, basic automation, live migration and much more.

7.1 Create A Template

A template is a set of related configuration information from which you can create one or more virtual machines. ConVirt ships with a set of default templates geared towards doing an ISO install, and can be easily customized to your environment.

First, lets create a template - we're going to do this by cloning and modifying an existing template:

  1. Select the Template Library
    021.jpg

  2. Drill down to the Common Templates group and select the Linux_CD_Installation template.
    022.jpg

  3. Right click on the template and select "Create Like":
    023.jpg

  4. Enter a name for the new template and click OK.
    024.jpg

  5. You should see the new template show up in the Common Templates group.
    025.jpg

  6. Right click on the new template, and select Edit Settings.
    026.jpg

  7. A Template Settings dialog box should pop up that will guide you through the process of editing the template. In the General section, change the default values to match your virtual machine template. For example, you can change the memory or change the number of virtual CPUs.
    028.jpg

  8. Next we'll modify the template to use an ISO file to create new virtual machines, rather than the physical cdrom device.
    • Select the Storage tab on the left, and then select the cdrom VM device.
    030.jpg

    • For Options, change "Use Physical Device" to "Use ISO File".
    • For Location, search for the location of the ISO file you'd like to use for this template.
    • Click Save
    031.jpg

  9. The template is now set up to use the specified ISO file to provision new virtual machines. Click OK.
    032.jpg

  10. Revise the version if you like, then click Yes.
    033.jpg

  11. You have just created a template that is suitable for provisioning multiple virtual machines in your environment.

7.2 Provision A Virtual Machine

Now that you have created your template, you can use it to provision a new virtual machine. There are several ways to provision a VM:

  • Provision on a server pool
  • Provision on a specific host
  • Provision from a template as the starting point

For this example, we will provision a VM on one of our host servers:

  1. Right click on the host, and select Provision Virtual Machine.
    034.jpg

  2. A dialog box will come up that will guide you through the provisioning process. Select the Template Group and Template Name you just created in the last section, and give the VM a name:
    036.jpg

  3. Next we will associate the shared storage with this new VM. Select the Storage tab on the left, click on the "writable" disk, and select Edit.
    037.jpg

  4. In the Storage Details dialog, click the "shared storage" icon on the right side.
    039.jpg

  5. Select the shared storage that you had previously created, and click OK.
    040.jpg

  6. The Location should be updated with appropriate location of your shared storage. Click Save.
    • NOTE: If you want to update your Template to use shared storage by default, then copy the Location field from this dialog, and save it to the Storage>Location field for the first disk in the Template.
    041.jpg

    • Click OK to provision the VM.
    042.jpg

  7. If the connection is successful, you should see the new VM show up in the Navigation page under your host server.
    043.jpg

7.3 Start & Connect To Your Virtual Machine

Now that you have provisioned your VM, you can start it, connect to it, and use it. And you can do all this from the ConVirt console:

  1. Right click on the new VM, and select Start.
    044.jpg

  2. When the VM icon turns green, the VM has been started
    045.jpg

  3. Right click on the VM, and select View Console
    046.jpg

  4. ConVirt asks which viewer you want to use to view the console:
    047.jpg

  5. Then ConVirt opens a console window to your new virtual machine.
    048.jpg



Next: Feature Walkthrough: ConVirt for KVM and Xen


 
Tem mais dúvidas? Submeter um pedido

Comentários

 
Adding comment, please wait....

Provide Feedback on Article:

Subject:
Comments:*