Cisco CSR 1000V Series Cloud Services Router Software Configuration Guide
Installing the Cisco CSR 1000V in KVM Environments
Downloads: This chapterpdf (PDF - 250.0KB) The complete bookPDF (PDF - 3.44MB) | Feedback

Table of Contents

Installing the Cisco CSR 1000V in KVM Environments

Kernel Virtual Machine Support Information

KVM Support on OpenStack

Installation Requirements for KVM

Manually Creating the Cisco CSR 1000V VM Using the .iso File (KVM)

Creating the Cisco CSR 1000V KVM Instance on OpenStack Using the .qcow2 File

Creating the Instance Using the KVM Command

Creating the Instance Using the OpenStack Command Line Tool

Creating the Instance Using the OpenStack Dashboard

Increasing Performance on KVM Configurations

Kernel Virtual Machine Support Information

Red Hat Enterprise Linux (RHEL), an enterprise virtualization product produced by Red Hat based on the Kernel-based Virtual Machine (KVM), is an open source, full virtualization solution for Linux on x86 hardware containing virtualization extensions. It consists of a loadable kernel module, kvm.ko that provides the core virtualization infrastructure and a processor-specific module, kvm-intel.ko or kvm-amd.ko.

The Cisco CSR 1000V also supports Red Hat Enterprise Virtualization, Red Hat’s commercially packaged virtualization platform. Beginning with Cisco IOS XE Release 3.11S, Ubuntu is also supported for KVM environments. For more information on the KVM products and versions supported, see the next section.

The Cisco CSR 1000V installation on KVM requires the manual creation of a VM and installation using the .iso file. Deploying the OVA template into a KVM environment is not supported.

The Cisco CSR 1000V supports the Virtio vNIC type on the KVM implementation. KVM supports a maximum of 10 vNICs.

KVM Support on OpenStack

Beginning with Cisco IOS XE 3.12S, the Cisco CSR 1000V supports installation of a KVM in the OpenStack environment. OpenStack support requires the .qcow2 installation file available on the Cisco.com download page. For more information, see the “Creating the Cisco CSR 1000V KVM Instance on OpenStack Using the .qcow2 File” section.

Installation Requirements for KVM

Table 6-1 lists the installation requirements for KVM environments. For installation procedures, see the “Manually Creating the Cisco CSR 1000V VM Using the .iso File (KVM)” section.

Table 6-1 Installation Requirements for KVM Environments

KVM Requirements
Cisco IOS XE Release 3.10S
Cisco IOS XE Release 3.11S
Cisco IOS XE Release 3.12S and 3.13S

KVM versions supported

  • Linux KVM based on Red Hat Enterprise Linux 6.31
  • Red Hat Enterprise Virtualization 3.1
  • Linux KVM based on Red Hat Enterprise Linux 6.31
  • Red Hat Enterprise Virtualization 3.1
  • Ubuntu 12.04.03 LTS Server 64 Bits2
  • Linux KVM based on Red Hat Enterprise Linux 6.31
  • Ubuntu 12.04.04 LTS Server 64 Bits 2

Supported vCPU configurations3

4 vCPUs: requires 4 GB RAM minimum allocation

  • 1 vCPU:
    requires minimum 2.5 GB RAM allocation
  • 2 vCPUs: requires minimum 2.5 GB RAM allocation
  • 4 vCPUs: requires minimum 4 GB RAM allocation
  • 1 vCPU:
    requires minimum 2.5 GB RAM allocation
  • 2 vCPUs: requires minimum 2.5 GB RAM allocation
  • 4 vCPUs: requires minimum 4 GB RAM allocation

Virtual CPU cores required

1

1

1

Virtual hard disk size

8 GB minimum

8 GB minimum

8 GB minimum4

Supported vNICs

Virtio

Virtio

Virtio

Minimum number of vNICs required

3

3

3

Maximum number of vNICs supported per VM instance

26

26

26

Virtual CD/DVD drive installed

Required

Required

Required

1.Requires Kernel version 2.6.3.2 and QEMU 0.12.1.2.

2.Requires QEMU-x86_64 version 1.0 (qemu-kvm-1.0), Copyright (c) 2003-2008 Fabrice Bellard

3.The required vCPU configuration depends on the throughput license and technology package installed. See the data sheet for your release for more information.

4.Applies only to creating the VM using the .iso file. If using the .qcow2 file to install in an OpenStack environment, the hard disk size must be set to 0.

Manually Creating the Cisco CSR 1000V VM Using the .iso File (KVM)

Although the following procedure provides a general guideline for how to manually create the VM for the Cisco CSR 1000V, the exact steps that you need to perform may vary depending on the characteristics of your KVM environment and setup. For more information, see the Red Hat Linux documentation.

See Table 6-1 for the requirements to install the Cisco CSR 1000V on a VM in a KVM environment.


Note The Cisco CSR 1000V does not support deploying the OVA file in KVM environments.


The following steps are performed using the KVM console on your server.


Step 1 Download the .iso file from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 2 Access the KVM console.

Step 3 Choose Application > System Tools.

Step 4 Open the VM Manager. Select the New VM screen to create a new VM.

Step 5 Enter the name of the VM.

Step 6 Select the method of installation based on where you copied the Cisco CSR 1000V .iso file:

  • Local install media (ISO image or CD-ROM)

Note If you plan to install from the CD-ROM, you must also map the .iso file image to the virtual CD-ROM.


  • Network install
  • Network boot (PXE)

Click Forward.

Step 7 On the next screen, locate the install media by selecting from the following:

  • Use CD-ROM or DVD.

Enter the CD-ROM name that the .iso file was mapped to.

  • Use ISO image

Browse to the .iso file image location. Select the image and click Open.

Step 8 Use the OS Type and Version for the .iso file that is displayed.

Click Forward.

Step 9 Enter the memory and CPU settings.

See Table 6-1 for the memory requirements and supported number of CPUs for your release.

Click Forward.

Step 10 On the next screen, select the checkbox to enable storage for the VM.

Step 11 Choose the method for storing the VM:

  • Create a disk image on the computer’s hard drive. Select the memory allocation. For the required memory allocation in your software version, see Table 6-1.
  • Select the managed or other existing storage by browsing to the storage location.

Click Forward. The Ready to Begin Installation screen for the selected VM displays.

Step 12 Click Advanced options.

Step 13 On the Overview screen, add a description to the VM.


Note While this step is optional, adding a description is recommended if you will create multiple VMs on your host.


Click Apply.

Step 14 Verify that the processor, memory, and boot option settings are correct.

Step 15 Under Processor, do the following:

  • Verify the CPU configuration and enter the values for the current allocation and maximum allocation. The following is the required CPU configuration:

Sockets = 4

Cores = 1

Threads = 1

  • Select the Configuration option, and then select the Model from the drop-down menu. The Nehalem model is required for the Cisco CSR 1000V.

Note Select the “Nehalem” option to obtain the minimum set of features supported, although newer models can be selected. We recommend to choose the “Copy host CPU configuration” option to ensure that more advanced features of newer processors are used.


Click Apply.

Step 16 Under Boot Options, you can select the boot device order, to determine which device to boot from first, and which devices to boot from subsequently.

Step 17 Under NIC, configure the first vNIC for the VM.

Step 18 For the Device Model, select Virtio.

This is the only vNIC type supported on the Cisco CSR 1000V for the KVM-based hypervisor.


Note (Cisco IOS XE Release 3.10S and earlier) This first vNIC created is mapped to the Gigabit Ethernet 0 management interface on the Cisco CSR 1000V.


Step 19 To create additional vNICs before installing the VM, click the Add Hardware button. All vNICs must be the Virtio Disk device type.


Note You can add more vNICs after the VM is installed and the Cisco CSR 1000V has booted. You do not need to power down the VM or the router to add vNICs. See Table 6-1 for the number of vNICs supported on the hypervisor for your release.



Note You can also create a serial port interface before creating the VM if you want to access the Cisco CSR 1000V using a serial console. See the “Booting the Cisco CSR 1000V and Accessing the Console” section. You must select the option to use the serial console when booting the Cisco CSR 1000V.


Step 20 Click the Begin Installation button to create the VM.

The VM is created. Once the VM is created, the Cisco CSR 1000V begins the first-time boot process. See the “Booting the Cisco CSR 1000V and Accessing the Console” section to continue the bootup.


 

Creating the Cisco CSR 1000V KVM Instance on OpenStack Using the .qcow2 File

Creating the Instance Using the KVM Command

Although the following procedure provides a general guideline for how to create the Cisco CSR 1000V tenant instance, the exact steps that you need to perform may vary depending on the characteristics of your KVM environment and setup. For more information, see the OpenStack documentation.

The following steps are performed using the Nova (OpenStack Compute) console on your server.


Note To configure the KVM to run with config-drive, you must use the procedure described in the “Creating the Instance Using the OpenStack Command Line Tool ” section.



Step 1 Download the .qcow2 file from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 2 In the Nova console, create the Cisco CSR 1000V KVM instance where you specify the parameters for the instance, as shown in the following example:

/usr/bin/kvm -S -M pc-1.0 -enable -kvm -m 2560 -smp 1,sockets=4,cores=1,threads=1 -nographic -nodefconfig -nodefaults -no-shutdown -boot order=c,menu=on -device lsi,id=scsi0,bus=pci.0,addr=0x6 -drive file=csr.qcow2,if=none,id=drive-ide0-0-0,format=qcow2 -serial telnet: 127.0.0.1:3548,server,nowait

See Table 6-1 for the installation requirements. The disk size should be set to 0 for the Cisco CSR 1000V to boot.

Make sure to specify the installation file name, and that the format is set to “qcow2”. You can configure the vNICs when you enter the command above before booting the Cisco CSR 1000V, or you can configure the vNICs later. For information about other options for configuring the KVM instance, see the KVM documentation.

Step 3 When you have configured the parameters for the KVM instance, you can boot the instance using the boot command. Use the -serial option to set the serial console access.

See the “Booting the Cisco CSR 1000V and Accessing the Console” section.


 

Creating the Instance Using the OpenStack Command Line Tool

Although the following procedure provides a general guideline for how to create the Cisco CSR 1000V tenant instance, the exact steps that you need to perform may vary depending on the characteristics of your KVM environment and setup. For more information, see the OpenStack documentation. See Table 6-1 for the requirements to install the Cisco CSR 1000V on a VM in a KVM environment.

The following steps are performed using the Nova (OpenStack Compute) console on your server.


Step 1 Download the .qcow2 file from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 2 Create the Nova flavor using the following command syntax:

nova flavor-create < flavor_name > < flavor_id > < ram size MB > < disk size GB > < num_ vCPUs >

See Table 6-1 for the installation requirements. The disk size should be set to 0 for the Cisco CSR 1000V to boot. The following command example creates a KVM instance with 4096 MB RAM, a disk size of 0 and 2 vCPUs configured:

nova flavor-create csr_flavor 6 4096 0 2

Step 3 Enter the nova flavor-list command to verify that the nova flavor created the previous step is available.

Step 4 Using the glance command, create the OpenStack image using the following syntax:

glance image-create -- name < image_name > -- disk-format qcow2 --container-format bare --file < Location-of-img-file >

The following example creates an OpenStack image using the Cisco CSR 1000V installation file:

glance image-create --namecsr_image --disk-format qcow2 --container-format bare --file /opt/stack/csr/files/images/csr1000v-universalk9.03.12.00.S.154-2.S-std.qcow2
 

Step 5 Using the nova boot command, create the instance and boot using the following syntax:

nova boot < instance_name > -- image < image_id > -- flavor < flavor_id > -- nic net-id= < uuid > --config-drive= < true / false > --file < configuration_file_name >

The --config-drive option can be used to specify that the configuration is loaded on the Cisco CSR 1000V when it comes up. Set the --config-drive option to “true” and specify the configuration file name. The configuration file can either use the “ovf-env.xml” file using the OVF format, or the “iosxe_config.txt” file in which you enter the router configuration to be booted.


Note These file names are hard-coded and required for the config-drive settings to boot.


The following example boots the Cisco CSR 1000V image on OpenStack with the “ovf-env.xml” file containing the router configuration:

nova boot csr_instance --image csr_image --flavor 6 --nic net-id=546af738-bc0f-43cf-89f2-1e2c747d1764 --config-drive=true --file ovf-env.xml=/opt/stack/csr/files/ovf-env.xml
 

The following example boots the Cisco CSR 1000V image on OpenStack with the “iosxe_config.txt” file containing the router configuration:

nova boot csr_instance --image csr_image --flavor 6 --nic net-id=546af738-bc0f-43cf-89f2-1e2c747d1764 --config-drive=true --file iosxe_config.txt=/opt/stack/iosxe_config.txt
 

The Cisco CSR 1000V begins the boot process. See the “Booting the Cisco CSR 1000V and Accessing the Console” section.

After the OpenStack image is created, you can access the instance on your OpenStack dashboard.

Creating the Instance Using the OpenStack Dashboard

Perform the following steps to create the instance using the OpenStack dashboard.


Note To configure the KVM to run with config-drive, you must use the procedure described in the “Creating the Instance Using the OpenStack Command Line Tool ” section.



Step 1 Download the .qcow2 file from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 2 From the OpenStack dashboard, access the OpenStack console.

Step 3 Login as the admin onto the OpenStack console.

Step 4 Create a new flavor using the Flavor Create tab on the screen, and specify the < flavor_name > < flavor_id > < ram size MB > < disk size GB > < num_ vCPUs >.

See Table 6-1 for the installation requirements. The disk size should be set to 0 for the Cisco CSR 1000V to boot. as in the tables 6-1 and 6-2.

Select the System Panel > Flavors tab. The flavor should show up in the list of flavors displayed on the screen.

Step 5 Create a new image using the Image Create tab on the screen.

Specify the location of the image, the disk format (qcow2) and container-format (raw).

Select the System Panel > Images tab. The image should show up on the list of images shown on the screen.

Step 6 Create a new instance using the Instance Create tab on the screen.

Specify the image, the flavor, and the appropriate network interfaces to be attached to the instance.

Select the System Panel > Instances tab. The instance should show up on the list of instances shown on the screen, and you should be able to access the console by clicking on the instance name.

Step 7 To launch the instance, select the instance and select Launch Instance.

Click the Details tab. Review the instance information to ensure it is correct. When you ready to launch the instance, click the Launch button.

The instance is launched and the Cisco CSR 1000V begins the boot process. See the “Booting the Cisco CSR 1000V and Accessing the Console” section.

Increasing Performance on KVM Configurations

Beginning with Cisco IOS XE Release 3.11S, you can increase the performance for a Cisco CSR 1000V in a KVM environment by changing settings on the KVM host. These settings are independent of the Cisco IOS XE configuration settings on the Cisco CSR 1000V. This option is available in Red Hat Enterprise Linux 6.3 KVM environment running Kernel version 2.6.32 and QEMU version 0.12.1.2.


Note The Cisco CSR 1000V does not support jumbo packets larger than 1518 bytes for KVM on a Virtio interface in Cisco IOS XE Release 3.11S. Packets larger than that are dropped.


You can improve performance on KVM configurations by performing the following:

  • Enabling CPU Pinning

To increase performance for KVM environments, you can use the KVM CPU Affinity option to assign a virtual machine to a specific processor. To use this option, you configure CPU pinning on the KVM host.

In the KVM host environment, verify the host topology to find out how many vCPUs are available for pinning by using the following command:

virsh nodeinfo

Use the following command to verify the available vCPU numbers:

virsh capabilities

Use the following command to pin the virtual CPUs to sets of processor cores:

virsh vcpupin < vmname > < vcpu# > < host core# >

This KVM command must be executed for each vCPU on your Cisco CSR 1000V. The following example pins virtual CPU 1 to host core 3:

virsh vcpupin csr1000v 1 3

The following example shows the KVM commands needed if you have a Cisco CSR 1000V configuration with four vCPUs and the host has eight cores:

virsh vcpupin csr1000v 0 2

virsh vcpupin csr1000v 1 3

virsh vcpupin csr1000v 2 4

virsh vcpupin csr1000v 3 5

The host core number can be any number from 0 to 7. For more information, see the KVM documentation.


Note When configuring CPU pinning, carefully consider the CPU topology of the host server. If using a Cisco CSR 1000V configured with multiple cores, do not configure CPU pinning across multiple sockets.


  • Enabling the vhost-net Driver

To improve performance in KVM environments, we recommend that you enable the LINUX vhost-net driver. Make sure the vhost-net driver is loaded by entering the following command on the KVM host:

modprobe vhost-net

For more information, see the KVM documentation.


Note The vhost-net setting is enabled by default on KVM Ubuntu installations. If using Red Hat Enterprise Linux, you must specify which devices will use the XML definition file.