• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

Installing Rackspace Private Cloud - KVM


NOTE: This documentation is for the Rackspace Private Cloud Software v. 2.0 ISO. Documentation for the newest version of Rackspace Private Cloud Software can be found in the Getting Started section.

 

This section discusses the procedure for installing Rackspace Private Cloud Software on KVM on a Linux host.

CAUTION: Rackspace strongly recommends that you install Rackspace Private Cloud Software on physical hardware nodes (bare metal) for best results. Installation on virtual platforms should only be performed for evaluation purposes.

An all-in-one installation is available, in which the controller and compute components are installed on the same device. However, for best results, we recommend a minimum of two nodes.

VM Requirements

You should be running as root in a Linux distro on a host machine that meets the following requirements:

  • Virtualization is enabled
  • 16 GB available RAM, and running as root
  • KVM is installed with VDE support.

These instructions are written for Ubuntu 12.04.

KVM Host Machine Setup

Before you begin, there are several steps you must take to prepare KVM on the host machine.

Downloading and Configuring KVM

You must download, install, and compile KVM from the latest source, enable nested hypervisors, and enable and configure VDE.

  1. Install the KVM packages.
    $ sudo apt-get update
    $ sudo apt-get install make uml-utilities vde2 libvde-dev libvdeplug2-dev \
    libsdl1.2-dev libglib2.0-dev zlib1g-dev libpci-dev -y
  2. Retrieve the KVM source.
    $ wget -O /tmp/kvm.tar.gz \
    http://sourceforge.net/projects/kvm/files/latest/download?source=files
    $ tar xvzf /tmp/kvm.tar.gz -C /tmp/ 
    $ cd /tmp/qemu*
  3. Compile and set up KVM.
    $ ./configure --target-list=x86_64-softmmu --enable-vde
    $ make && sudo make install
  4. Check the version.
    $ qemu-system-x86_64 --version
  5. Load the KVM modules. For processor, use intel or amdas is appropriate for your device.
    $ sudo modprobe kvm
    $ sudo modprobe kvm_processor
    $ echo "kvm" >> /etc/modules
    $ echo "kvm_processor" >> /etc/modules
    $ sudo chmod o+rw /dev/kvm
  6. AMD architecture has nesting enabled by default. Intel architecture will need to have nesting set manually. Enable nested hypervisors with the following command:
    $ modprobe kvm_processor nested=1

    Alternatively, you can enable nesting by adding the following setting to /etc/default/qemu-kvm:

    KVM_NESTED="nested=1"   
  7. Verify that nesting is enabled.
    $ cat /sys/module/kvm_processor/parameters/nested
  8. Finally, disable KVM networking, since the cloud will use VDE networking.
    $ if [ -f /etc/qemu-ifup ] ; then sudo mv /etc/qemu-ifup /etc/qemu-ifup.bak ; fi
    $ if [ -f /etc/qemu-ifdown ] ; then sudo mv /etc/qemu-ifdown /etc/qemu-ifdown.bak ; fi
    $ sudo touch /etc/qemu-ifup ; sudo chmod 755 /etc/qemu-ifup
    $ sudo touch /etc/qemu-ifdown ; sudo chmod 755 /etc/qemu-ifdown
    $ sudo echo '#!/bin/sh' > /etc/qemu-ifup
    $ sudo echo '#!/bin/sh' > /etc/qemu-ifdown

Grant Tap Device Access

Once KVM has been configured, you must grant KVM access to a tap device. The following procedure describes the KVM host configuration with a tap device called tap0 that has the following network configuration:

  • IP Address: 10.80.1.1
  • Network: 10.80.1.0
  • Broadcast: 10.80.1.255
  • Netmask: 255.255.255.0
  • DNS1: 8.8.8.8

Use your own networking information when preparing your host.

  1. Create and setup the tap device tap0.
    $ tunctl -t tap0
    $ ifconfig tap0 up
    $ ifconfig tap0 10.80.1.1 netmask 255.255.255.0
    
  2. Configure VDE for the tap device.
    $ vde_switch --sock /tmp/vde_tap0.sock -d --tap tap0
  3. Create iptables rules on the host machine to allow NAT communication from the host (eth0) to the KVM virtual network.
    $ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    $ iptables -I INPUT 1 -i tap0 -j ACCEPT
    $ iptables -A FORWARD -i tap0 -s 10.80.1.0/255.255.255.0 -j ACCEPT

Installing the Controller Node

  1. Download the Rackspace Private Cloud ISO.
  2. Create an empty qcow2 VM named rackspacecloud_controllerto use for the controller node.
    $ qemu-img create -f qcow2 rackspacecloud_controller.qcow2 30G
  3. Boot up the newly created VM with the ISO attached and operating on the tap0adapter.

    Note that for Intel architecture, you might need to add the flag -enable-kvm -cpu qemu64,+vmx to the qemu-system-x86_64 command.

    $ export CONTROLLER_UUID=`uuidgen`
    $ export CONTROLLER_MAC=`printf '52:54:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256))`
    $ /usr/local/bin/qemu-system-x86_64 \
    -uuid $CONTROLLER_UUID \
    -drive file=rackspacecloud_controller.qcow2,if=virtio \
    -cdrom <rackspace_private_cloud_iso>.iso \
    -boot d -m 8192 \
    -net nic,macaddr=$CONTROLLER_MAC,model=virtio,vlan=1 \
    -net tap,vlan=1 -net vde,sock=/tmp/vde_tap0.sock,vlan=1 \
    -vnc :1 &
  4. Use VNC to connect to the host machine at port 5901. The ISO will launch.
  5. After the ISO has launched and loaded, accept the EULA statement.
  6. Select Controller.
  7. Enter the NIC address. If you have more than one, you must designate one as public and one as private. In all-in-one installations, you will need to enter a public and private NIC.
  8. When prompted, enter the node IP address, subnet mask, gateway, name server, and host name. If you do not enter a fully-qualified domain name for the hostname, you will be prompted to enter a domain name as well.
  9. Enter the address for the nova fixed network.
  10. If you want to configure a DMZ network, enter the DMZ address and the DMZ gateway address.
  11. Enter a password for the admin user. You will use this admin username and password to access the API and the dashboard.
  12. For the additional non-admin user, accept the default demo or enter your own and provide a password at the prompt. This user will not have admin privileges, but will be able to perform basic OpenStack functions, such as creating instances from images. Creating the user will also automatically create a project (also known as a tentant) for this user.
  13. Enter the real name, user name, and password for the operating system user account. For example, the user Jane Doe would enter the following information:
    • Full name for the new user: Jane Doe
    • Username for your account: jdoe
    • Password: mysecurepassword

    At this point, it will take approximately 5-10 minutes for the Ubuntu operating system installation to complete.

  14. If you have a proxy, enter the proxy URL at the prompt in the format http://proxy_ip_address:proxy_ip_port. If you do not have a proxy, press enter to skip this step and leave the proxy information blank.

At this point, the installation process will run for approximately 30 minutes without the need for user intervention. The device will reboot during the installation process. You will see a screen with the Rackspace Private Cloud logo, followed by a screen that displays a progress bar; you can use Ctrl+Alt+F2 to toggle between the progress bar screen and a Linux TTY screen (Ctrl+Alt+Fn+F2 on a Mac). You can follow the log during installation by switching to the correct TTY screen and viewing the log in /var/log/post-install.log.

After the installation is complete, you can view the install log by logging into the operating system with the username and password that you configured in Step 12. The log is stored in /var/log/post-install.log.

Note: You may see an unhandled rdmsr error when installing or rebooting the controller node. This is a KVM warning that may be safely ignored.

Once the installation is done, you can change the boot flag in the qemu command to be -boot c instead of -boot d to boot from the local disk instead of the ISO.

CAUTION: There is no password recovery system. Please do not forget your admin password.

Installing the Compute Node

  1. Download the Rackspace Private Cloud ISO.
  2. Create an empty qcow2 VM named rackspacecloud_computeto use for the controller node.
    $ qemu-img create -f qcow2 rackspacecloud_compute.qcow2 30G
  3. Boot up the newly created VM with the ISO attached and operating on the tap0adapter.

    Note that for Intel architecture, you might need to add the flag -enable-kvm -cpu qemu64,+vmx to the qemu-system-x86_64 command.

    $ export COMPUTE_UUID=`uuidgen`
    $ export COMPUTE_MAC=`printf '52:54:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256))`
    $ /usr/local/bin/qemu-system-x86_64 \
    -uuid $COMPUTE_UUID \
    -drive file=rackspacecloud_compute.qcow2,if=virtio \
    -cdrom <rackspace_private_cloud_ISO>.iso \
    -boot d -m 8192 \
    -net nic,macaddr=$COMPUTE_MAC,model=virtio,vlan=1 \
    -net tap,vlan=1 -net vde,sock=/tmp/vde_tap0.sock,vlan=1 \
    -vnc :2 &
  4. Use VNC to connect to the Host Machine at port 5902. The ISO will launch.
  5. After the ISO has launched and loaded, accept the EULA statement.
  6. Select Compute to install a compute node.
  7. Enter the NIC address. If you have more than one NIC, designate one as public and one as private. Be sure that the ordering of the NICs matches the order that you specified for the controller node.
  8. When prompted, enter the node IP address, subnet mask, gateway, name server, and host name. If you do not enter a fully-qualified domain name for the hostname, you will be prompted to enter a domain name as well.
  9. Enter the real name, user name, and password for the operating system user account. For example, the user Jane Doe would enter the following information:
    • Full name for the new user: Jane Doe
    • Username for your account: jdoe
    • Password: mysecurepassword

    At this point, it will take approximately 5-10 minutes for the Ubuntu operating system installation to complete.

  10. If you have a proxy, enter the proxy URL at the prompt in the format http://proxy_ip_address:proxy_ip_port. If you do not have a proxy, press enter to skip this step and leave the proxy information blank.
  11. Enter the IP address for the controller node. This will add the new compute node to the cluster.
  12. You may also create one additional non-admin user at this time. This user will not have admin privileges, but will be able to perform basic OpenStack functions, such as creating instances from images. Creating the user will also automatically create a tenant for this user.

At this point, the installation process will run for approximately 20 minutes without the need for user intervention. As with the controller node installation, the device will reboot during the installation process. You will see a screen with the Rackspace Private Cloud logo, followed by a screen that displays a progress bar; you can use Ctrl+Alt+F2 to toggle between the progress bar screen and a Linux TTY screen (Ctrl+Alt+Fn+F2 on a Mac). You can follow the log during installation by switching to the correct TTY screen and viewing the log in /var/log/post-install.log.

After the installation is complete, you can view the install log by logging into the operating system with the username and password that you configured during the Controller installation. The log is stored in /var/log/post-install.log.

Once the installation is done, you can change the boot flag in the qemu command to be -boot c instead of -boot d to boot from the local disk instead of the ISO.







© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER