Preparing Managed Servers
NOTE: Skip this section if you want to want to use ConVirt for Amazon/OpenStack Cloud Management only.
NOTE: Skip this section for ESXi/vSphere/vCenter environments.
NOTE: For Hyper-V environment, simply make sure hyper-v is installed, you can ping the server from another machine and Enable-PSRemoting -force is executed as administrator.
1.1 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 :
-
Debian/Ubuntu
- 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.
- Ubuntu 14.04 : disables logging in as root user by default. As ConVirt requires this, follow the instructions here to allow root logins.
- sudo bash
- Ubuntu 14.04 : disables logging in as root user by default. As ConVirt requires this, follow the instructions here to allow root logins.
- In /etc/ssh/sshd_config change PermitRootLogin without-password line as follows :
- PermitRootLogin yes
- service ssh restart
- passwd root
- (choose appropriate password)
- Ubuntu 14.04 (Xen) : As managing Xen on Ubuntu 14.04 using libvirt via xl stack does not provide migration, you may want to use xm stack instead. To do so, change the TOOLSTACK=xm and reboot machine.
-
SUSE/SLES
- For Xen on SLES : Select Xen Virtual Machine Host Server option. Here is a good link. Novell Doc
- For KVM on SLES : Go to Yast and choose "Install Hypervisor and tools", select KVM
-
CentOS/RHEL
- For Xen on CentOS/RHEL 5.x: Select the Virtualization option at the time of installation.
- 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 5.x :
- For Xen and KVM, Disable SELINUX by setting SELINUX=permissive in /etc/sysconfig/selinux file.
- For KVM on CentOS/RHEL 6.x,7.x : Select "Virtual Host" at the time of installation.
- NOTE : RHEL 6.x or RHEL 7.x users, please visit RHEL/CentOS 6.x or RHEL/CentOS 7.xNetworking section, before proceeding to next step.
1.2 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-enterprise-tools-{{{convirt_ver}}}.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-enterprise-tools-{{{convirt_ver}}}.tar.gz
- Change to the ~/convirture-enterprise-tools/install/managed_server/scripts directory, then use the convirt-tool command to check or configure the managed server.
For example:
cd ./convirture-enterprise-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
- Note: For SLES 11 SP3, you may see "Valid metadata not found at specified URL(s).", If you see this, the required dependencies may not be installed. The workaround for this is to run the ./convirt-tool install_dependencies again.
- 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.
Comments