8. Build XenServer Compute VMΒΆ

This page is based on the following OpenStack Installation Guide pages:

http://docs.openstack.org/liberty/install-guide-rdo/environment-networking-compute.html

http://docs.openstack.org/liberty/install-guide-rdo/environment-ntp-other.html

http://docs.openstack.org/liberty/install-guide-rdo/environment-packages.html

There are many additional steps here specific to XenServer.

  1. In XenCenter, create a new VM:
_images/page08-create-new-vm.png
  1. Select the CentOS 7 template:
_images/page08-select-template.png
  1. Name the VM “compute”:
_images/page08-name-vm.png
  1. Choose the CentOS 7 ISO (which you should have previously uploaded to the ISO library):
_images/page08-choose-iso.png
  1. Place the VM on the only server available:
_images/page08-choose-server.png
  1. Give it one CPU and 2GB:
_images/page08-cpu-ram.png
  1. Change the disk to 20GB by clicking on properties:
_images/page08-disk1.png _images/page08-disk2.png
  1. Give the VM connections to your management and public networks:
_images/page08-network.png
  1. Complete the wizard, which will start the VM.
  2. Go to the “compute” VM’s console, which should be displaying the CentOS installer’s boot screen:
_images/page08-console.png
  1. Highlight “Install CentOS 7”, and press Enter:
_images/page08-boot.png
  1. If the console appears to “hang”, with only a cursor showing (and no other activity), then quit XenCenter, relaunch it, and go back to the console. This should show the graphical installer is now running:
_images/page08-installer-started.png
  1. Set language and timezone.
  2. Click on “Network & Hostname”. Click on the “eth1” interface, and click on “configure”.
  3. Set the IPv4 address as appropriate:
_images/page08-set-ipv4.png
  1. Disable IPv6, and click on “save”:
_images/page08-disable-ipv6.png
  1. Set an appropriate hostname, and then enable the “eth1” interface by setting the switch to “on”:
_images/page08-enable-interface.png
  1. If using the NetInstall image, click on “Installation source”. Set the source to network, and then define a known-good mirror. You can use http://mirror.rackspace.com/CentOS/7.2.1511/os/x86_64/.
  2. Click on “Installation Destination”. Select “I will configure partitioning” and click on “Done”:
_images/page08-i-will-configure.png
  1. Under “New mount points will use the following partition scheme”, select “Standard Partition”.
  2. Click on the + button. Set the mount point to / and click “Add mount point”:
_images/page08-new-mount-point.png
  1. Set “File System” to “ext4”, and then click “Done”.
_images/page08-ext4.png
  1. A yellow warning bar will appear. Click “Done” again, and then click on “Accept Changes”.
_images/page08-accept-changes.png
  1. Click on “Software Selection”. Select “Infrastructure Server”, and click “Done”.
_images/page08-software-selection.png
  1. Click “Begin Installation”. Click on “Root Password” and set a good password.
  2. Once installation is complete, click “Reboot”.
  3. SSH as root to the new VM.
  4. In XenCenter, change the DVD drive to xs-tools.iso:
_images/page08-xs-tools-iso.png
  1. Mount the tools ISO and install the tools:

    # mkdir /mnt/cdrom
    # mount /dev/cdrom /mnt/cdrom
    # cd /mnt/cdrom/Linux
    # rpm -Uvh xe-guest-utilities-6.5.0-1427.x86_64.rpm xe-guest-utilities-xenstore-6.5.0-1427.x86_64.rpm
    # cd ~
    # umount /mnt/cdrom
    
  2. In XenCenter, eject the DVD drive:

_images/page08-eject.png
  1. Stop and disable the firewalld service:

    # systemctl disable firewalld.service
    # systemctl stop firewalld.service
    
  2. Disable SELINUX:

    # setenforce 0
    # vim /etc/sysconfig/selinux
    
      SELINUX=permissive
    
  3. Update all packages on the VM:

    # yum update
    
  4. Reboot the VM:

    # systemctl reboot
    
  5. Wait for the VM to complete the reboot, and SSH back in as root.

  6. Update the system hosts file with entries for all nodes:

    # vim /etc/hosts
    
      172.16.0.192 controller controller.openstack.lab.eco.rackspace.com
      172.16.0.203 compute1 compute1.openstack.lab.eco.rackspace.com
      172.16.0.204 compute1-vm compute1-vm.openstack.lab.eco.rackspace.com
      172.16.0.195 compute2 compute2.openstack.lab.eco.rackspace.com
      172.16.0.196 block1 block1.openstack.lab.eco.rackspace.com
      172.16.0.197 object1 object1.openstack.lab.eco.rackspace.com
      172.16.0.198 object2 object2.openstack.lab.eco.rackspace.com
    
  7. Update the chrony configuration to use the controller as a time source:

    # vim /etc/chrony.conf
    
      server controller iburst
    
  • Remove any other servers listed, leaving only “controller”.
  1. Restart the chrony service, and confirm that “controller” is listed as a source:

    # systemctl restart chronyd.service
    # chronyc sources
      210 Number of sources = 1
      MS Name/IP address         Stratum Poll Reach LastRx Last sample
      ===============================================================================
      ^* controller                    3   6    17     6  -3374ns[+2000ns] +/- 6895us
    
  2. Enable the OpenStack-Liberty yum repository:

    # yum install centos-release-openstack-liberty
    
  3. Install the OpenStack client and SELINUX support:

    # yum install python-openstackclient openstack-selinux
    
  4. SSH to the XenServer as root.

  5. Obtain the UUID of the XenServer pool:

    # xe pool-list
    
      uuid ( RO)                : f824b628-1696-9ebe-5a5a-d1f9cf117158
                name-label ( RW):
          name-description ( RW):
                    master ( RO): b11f5aaf-d1a5-42fb-8335-3a6451cec4c7
                default-SR ( RW): 271e0f43-8b03-50c5-a08a-9c7312741378
    
  • Note: In my case, the UUID is f824b628-1696-9ebe-5a5a-d1f9cf117158.
  1. Enable auto power-on for the XenServer pool. Replace *POOL_UUID* with your own:

    # xe pool-param-set uuid=*POOL_UUID* other-config:auto_poweron=true
    
  2. Obtain the UUID of the “compute VM”:

    # xe vm-list name-label='compute'
    
      uuid ( RO)           : 706ba8eb-fe5f-8da2-9090-3a5b009ce1c4
           name-label ( RW): compute
          power-state ( RO): running
    
  • Note: In my case, the UUID is 706ba8eb-fe5f-8da2-9090-3a5b009ce1c4.
  1. Enable auto power-on for the “compute” VM. Replace *VM_UUID* with your own:

    # xe vm-param-set uuid=*VM_UUID* other-config:auto_poweron=true