Skip to content

Latest commit

 

History

History
executable file
·
173 lines (121 loc) · 6.67 KB

08-build-xenserver-compute-vm.rst

File metadata and controls

executable file
·
173 lines (121 loc) · 6.67 KB

none

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:

image

  1. Select the CentOS 7 template:

image

  1. Name the VM "compute":

image

  1. Choose the CentOS 7 ISO (which you should have previously uploaded to the ISO library):

image

  1. Place the VM on the only server available:

image

  1. Give it one CPU and 2GB:

image

  1. Change the disk to 20GB by clicking on properties:

image

image

  1. Give the VM connections to your management and public networks:

image

  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:

image

  1. Highlight "Install CentOS 7", and press Enter:

image

  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:

image

  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:

image

  1. Disable IPv6, and click on "save":

image

  1. Set an appropriate hostname, and then enable the "eth1" interface by setting the switch to "on":

image

  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":

image

  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":

image

  1. Set "File System" to "ext4", and then click "Done".

image

  1. A yellow warning bar will appear. Click "Done" again, and then click on "Accept Changes".

image

  1. Click on "Software Selection". Select "Infrastructure Server", and click "Done".

image

  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:

image

  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:

image

  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

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

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

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