| <?xml version='1.0' encoding='utf-8' ?> |
| <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
| <!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent"> |
| %BOOK_ENTITIES; |
| ]> |
| |
| <!-- Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <section id="citrix-xenserver-installation"> |
| <title>Citrix XenServer Installation for &PRODUCT;</title> |
| <para>If you want to use the Citrix XenServer hypervisor to run guest virtual machines, install |
| XenServer 6.0 or XenServer 6.0.2 on the host(s) in your cloud. For an initial installation, |
| follow the steps below. If you have previously installed XenServer and want to upgrade to |
| another version, see <xref linkend="xenserver-version-upgrading"/>.</para> |
| <section id="system-requirements-xenserver-hosts"> |
| <title>System Requirements for XenServer Hosts</title> |
| <itemizedlist> |
| <listitem> |
| <para>The host must be certified as compatible with one of the following. See the Citrix |
| Hardware Compatibility Guide: <ulink url="http://hcl.xensource.com" |
| >http://hcl.xensource.com</ulink></para> |
| <itemizedlist> |
| <listitem> |
| <para>XenServer 5.6 SP2</para> |
| </listitem> |
| <listitem> |
| <para>XenServer 6.0</para> |
| </listitem> |
| <listitem> |
| <para>XenServer 6.0.2</para> |
| </listitem> |
| </itemizedlist> |
| </listitem> |
| <listitem> |
| <para>You must re-install Citrix XenServer if you are going to re-use a host from a previous |
| install.</para> |
| </listitem> |
| <listitem> |
| <para>Must support HVM (Intel-VT or AMD-V enabled)</para> |
| </listitem> |
| <listitem> |
| <para>Be sure all the hotfixes provided by the hypervisor vendor are applied. Track the |
| release of hypervisor patches through your hypervisor vendor’s support channel, and apply |
| patches as soon as possible after they are released. &PRODUCT; will not track or notify |
| you of required hypervisor patches. It is essential that your hosts are completely up to |
| date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to |
| support any system that is not up to date with patches.</para> |
| </listitem> |
| <listitem> |
| <para>All hosts within a cluster must be homogeneous. The CPUs must be of the same type, |
| count, and feature flags.</para> |
| </listitem> |
| <listitem> |
| <para>Must support HVM (Intel-VT or AMD-V enabled in BIOS)</para> |
| </listitem> |
| <listitem> |
| <para>64-bit x86 CPU (more cores results in better performance)</para> |
| </listitem> |
| <listitem> |
| <para>Hardware virtualization support required</para> |
| </listitem> |
| <listitem> |
| <para>4 GB of memory</para> |
| </listitem> |
| <listitem> |
| <para>36 GB of local disk</para> |
| </listitem> |
| <listitem> |
| <para>At least 1 NIC</para> |
| </listitem> |
| <listitem> |
| <para>Statically allocated IP Address</para> |
| </listitem> |
| <listitem> |
| <para>When you deploy &PRODUCT;, the hypervisor host must not have any VMs already |
| running</para> |
| </listitem> |
| </itemizedlist> |
| <warning> |
| <para>The lack of up-do-date hotfixes can lead to data corruption and lost VMs.</para> |
| </warning> |
| </section> |
| <section id="xenserver-installation-steps"> |
| <title>XenServer Installation Steps</title> |
| <orderedlist> |
| <listitem> |
| <para>From <ulink url="https://www.citrix.com/English/ss/downloads/" |
| >https://www.citrix.com/English/ss/downloads/</ulink>, download the appropriate version |
| of XenServer for your &PRODUCT; version (see <xref |
| linkend="system-requirements-xenserver-hosts"/>). Install it using the Citrix XenServer |
| Installation Guide.</para> |
| <note><title>Older Versions of XenServer</title> |
| <para>Note that you can download the most recent release of XenServer without having a Citrix account. If you wish to download older versions, you will need to create an account and look through the download archives.</para> |
| </note> |
| </listitem> |
| <listitem> |
| <para>After installation, perform the following configuration steps, which are described in |
| the next few sections:</para> |
| <informaltable frame="all"> |
| <tgroup cols="2" align="left" colsep="1" rowsep="1"> |
| <colspec colname="c1"/> |
| <colspec colname="c2"/> |
| <thead> |
| <row> |
| <entry><para>Required</para></entry> |
| <entry><para>Optional</para></entry> |
| </row> |
| </thead> |
| <tbody> |
| <row> |
| <entry><para><xref linkend="config-xenserver-dom0-memory"/></para></entry> |
| <entry><para><xref linkend="xenserver-support-pkg-installation"/></para></entry> |
| </row> |
| <row> |
| <entry><para><xref linkend="xenserver-username-password"/></para></entry> |
| <entry><para>Set up SR if not using NFS, iSCSI, or local disk; see <xref |
| linkend="xenserver-primary-storage-setup"/></para></entry> |
| </row> |
| <row> |
| <entry><para><xref linkend="xenserver-time-sync"/></para></entry> |
| <entry><para><xref linkend="xenserver-iscsi-multipath-setup"/></para></entry> |
| </row> |
| <row> |
| <entry><para><xref linkend="xenserver-get-deploy-license"/></para></entry> |
| <entry><para><xref linkend="xenserver-physical-network-setup"/></para></entry> |
| </row> |
| </tbody> |
| </tgroup> |
| </informaltable> |
| </listitem> |
| </orderedlist> |
| </section> |
| <section id="config-xenserver-dom0-memory"> |
| <title>Configure XenServer dom0 Memory</title> |
| <para>Configure the XenServer dom0 settings to allocate more memory to dom0. This can enable |
| XenServer to handle larger numbers of virtual machines. We recommend 2940 MB of RAM for |
| XenServer dom0. For instructions on how to do this, see <ulink |
| url="http://support.citrix.com/article/CTX126531" |
| >http://support.citrix.com/article/CTX126531</ulink>. The article refers to XenServer 5.6, |
| but the same information applies to XenServer 6.0.</para> |
| </section> |
| <section id="xenserver-username-password"> |
| <title>Username and Password</title> |
| <para>All XenServers in a cluster must have the same username and password as configured in |
| &PRODUCT;.</para> |
| </section> |
| <section id="xenserver-time-sync"> |
| <title>Time Synchronization</title> |
| <para>The host must be set to use NTP. All hosts in a pod must have the same time.</para> |
| <orderedlist> |
| <listitem> |
| <para>Install NTP.</para> |
| <programlisting># yum install ntp</programlisting> |
| </listitem> |
| <listitem> |
| <para>Edit the NTP configuration file to point to your NTP server.</para> |
| <programlisting># vi /etc/ntp.conf</programlisting> |
| <para>Add one or more server lines in this file with the names of the NTP servers you want |
| to use. For example:</para> |
| <programlisting>server 0.xenserver.pool.ntp.org |
| server 1.xenserver.pool.ntp.org |
| server 2.xenserver.pool.ntp.org |
| server 3.xenserver.pool.ntp.org |
| </programlisting> |
| </listitem> |
| <listitem> |
| <para>Restart the NTP client.</para> |
| <programlisting># service ntpd restart</programlisting> |
| </listitem> |
| <listitem> |
| <para>Make sure NTP will start again upon reboot.</para> |
| <programlisting># chkconfig ntpd on</programlisting> |
| </listitem> |
| </orderedlist> |
| </section> |
| <section id="xenserver-licensing"> |
| <title>Licensing</title> |
| <para>Citrix XenServer Free version provides 30 days usage without a license. Following the 30 |
| day trial, XenServer requires a free activation and license. You can choose to install a |
| license now or skip this step. If you skip this step, you will need to install a license when |
| you activate and license the XenServer.</para> |
| <section id="xenserver-get-deploy-license"> |
| <title>Getting and Deploying a License</title> |
| <para>If you choose to install a license now you will need to use the XenCenter to activate |
| and get a license.</para> |
| <orderedlist> |
| <listitem> |
| <para>In XenCenter, click Tools > License manager.</para> |
| </listitem> |
| <listitem> |
| <para>Select your XenServer and select Activate Free XenServer.</para> |
| </listitem> |
| <listitem> |
| <para>Request a license.</para> |
| </listitem> |
| </orderedlist> |
| <para>You can install the license with XenCenter or using the xe command line tool.</para> |
| </section> |
| </section> |
| <section id="xenserver-support-pkg-installation"> |
| <title>Install &PRODUCT; XenServer Support Package (CSP)</title> |
| <para>(Optional)</para> |
| <para>To enable security groups, elastic load balancing, and elastic IP on XenServer, download |
| and install the &PRODUCT; XenServer Support Package (CSP). After installing XenServer, perform |
| the following additional steps on each XenServer host.</para> |
| <orderedlist> |
| <listitem> |
| <para>Download the CSP software onto the XenServer host from one of the following |
| links:</para> |
| <para>For XenServer 6.0.2:</para> |
| <para><ulink |
| url="http://download.cloud.com/releases/3.0.1/XS-6.0.2/xenserver-cloud-supp.tgz" |
| >http://download.cloud.com/releases/3.0.1/XS-6.0.2/xenserver-cloud-supp.tgz</ulink></para> |
| <para>For XenServer 5.6 SP2:</para> |
| <para><ulink url="http://download.cloud.com/releases/2.2.0/xenserver-cloud-supp.tgz" |
| >http://download.cloud.com/releases/2.2.0/xenserver-cloud-supp.tgz</ulink></para> |
| <para>For XenServer 6.0:</para> |
| <para><ulink url="http://download.cloud.com/releases/3.0/xenserver-cloud-supp.tgz" |
| >http://download.cloud.com/releases/3.0/xenserver-cloud-supp.tgz</ulink></para> |
| </listitem> |
| <listitem> |
| <para>Extract the file:</para> |
| <programlisting># tar xf xenserver-cloud-supp.tgz</programlisting> |
| </listitem> |
| <listitem> |
| <para>Run the following script:</para> |
| <programlisting># xe-install-supplemental-pack xenserver-cloud-supp.iso</programlisting> |
| </listitem> |
| <listitem> |
| <para>If the XenServer host is part of a zone that uses basic networking, disable Open |
| vSwitch (OVS):</para> |
| <programlisting># xe-switch-network-backend bridge</programlisting> |
| <para>Restart the host machine when prompted.</para> |
| </listitem> |
| </orderedlist> |
| <para>The XenServer host is now ready to be added to &PRODUCT;.</para> |
| </section> |
| <section id="xenserver-primary-storage-setup"> |
| <title>Primary Storage Setup for XenServer</title> |
| <para>&PRODUCT; natively supports NFS, iSCSI and local storage. If you are using one of these |
| storage types, there is no need to create the XenServer Storage Repository ("SR").</para> |
| <para>If, however, you would like to use storage connected via some other technology, such as |
| FiberChannel, you must set up the SR yourself. To do so, perform the following steps. If you |
| have your hosts in a XenServer pool, perform the steps on the master node. If you are working |
| with a single XenServer which is not part of a cluster, perform the steps on that |
| XenServer.</para> |
| <orderedlist> |
| <listitem> |
| <para>Connect FiberChannel cable to all hosts in the cluster and to the FiberChannel storage |
| host.</para> |
| </listitem> |
| <listitem id="rescan-scsi"> |
| <para>Rescan the SCSI bus. Either use the following command or use XenCenter to perform an |
| HBA rescan.</para> |
| <programlisting># scsi-rescan</programlisting> |
| </listitem> |
| <listitem> |
| <para>Repeat step <xref linkend="rescan-scsi"/> on every host.</para> |
| </listitem> |
| <listitem id="verify-scsi"> |
| <para>Check to be sure you see the new SCSI disk.</para> |
| <programlisting># ls /dev/disk/by-id/scsi-360a98000503365344e6f6177615a516b -l</programlisting> |
| <para>The output should look like this, although the specific file name will be different |
| (scsi-<scsiID>):</para> |
| <programlisting>lrwxrwxrwx 1 root root 9 Mar 16 13:47 |
| /dev/disk/by-id/scsi-360a98000503365344e6f6177615a516b -> ../../sdc |
| </programlisting> |
| </listitem> |
| <listitem> |
| <para>Repeat step <xref linkend="verify-scsi"/> on every host.</para> |
| </listitem> |
| <listitem> |
| <para>On the storage server, run this command to get a unique ID for the new SR.</para> |
| <programlisting># uuidgen</programlisting> |
| <para>The output should look like this, although the specific ID will be different:</para> |
| <programlisting>e6849e96-86c3-4f2c-8fcc-350cc711be3d</programlisting> |
| </listitem> |
| <listitem> |
| <para>Create the FiberChannel SR. In name-label, use the unique ID you just |
| generated.</para> |
| <programlisting> |
| # xe sr-create type=lvmohba shared=true |
| device-config:SCSIid=360a98000503365344e6f6177615a516b |
| name-label="e6849e96-86c3-4f2c-8fcc-350cc711be3d" |
| </programlisting> |
| <para>This command returns a unique ID for the SR, like the following example (your ID will |
| be different):</para> |
| <programlisting>7a143820-e893-6c6a-236e-472da6ee66bf</programlisting> |
| </listitem> |
| <listitem> |
| <para>To create a human-readable description for the SR, use the following command. In uuid, |
| use the SR ID returned by the previous command. In name-description, set whatever friendly |
| text you prefer.</para> |
| <programlisting># xe sr-param-set uuid=7a143820-e893-6c6a-236e-472da6ee66bf name-description="Fiber Channel storage repository"</programlisting> |
| <para>Make note of the values you will need when you add this storage to &PRODUCT; later |
| (see <xref linkend="primary-storage-add"/>). In the Add Primary Storage dialog, in |
| Protocol, you will choose PreSetup. In SR Name-Label, you will enter the name-label you |
| set earlier (in this example, e6849e96-86c3-4f2c-8fcc-350cc711be3d).</para> |
| </listitem> |
| <listitem> |
| <para>(Optional) If you want to enable multipath I/O on a FiberChannel SAN, refer to the |
| documentation provided by the SAN vendor.</para> |
| </listitem> |
| </orderedlist> |
| </section> |
| <section id="xenserver-iscsi-multipath-setup"> |
| <title>iSCSI Multipath Setup for XenServer (Optional)</title> |
| <para>When setting up the storage repository on a Citrix XenServer, you can enable multipath |
| I/O, which uses redundant physical components to provide greater reliability in the connection |
| between the server and the SAN. To enable multipathing, use a SAN solution that is supported |
| for Citrix servers and follow the procedures in Citrix documentation. The following links |
| provide a starting point:</para> |
| <itemizedlist> |
| <listitem> |
| <para><ulink url="http://support.citrix.com/article/CTX118791" |
| >http://support.citrix.com/article/CTX118791</ulink></para> |
| </listitem> |
| <listitem> |
| <para><ulink url="http://support.citrix.com/article/CTX125403" |
| >http://support.citrix.com/article/CTX125403</ulink></para> |
| </listitem> |
| </itemizedlist> |
| <para>You can also ask your SAN vendor for advice about setting up your Citrix repository for |
| multipathing.</para> |
| <para>Make note of the values you will need when you add this storage to the &PRODUCT; later |
| (see <xref linkend="primary-storage-add"/>). In the Add Primary Storage dialog, in Protocol, |
| you will choose PreSetup. In SR Name-Label, you will enter the same name used to create the |
| SR.</para> |
| <para>If you encounter difficulty, address the support team for the SAN provided by your vendor. |
| If they are not able to solve your issue, see Contacting Support.</para> |
| </section> |
| <section id="xenserver-physical-network-setup"> |
| <title>Physical Networking Setup for XenServer</title> |
| <para>Once XenServer has been installed, you may need to do some additional network |
| configuration. At this point in the installation, you should have a plan for what NICs the |
| host will have and what traffic each NIC will carry. The NICs should be cabled as necessary to |
| implement your plan.</para> |
| <para>If you plan on using NIC bonding, the NICs on all hosts in the cluster must be cabled |
| exactly the same. For example, if eth0 is in the private bond on one host in a cluster, then |
| eth0 must be in the private bond on all hosts in the cluster.</para> |
| <para>The IP address assigned for the management network interface must be static. It can be set |
| on the host itself or obtained via static DHCP.</para> |
| <para>&PRODUCT; configures network traffic of various types to use different NICs or bonds on |
| the XenServer host. You can control this process and provide input to the Management Server |
| through the use of XenServer network name labels. The name labels are placed on physical |
| interfaces or bonds and configured in &PRODUCT;. In some simple cases the name labels are not |
| required.</para> |
| <para>When configuring networks in a XenServer environment, network traffic labels must be |
| properly configured to ensure that the virtual interfaces are created by &PRODUCT; are bound |
| to the correct physical device. The name-label of the XenServer network must match the |
| XenServer traffic label specified while creating the &PRODUCT; network. This is set by running |
| the following command:</para> |
| <programlisting>xe network-param-set uuid=<network id> name-label=<CloudStack traffic label></programlisting> |
| <section id="xenserver-public-network-config"> |
| <title>Configuring Public Network with a Dedicated NIC for XenServer (Optional)</title> |
| <para>&PRODUCT; supports the use of a second NIC (or bonded pair of NICs, described in <xref |
| linkend="xenserver-nic-bonding"/>) for the public network. If bonding is not used, the |
| public network can be on any NIC and can be on different NICs on the hosts in a cluster. For |
| example, the public network can be on eth0 on node A and eth1 on node B. However, the |
| XenServer name-label for the public network must be identical across all hosts. The |
| following examples set the network label to "cloud-public". After the management |
| server is installed and running you must configure it with the name of the chosen network |
| label (e.g. "cloud-public"); this is discussed in <xref |
| linkend="management-server-install-flow"/>.</para> |
| <para>If you are using two NICs bonded together to create a public network, see <xref |
| linkend="xenserver-nic-bonding"/>.</para> |
| <para>If you are using a single dedicated NIC to provide public network access, follow this |
| procedure on each new host that is added to &PRODUCT; before adding the host.</para> |
| <orderedlist> |
| <listitem> |
| <para>Run xe network-list and find the public network. This is usually attached to the NIC |
| that is public. Once you find the network make note of its UUID. Call this |
| <UUID-Public>.</para> |
| </listitem> |
| <listitem> |
| <para>Run the following command.</para> |
| <programlisting># xe network-param-set name-label=cloud-public uuid=<UUID-Public></programlisting> |
| </listitem> |
| </orderedlist> |
| </section> |
| <section id="xenserver-multi-guest-network-config"> |
| <title>Configuring Multiple Guest Networks for XenServer (Optional)</title> |
| <para>&PRODUCT; supports the use of multiple guest networks with the XenServer hypervisor. |
| Each network is assigned a name-label in XenServer. For example, you might have two networks |
| with the labels "cloud-guest" and "cloud-guest2". After the management |
| server is installed and running, you must add the networks and use these labels so that |
| &PRODUCT; is aware of the networks.</para> |
| <para>Follow this procedure on each new host before adding the host to &PRODUCT;:</para> |
| <orderedlist> |
| <listitem> |
| <para>Run xe network-list and find one of the guest networks. Once you find the network |
| make note of its UUID. Call this <UUID-Guest>.</para> |
| </listitem> |
| <listitem> |
| <para>Run the following command, substituting your own name-label and uuid values.</para> |
| <programlisting># xe network-param-set name-label=<cloud-guestN> uuid=<UUID-Guest></programlisting> |
| </listitem> |
| <listitem> |
| <para>Repeat these steps for each additional guest network, using a different name-label |
| and uuid each time.</para> |
| </listitem> |
| </orderedlist> |
| </section> |
| <section id="xenserver-separate-storage-network"> |
| <title>Separate Storage Network for XenServer (Optional)</title> |
| <para>You can optionally set up a separate storage network. This should be done first on the |
| host, before implementing the bonding steps below. This can be done using one or two |
| available NICs. With two NICs bonding may be done as above. It is the administrator's |
| responsibility to set up a separate storage network.</para> |
| <para>Give the storage network a different name-label than what will be given for other |
| networks.</para> |
| <para>For the separate storage network to work correctly, it must be the only interface that |
| can ping the primary storage device's IP address. For example, if eth0 is the |
| management network NIC, ping -I eth0 <primary storage device IP> must fail. In all |
| deployments, secondary storage devices must be pingable from the management network NIC or |
| bond. If a secondary storage device has been placed on the storage network, it must also be |
| pingable via the storage network NIC or bond on the hosts as well.</para> |
| <para>You can set up two separate storage networks as well. For example, if you intend to |
| implement iSCSI multipath, dedicate two non-bonded NICs to multipath. Each of the two |
| networks needs a unique name-label.</para> |
| <para>If no bonding is done, the administrator must set up and name-label the separate storage |
| network on all hosts (masters and slaves).</para> |
| <para>Here is an example to set up eth5 to access a storage network on 172.16.0.0/24.</para> |
| <programlisting> |
| # xe pif-list host-name-label='hostname' device=eth5 |
| uuid(RO): ab0d3dd4-5744-8fae-9693-a022c7a3471d |
| device ( RO): eth5 |
| #xe pif-reconfigure-ip DNS=172.16.3.3 gateway=172.16.0.1 IP=172.16.0.55 mode=static netmask=255.255.255.0 uuid=ab0d3dd4-5744-8fae-9693-a022c7a3471d</programlisting> |
| </section> |
| <section id="xenserver-nic-bonding"> |
| <title>NIC Bonding for XenServer (Optional)</title> |
| <para>XenServer supports Source Level Balancing (SLB) NIC bonding. Two NICs can be bonded |
| together to carry public, private, and guest traffic, or some combination of these. Separate |
| storage networks are also possible. Here are some example supported configurations:</para> |
| <itemizedlist> |
| <listitem> |
| <para>2 NICs on private, 2 NICs on public, 2 NICs on storage</para> |
| </listitem> |
| <listitem> |
| <para>2 NICs on private, 1 NIC on public, storage uses management network</para> |
| </listitem> |
| <listitem> |
| <para>2 NICs on private, 2 NICs on public, storage uses management network</para> |
| </listitem> |
| <listitem> |
| <para>1 NIC for private, public, and storage</para> |
| </listitem> |
| </itemizedlist> |
| <para>All NIC bonding is optional.</para> |
| <para>XenServer expects all nodes in a cluster will have the same network cabling and same |
| bonds implemented. In an installation the master will be the first host that was added to |
| the cluster and the slave hosts will be all subsequent hosts added to the cluster. The bonds |
| present on the master set the expectation for hosts added to the cluster later. The |
| procedure to set up bonds on the master and slaves are different, and are described below. |
| There are several important implications of this:</para> |
| <itemizedlist> |
| <listitem> |
| <para>You must set bonds on the first host added to a cluster. Then you must use xe |
| commands as below to establish the same bonds in the second and subsequent hosts added |
| to a cluster.</para> |
| </listitem> |
| <listitem> |
| <para>Slave hosts in a cluster must be cabled exactly the same as the master. For example, |
| if eth0 is in the private bond on the master, it must be in the management network for |
| added slave hosts.</para> |
| </listitem> |
| </itemizedlist> |
| <section id="management-network-bonding"> |
| <title>Management Network Bonding</title> |
| <para>The administrator must bond the management network NICs prior to adding the host to |
| &PRODUCT;.</para> |
| </section> |
| <section id="first-host-private-bond"> |
| <title>Creating a Private Bond on the First Host in the Cluster</title> |
| <para>Use the following steps to create a bond in XenServer. These steps should be run on |
| only the first host in a cluster. This example creates the cloud-private network with two |
| physical NICs (eth0 and eth1) bonded into it.</para> |
| <orderedlist> |
| <listitem> |
| <para>Find the physical NICs that you want to bond together.</para> |
| <programlisting># xe pif-list host-name-label='hostname' device=eth0 |
| # xe pif-list host-name-label='hostname' device=eth1</programlisting> |
| <para>These command shows the eth0 and eth1 NICs and their UUIDs. Substitute the ethX |
| devices of your choice. Call the UUID's returned by the above command slave1-UUID |
| and slave2-UUID.</para> |
| </listitem> |
| <listitem> |
| <para>Create a new network for the bond. For example, a new network with name |
| "cloud-private".</para> |
| <para><emphasis role="bold">This label is important. &PRODUCT; looks for a network by a |
| name you configure. You must use the same name-label for all hosts in the cloud for |
| the management network.</emphasis></para> |
| <programlisting># xe network-create name-label=cloud-private |
| # xe bond-create network-uuid=[uuid of cloud-private created above] |
| pif-uuids=[slave1-uuid],[slave2-uuid]</programlisting> |
| </listitem> |
| </orderedlist> |
| <para>Now you have a bonded pair that can be recognized by &PRODUCT; as the management |
| network.</para> |
| </section> |
| <section id="public-network-bonding"> |
| <title>Public Network Bonding</title> |
| <para>Bonding can be implemented on a separate, public network. The administrator is |
| responsible for creating a bond for the public network if that network will be bonded and |
| will be separate from the management network.</para> |
| </section> |
| <section id="first-host-public-network-bond"> |
| <title>Creating a Public Bond on the First Host in the Cluster</title> |
| <para>These steps should be run on only the first host in a cluster. This example creates |
| the cloud-public network with two physical NICs (eth2 and eth3) bonded into it.</para> |
| <orderedlist> |
| <listitem> |
| <para>Find the physical NICs that you want to bond together.</para> |
| <programlisting>#xe pif-list host-name-label='hostname' device=eth2 |
| # xe pif-list host-name-label='hostname' device=eth3</programlisting> |
| <para>These command shows the eth2 and eth3 NICs and their UUIDs. Substitute the ethX |
| devices of your choice. Call the UUID's returned by the above command slave1-UUID |
| and slave2-UUID.</para> |
| </listitem> |
| <listitem> |
| <para>Create a new network for the bond. For example, a new network with name |
| "cloud-public".</para> |
| <para><emphasis role="bold">This label is important. &PRODUCT; looks for a network by a |
| name you configure. You must use the same name-label for all hosts in the cloud for |
| the public network.</emphasis></para> |
| <programlisting># xe network-create name-label=cloud-public |
| # xe bond-create network-uuid=[uuid of cloud-public created above] |
| pif-uuids=[slave1-uuid],[slave2-uuid]</programlisting> |
| </listitem> |
| </orderedlist> |
| <para>Now you have a bonded pair that can be recognized by &PRODUCT; as the public |
| network.</para> |
| </section> |
| <section id="adding-more-hosts"> |
| <title>Adding More Hosts to the Cluster</title> |
| <para>With the bonds (if any) established on the master, you should add additional, slave |
| hosts. Run the following command for all additional hosts to be added to the cluster. This |
| will cause the host to join the master in a single XenServer pool.</para> |
| <programlisting># xe pool-join master-address=[master IP] master-username=root |
| master-password=[your password]</programlisting> |
| </section> |
| <section id="complete-bonding-setup"> |
| <title>Complete the Bonding Setup Across the Cluster</title> |
| <para>With all hosts added to the pool, run the cloud-setup-bond script. This script will |
| complete the configuration and set up of the bonds across all hosts in the cluster.</para> |
| <orderedlist> |
| <listitem> |
| <para>Copy the script from the Management Server in |
| /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/cloud-setup-bonding.sh to the |
| master host and ensure it is executable.</para> |
| </listitem> |
| <listitem> |
| <para>Run the script:</para> |
| <programlisting># ./cloud-setup-bonding.sh</programlisting> |
| </listitem> |
| </orderedlist> |
| <para>Now the bonds are set up and configured properly across the cluster.</para> |
| </section> |
| </section> |
| </section> |
| <section id="xenserver-version-upgrading"> |
| <title>Upgrading XenServer Versions</title> |
| <para>This section tells how to upgrade XenServer software on &PRODUCT; hosts. The actual |
| upgrade is described in XenServer documentation, but there are some additional steps you must |
| perform before and after the upgrade.</para> |
| <note> |
| <para>Be sure the hardware is certified compatible with the new version of XenServer.</para> |
| </note> |
| <para>To upgrade XenServer:</para> |
| <orderedlist> |
| <listitem> |
| <para>Upgrade the database. On the Management Server node:</para> |
| <orderedlist numeration="loweralpha"> |
| <listitem> |
| <para>Back up the database:</para> |
| <programlisting># mysqldump --user=root --databases cloud > cloud.backup.sql |
| # mysqldump --user=root --databases cloud_usage > cloud_usage.backup.sql</programlisting> |
| </listitem> |
| <listitem> |
| <para>You might need to change the OS type settings for VMs running on the upgraded |
| hosts.</para> |
| <itemizedlist> |
| <listitem> |
| <para>If you upgraded from XenServer 5.6 GA to XenServer 5.6 SP2, change any VMs |
| that have the OS type CentOS 5.5 (32-bit), Oracle Enterprise Linux 5.5 (32-bit), |
| or Red Hat Enterprise Linux 5.5 (32-bit) to Other Linux (32-bit). Change any VMs |
| that have the 64-bit versions of these same OS types to Other Linux |
| (64-bit).</para> |
| </listitem> |
| <listitem> |
| <para>If you upgraded from XenServer 5.6 SP2 to XenServer 6.0.2, change any VMs that |
| have the OS type CentOS 5.6 (32-bit), CentOS 5.7 (32-bit), Oracle Enterprise Linux |
| 5.6 (32-bit), Oracle Enterprise Linux 5.7 (32-bit), Red Hat Enterprise Linux 5.6 |
| (32-bit) , or Red Hat Enterprise Linux 5.7 (32-bit) to Other Linux (32-bit). |
| Change any VMs that have the 64-bit versions of these same OS types to Other Linux |
| (64-bit).</para> |
| </listitem> |
| <listitem> |
| <para>If you upgraded from XenServer 5.6 to XenServer 6.0.2, do all of the |
| above.</para> |
| </listitem> |
| </itemizedlist> |
| </listitem> |
| <listitem> |
| <para>Restart the Management Server and Usage Server. You only need to do this once for |
| all clusters.</para> |
| <programlisting># service cloudstack-management start |
| # service cloudstack-usage start</programlisting> |
| </listitem> |
| </orderedlist> |
| </listitem> |
| <listitem> |
| <para>Disconnect the XenServer cluster from &PRODUCT;.</para> |
| <orderedlist numeration="loweralpha"> |
| <listitem> |
| <para>Log in to the &PRODUCT; UI as root.</para> |
| </listitem> |
| <listitem> |
| <para>Navigate to the XenServer cluster, and click Actions – Unmanage.</para> |
| </listitem> |
| <listitem> |
| <para>Watch the cluster status until it shows Unmanaged.</para> |
| </listitem> |
| </orderedlist> |
| </listitem> |
| <listitem> |
| <para>Log in to one of the hosts in the cluster, and run this command to clean up the |
| VLAN:</para> |
| <programlisting># . /opt/xensource/bin/cloud-clean-vlan.sh</programlisting> |
| </listitem> |
| <listitem> |
| <para>Still logged in to the host, run the upgrade preparation script:</para> |
| <programlisting># /opt/xensource/bin/cloud-prepare-upgrade.sh</programlisting> |
| <para>Troubleshooting: If you see the error "can't eject CD," log in to the |
| VM and umount the CD, then run the script again.</para> |
| </listitem> |
| <listitem> |
| <para>Upgrade the XenServer software on all hosts in the cluster. Upgrade the master |
| first.</para> |
| <orderedlist numeration="loweralpha"> |
| <listitem> |
| <para>Live migrate all VMs on this host to other hosts. See the instructions for live |
| migration in the Administrator's Guide.</para> |
| <para>Troubleshooting: You might see the following error when you migrate a VM:</para> |
| <programlisting>[root@xenserver-qa-2-49-4 ~]# xe vm-migrate live=true host=xenserver-qa-2-49-5 vm=i-2-8-VM |
| You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected. |
| vm: b6cf79c8-02ee-050b-922f-49583d9f1a14 (i-2-8-VM)</programlisting> |
| <para>To solve this issue, run the following:</para> |
| <programlisting># /opt/xensource/bin/make_migratable.sh b6cf79c8-02ee-050b-922f-49583d9f1a14</programlisting> |
| </listitem> |
| <listitem> |
| <para>Reboot the host.</para> |
| </listitem> |
| <listitem> |
| <para>Upgrade to the newer version of XenServer. Use the steps in XenServer |
| documentation.</para> |
| </listitem> |
| <listitem> |
| <para>After the upgrade is complete, copy the following files from the management server |
| to this host, in the directory locations shown below:</para> |
| <informaltable frame="all"> |
| <tgroup cols="2" align="left" colsep="1" rowsep="1"> |
| <colspec colname="c1"/> |
| <colspec colname="c2"/> |
| <thead> |
| <row> |
| <entry><para>Copy this Management Server file...</para></entry> |
| <entry><para>...to this location on the XenServer host</para></entry> |
| </row> |
| </thead> |
| <tbody> |
| <row> |
| <entry><para>/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py</para></entry> |
| <entry><para>/opt/xensource/sm/NFSSR.py</para></entry> |
| </row> |
| <row> |
| <entry><para>/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/setupxenserver.sh</para></entry> |
| <entry><para>/opt/xensource/bin/setupxenserver.sh</para></entry> |
| </row> |
| <row> |
| <entry><para>/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/make_migratable.sh</para></entry> |
| <entry><para>/opt/xensource/bin/make_migratable.sh</para></entry> |
| </row> |
| <row> |
| <entry><para>/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/cloud-clean-vlan.sh</para></entry> |
| <entry><para>/opt/xensource/bin/cloud-clean-vlan.sh</para></entry> |
| </row> |
| </tbody> |
| </tgroup> |
| </informaltable> |
| </listitem> |
| <listitem> |
| <para>Run the following script:</para> |
| <programlisting># /opt/xensource/bin/setupxenserver.sh</programlisting> |
| <para>Troubleshooting: If you see the following error message, you can safely ignore |
| it.</para> |
| <programlisting>mv: cannot stat `/etc/cron.daily/logrotate': No such file or directory</programlisting> |
| </listitem> |
| <listitem> |
| <para>Plug in the storage repositories (physical block devices) to the XenServer |
| host:</para> |
| <programlisting># for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk '{print $NF}'`; do xe pbd-plug uuid=$pbd ; done</programlisting> |
| <para>Note: If you add a host to this XenServer pool, you need to migrate all VMs on |
| this host to other hosts, and eject this host from XenServer pool.</para> |
| </listitem> |
| </orderedlist> |
| </listitem> |
| <listitem> |
| <para>Repeat these steps to upgrade every host in the cluster to the same version of |
| XenServer.</para> |
| </listitem> |
| <listitem> |
| <para>Run the following command on one host in the XenServer cluster to clean up the host |
| tags:</para> |
| <programlisting># for host in $(xe host-list | grep ^uuid | awk '{print $NF}') ; do xe host-param-clear uuid=$host param-name=tags; done;</programlisting> |
| <note> |
| <para>When copying and pasting a command, be sure the command has pasted as a single line |
| before executing. Some document viewers may introduce unwanted line breaks in copied |
| text.</para> |
| </note> |
| </listitem> |
| <listitem> |
| <para>Reconnect the XenServer cluster to &PRODUCT;.</para> |
| <orderedlist numeration="loweralpha"> |
| <listitem> |
| <para>Log in to the &PRODUCT; UI as root.</para> |
| </listitem> |
| <listitem> |
| <para>Navigate to the XenServer cluster, and click Actions – Manage.</para> |
| </listitem> |
| <listitem> |
| <para>Watch the status to see that all the hosts come up.</para> |
| </listitem> |
| </orderedlist> |
| </listitem> |
| <listitem> |
| <para>After all hosts are up, run the following on one host in the cluster:</para> |
| <programlisting># /opt/xensource/bin/cloud-clean-vlan.sh</programlisting> |
| </listitem> |
| </orderedlist> |
| </section> |
| </section> |