Cisco CSR 1000V Series Cloud Services Router Software Configuration Guide
Installing the Cisco CSR 1000V in KVM Environments
Downloads: This chapterpdf (PDF - 312.0 KB) | 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

Creating a Cisco CSR 1000V KVM Instance

Creating the Cisco CSR 1000V VM Using the Self-installing.Run Package

Installation Procedure

Creating the Cisco CSR 1000V VM Using the virt-manager GUI Tool

Creating the Cisco CSR 1000V VM Using virt-manager—Using.qcow2 or.iso Image

Creating a Bootstrap Day0 Configuration for virt-manager

Creating the Cisco CSR 1000V VM Using the virt-install CLI Tool

Creating the Cisco CSR 1000V VM Using virt-install—Using.qcow2 Image

Creating the Cisco CSR 1000V VM Using virt-install—Using.iso Image

Creating a Bootstrap Day0 Configuration for virt-install

Creating the Cisco CSR 1000V on OpenStack

Creating the Instance Using the OpenStack Command Line Tool

Creating the Instance Using the OpenStack Dashboard

Bootstrapping CSR configuration

Bootstrap Properties

Example ovf-env.xml File

Example iosxe_config.txt File

Increasing Performance on KVM Configurations

Notes and Troubleshooting — KVM Environments

Cloning the VM

Kernel Virtual Machine Support Information

The CSR1000V supports the following Linux/KVM environments:

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat Enterprise Virtualization (RHEV)
  • Ubuntu (beginning with Cisco IOS XE Release 3.11S)

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.

The Red Hat Enterprise Virtualization (RHEV) platform is a commercially packaged virtualization platform from Red Hat.

For more information on the KVM products and versions supported, see Installation Requirements for KVM.

The Cisco CSR 1000V installation on KVM requires the manual creation of a VM and installation using the.iso file or the qcow2 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 26 vNICs.

KVM Support on OpenStack

Beginning with Cisco IOS XE 3.12S, the Cisco CSR 1000V supports 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 on OpenStack” section.

Installation Requirements for KVM

Table 6-1 lists the installation requirements for KVM environments. For installation procedures, see the “Creating a Cisco CSR 1000V KVM Instance” 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
Cisco IOS XE Release 3.14S
Cisco IOS XE Release 3.15S, 3.16S, 3.17S

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
  • Linux KVM based on Red Hat Enterprise Linux 6.31
  • Ubuntu 14.04 LTS Server 64 Bits 2
  • Linux KVM based on Red Hat Enterprise Linux 6.63 (RHEL 7.14 supported in 3.17S)
  • Ubuntu 14.04 LTS Server 64 Bits 2

Supported vCPU configurations5

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
  • 1 vCPU:
    requires minimum 4 GB RAM allocation
  • 2 vCPUs: requires minimum 4 GB RAM allocation
  • 4 vCPUs: requires minimum 4 GB RAM allocation
  • 1 vCPU:
    requires minimum 4 GB RAM allocation
  • 2 vCPUs: requires minimum 4 GB RAM allocation
  • 4 vCPUs: requires minimum 4 GB RAM allocation

Virtual CPU cores required

1

1

1

1

1

Virtual hard disk size

8 GB minimum

8 GB minimum

8 GB minimum6

8 GB minimum7

8 GB minimum8

Supported vNICs

Virtio

Virtio

Virtio

Virtio

Virtio

Maximum number of vNICs supported per VM instance

26

26

26

26

26

Virtual CD/DVD drive installed (applicable only when installing using an.iso file)

Required

Required

Required

Required

Required

1.Requires Kernel version 2.6.32 and QEMU 0.12.1.2.

2.Requires QEMU-x86_64 version 1.0 (qemu-kvm-1.0).

3.Requires Kernel version 2.6.32-504 and QEMU 0.12.1.2.

4.Requires Kernel version 3.10.0 and QEMU 1.5.3

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

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

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

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

Creating a Cisco CSR 1000V KVM Instance

Creating the Cisco CSR 1000V VM Using the Self-installing.Run Package

The Cisco CSR 1000V KVM Installer package (with .run extension) is a self-installing CSR package for KVM.

Default or Interactive

Installing a CSR instance using the .run package provides two options:

  • Default mode—Installation using the bundled CSR image file and one of the default VM configuration options (small, medium, large, xlarge) described in the procedure below.

or

  • Interactive—Interactive mode provides:

Customization of VM configuration

and

Option to install the bundled CSR image file or a separate..qcow2 image

Installation Procedure

The following steps are performed on the KVM server.

Prerequisites

Download the.run executable from the Cisco CSR 1000V software installation image package and copy it onto a local device.


Step 1 Run the.run executable to launch the CSR VM.

csr1000v-universalk9.03.16.01a.S.155-3.S1a-ext.run <option>

 

Values for <option>:

  • interactive —Interactive mode
  • small —Deploy CSR with: 1 vCPU, 4 GB RAM, 3 vNICs
  • medium —Deploy CSR with: 2 vCPU, 4 GB RAM, 3 vNICs
  • large —Deploy CSR with: 4 vCPU, 4 GB RAM, 3 vNICs
  • xlarge —Deploy CSR with: 4 vCPU, 8 GB RAM, 3 vNICs

Example of Interactive Mode Installation

./csr1000v-universalk9.03.16.01a.S.155-3.S1a-ext.run interactive
 
Verifying archive integrity... 100% All good.
Uncompressing KVM Installer Package 100%
Setting up installation of CSR on KVM
Tuning Daemon is already running
A tuning daemon process supports the automation of CSR VM vCPU and vhost vCPU affinity setting on Ubuntu host OS and RHEL.
Please enter the appropriate values for the options below:
Enter the VM name [csr_29405]: my_csr_vm
Enter the image location [/var/lib/libvirt/images/csr1000v-universalk9.03.16.01a.S.155-3.S1a-ext.qcow2_csr_29405]:
Enter the number of vCPUs [1]: 4
Enter the value for RAM [4096]: 8192
Enter number of vnics [3]: 2
Options for virtual bridge:
virbr0
vnet1
Enter bridge for vnic 1 [virbr0]:
Options for virtual bridge:
virbr0
vnet1
Enter bridge for vnic 2 [virbr0]:
Options for virtual bridge:
virbr0
vnet1
Creating VM my_csr_vm
Do you want to start the CSR?[y]
Starting CSR my_csr_vm...
VM my_csr_vm started
 

Creating the Cisco CSR 1000V VM Using the virt-manager GUI Tool

The virt-manager tool provides a GUI-based approach to creating a Cisco CSR1000V VM on the KVM server.

Creating the Cisco CSR 1000V VM Using virt-manager—Using.qcow2 or.iso Image

The following steps are performed on the KVM server.

Prerequisites

  • Download and install the virt-manager RPM package on the KVM server.
  • Download the .qcow2 or .iso image from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 1 Launch the virt-manager GUI. Click Create a new virtual machine.

Step 2 Do one of the following: (For .qcow2) Select Import existing disk image. (For .iso) Select Local install media (ISO image or CDROM).

Step 3 Select the CSR qcow2 or iso file location.

Step 4 Configure the memory and CPU parameters.

Step 5 Configure virtual machine storage.

Step 6 Click Finish.


Note To add additional hardware before creating the VM, select the Customize configuration before install option before clicking Finish. If this option is selected, then the next screen displays an Add Hardware button that can be used one or more times to add various hardware options, such as additional disks or a serial port interface.

Additional disks

One use case is adding a Bootstrap Day0 configuration. (Perform the steps described in Creating a Bootstrap Day0 Configuration for virt-manager.) To add a disk, perform the following steps:

a. Click Add Hardware.

b. Select the Storage option from the menu.

c. Select Select managed or other existing storage checkbox.

d. (Applicable only when adding a Bootstrap Day0 configuration) Click the Browse button and navigate to the csr_config.iso location. From the Device type drop-down menu, select the IDE CDROM option.

e. Click Finish.

After adding all necessary hardware, click Begin Installation.

Serial port interface

Enables accessing the CSR using a serial console. To add a serial port interface, perform the following steps:

a. Click Add Hardware.

b. Select the Serial option from the menu.

c. From the Device type drop-down menu, select TCP net console (tcp).

d. Specify the port number, and select the Use Telnet checkbox.

e. Click Finish.

After adding all necessary hardware, click Begin Installation.


 

Step 7 To access the CSR1000V VM console, do one of the following:

  • (If using virtual-console) Double-click the VM instance to access the VM console.
  • (If using the serial console) Do one of the following:

For IOS XE 3.16 and earlier releases : Configure the platform console serial command and reload the VM to enable console access through the virtual serial port.

For IOS XE 3.17 : If you have selected the console bootstrap property to point to serial, no additional configuration is needed. Reload the VM to enable console access through the virtual serial port. To reload using the CLI instead of virt-manager GUI, use virsh destroy domain-name, followed by virsh start domain-name.

You can access the Cisco IOS XE console using the Telnet port URI. For information, see Opening a Telnet Session to the Cisco CSR 1000V Console on the Virtual Serial Port.


 

Creating a Bootstrap Day0 Configuration for virt-manager

This procedure provides additional steps to execute within the Creating the Cisco CSR 1000V VM Using virt-manager—Using.qcow2 or.iso Image procedure, as noted within that section.

The following steps are performed on the KVM server.


Step 1 Create an iosxe_config.txt or ovf-env.xml file (described in Bootstrap Properties).

Step 2 Create a disk image from this file using below command:

mkisofs -l -relaxed-filenames -o /my/path/csr_config.iso <configuration_filename>
 

Step 3 (This step must be performed within the procedure described in Creating the Cisco CSR 1000V VM Using virt-manager—Using.qcow2 or.iso Image.)

Mount the csr_config.iso as an additional disk during creation of the CSR virtual machine.


 

Creating the Cisco CSR 1000V VM Using the virt-install CLI Tool

The virt-install tool provides a CLI-based approach to creating a Cisco CSR1000V VM on the KVM server..

Creating the Cisco CSR 1000V VM Using virt-install—Using.qcow2 Image

The following steps are performed on the KVM server.

Prerequisites

  • Download and install the virt-install RPM package on the KVM server.
  • Download the. qcow2 image from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 1 Using the virt-install command, create the instance and boot, using the following syntax:

virt-install \
--connect=qemu:///system \
--name=my_csr_vm \
--os-type=linux \
--os-variant=rhel4 \
--arch=x86_64 \
--cpu host \
--vcpus=1,sockets=1,cores=1,threads=1 \
--hvm \
--ram=4096 \
--import \
--disk path=<path_to_csr1000v_qcow2>,bus=ide,format=qcow2 \
--network bridge=virbr0,model=virtio \
--noreboot
 

(Optional) To configure a Bootstrap Day0 configuration, perform the steps described in Creating a Bootstrap Day0 Configuration for virt-install.

(Optional) To enable serial console access to the CSR, specify the following additional parameter:

--serial tcp,host=:<portnumber>,protocol=telnet
 

You can access the Cisco IOS XE console using the Telnet port URI. See Opening a Telnet Session to the Cisco CSR 1000V Console on the Virtual Serial Port.

After the installation is complete, the CSR VM will be shutdown. You can start the CSR VM using the virsh start command.


 

Red Hat Enterprise Linux—Setting Host Mode

Due to an issue specific to Red Hat Enterprise Linux, when launching the Cisco CSR1000V in a Red Hat Enterprise Linux environment using virt-install, set the host mode as follows:

  • In Red Hat Enterprise Linux 6, use:
--cpu host
 
  • In Red Hat Enterprise Linux 7, use:
--cpu host-model
 

Creating the Cisco CSR 1000V VM Using virt-install—Using.iso Image

The following steps are performed on the KVM server.

Prerequisites

  • Download and install the virt-install RPM package on the KVM server.
  • Download the .iso image from the Cisco CSR 1000V software installation image package and copy it onto a local or network device.

Step 1 Create a 8G disk image in .qcow2 format using the qemu-img command.

qemu-img create -f qcow2 csr_disk.qcow2 8G
 

Step 2 Use the virt-install command to install the CSR. This requires the correct permissions to create a new VM. The following example creates a 1 vCPU CSR with 4G of RAM, and one network interface.

virt-install \
--connect=qemu:///system \
--name=my_csr_vm \
--description "Test VM" \
--os-type=linux \
--os-variant=rhel4 \
--arch=x86_64 \
--cpu host \
--vcpus=1,sockets=1,cores=1,threads=1 \
--hvm \
--ram=4096 \
--cdrom=<path_to_csr1000v_iso> \
--disk path=csr_disk.qcow2,bus=virtio,size=8,sparse=false,cache=none,format=qcow2 \
--network bridge=virbr0,model=virtio \
--noreboot
 

(Optional) To configure a Bootstrap Day0 configuration, perform the steps described in Creating a Bootstrap Day0 Configuration for virt-install.

(Optional) To enable serial console access to the CSR, specify the following additional parameter:

--serial tcp,host=:<portnumber>,protocol=telnet
 

You can access the Cisco IOS XE console using the Telnet port URI. See Opening a Telnet Session to the Cisco CSR 1000V Console on the Virtual Serial Port.

The virt-install command creates a new VM instance and the CSR installs the image onto the specified disk file. After the installation is complete, the CSR VM will be shutdown. You can start the CSR VM using the virsh start command.


 

Red Hat Enterprise Linux—Setting Host Mode

Due to an issue specific to Red Hat Enterprise Linux, when launching the Cisco CSR1000V in a Red Hat Enterprise Linux environment using virt-install, set the host mode as follows:

  • In Red Hat Enterprise Linux 6, use:
--cpu host
 
  • In Red Hat Enterprise Linux 7, use:
--cpu host-model
 

Creating a Bootstrap Day0 Configuration for virt-install

This procedure provides additional steps to execute within one of the following procedures, as noted within the procedures:


Note The CSR1000V will read the day 0 configuration during initial bootup and will save the configuration after bootup.


In order to bootstrap, perform the following steps on the KVM server.


Step 1 Create an iosxe_config.txt or ovf-env.xml file (described in Bootstrap Properties).

Step 2 Create a disk image from the file using following command:

mkisofs -l -relaxed-filenames -o /my/path/csr_config.iso <configuration_filename>
 

Step 3 (This step must be performed within the VM creation procedure (see the options indicated above).

Add an additional disk parameter to the virt-install command to include the csr_config.iso disk image, as follows:

--disk path=/my/path/csr_config.iso,device=cdrom,bus=ide
 

Creating the Cisco CSR 1000V on OpenStack


 

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 name of the configuration file in which you enter the router configuration to be booted. There are two possible formats for the configuration file (described in Bootstrap Properties):


Note For details, see Bootstrapping CSR configuration.



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


Prior to Cisco IOS XE 3.16S, one could specify only one of the two configuration files in the nova boot command. Beginning with Cisco IOS XE 3.16S, one can specify both configuration files in the nova boot command line—for example:

nova boot csr-vm-316 --image csr-316 --flavor csr.2vcpu.4gb --nic port-id=6773be11-7b95-48cd-b372-fb8a3cae2b50 --config-drive=true --file ovf-env.xml=/home/stack/conf_files/ut/ovf-env.xml --file iosxe_config.txt=/home/stack/conf_files/ut/iosxe_config.txt
 

Examples

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.

Bootstrapping CSR configuration

Bootstrap Properties

The Cisco CSR 1000V bootstrap properties are specified in the ovf-env.xml file. For an example ovf-env.xml file, see Example ovf-env.xml File.

Table 6-2 describes bootstrap properties.

 

Table 6-2 Bootstrap Properties

Property
Description

console

(Cisco IOS XE 3.17S and later)

Configures the console mode.

Possible values: auto, virtual, serial

domain-name

Domain name of the router.

enable-scp-server

Enables the IOS SCP feature.

enable-ssh-server

Enables remote login using SSH and disables remote login via Telnet. Requires that the login username and password are set.

hostname

Hostname of the router.

license

(Cisco IOS XE 3.13S and later)

Configures the license technology level that is available when the Cisco CSR 1000V boots.

login-password

Login password for the router.

login-username

Login username for the router.

mgmt-interface

Designates the management interface for the Cisco CSR 1000V. The format must be GigabitEthernetx or GigabitEthernetx.xxx.

Note Beginning with Cisco IOS XE 3.11S, the GigabitEthernet0 interface is no longer supported.

mgmt-ipv4-addr

Management gateway address/mask in IPv4 format for the GigabitEthernet0 management interface.

mgmt-ipv4-gateway

IPv4 management default gateway address. If using DHCP, enter “dhcp” in the field.

mgmt-ipv4-network

Configures the IPv4 Network (such as “192.168.2.0/24” or “192.168.2.0 255.255.255.0”) that the management gateway should route to. If not specified, the default route (0.0.0.0/0) is used.

mgmt-vlan

Configures the dot1Q VLAN interface. Requires the management interface to be configured using the GigabitEthernetx.xxx format.

pnsc-agent-local-port

(Optional) Configures the Cisco Prime Network Services Controller service agent SSL port on the local Cisco CSR 1000V to receive policies from the service manager.

This setting is used if you plan to remotely manage the Cisco CSR 1000V using the Cisco Prime Network Services Controller.

pnsc-ipv4-addr

Configures the IP address of the Cisco Prime Network Services Controller.

This setting is used if you plan to remotely manage the Cisco CSR 1000V using the Cisco Prime Network Services Controller.

pnsc-shared-secret-key

Configures the Cisco Prime Network Services Controller shared secret key for the Cisco Prime Network Services Controller agent to set the SSL certificate from the controller.

This setting is used if you plan to remotely manage the Cisco CSR 1000V using the Cisco Prime Network Services Controller.

privilege-password

Configures the password for privileged (enable) access.

remote-mgmt-ipv4-addr

(Optional) Configures the IP address used for remote management of the Cisco CSR 1000V by the REST API or by the Cisco Prime Network Services Controller. The address must be in the same subnet as the management interface address.

Note Beginning with Cisco IOS XE 3.13S, this option is not used if configuring the shared management interface to support REST API.

ios-config

Enables execution of a Cisco IOS command.

To execute multiple commands, use multiple instances of ios-config, with a number appended to each instance—for example, ios-config-1, ios-config-2. The commands are executed in numerical order according to the appended number.

Example

ios-config-1="username cisco priv 15 pass ciscoxyz"
ios-config-2="ip scp server enable"
ios-config-3="ip domain lookup"
ios-config-4="ip domain name cisco.com”

Example ovf-env.xml File

When creating this bootstrap properties file, use this exact filename: ovf-env.xml

<?xml version="1.0" encoding="UTF-8"?>
<Environment
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1">
<PropertySection>
<Property oe:key="com.cisco.csr1000v.license.1" oe:value="security"/>
<Property oe:key="com.cisco.csr1000v.console.1" oe:value="serial"/>
 
<Property oe:key="com.cisco.csr1000v.config-version.1" oe:value="1.0"/>
<Property oe:key="com.cisco.csr1000v.domain-name.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.enable-scp-server.1" oe:value="False"/>
<Property oe:key="com.cisco.csr1000v.enable-ssh-server.1" oe:value="False"/>
<Property oe:key="com.cisco.csr1000v.hostname.1" oe:value="lab"/>
<Property oe:key="com.cisco.csr1000v.license.1" oe:value="ax"/>
<Property oe:key="com.cisco.csr1000v.login-password.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.login-username.1" oe:value="lab"/>
<Property oe:key="com.cisco.csr1000v.mgmt-interface.1" oe:value="GigabitEthernet1"/>
<Property oe:key="com.cisco.csr1000v.mgmt-ipv4-addr.1" oe:value="172.25.223.251/25"/>
<Property oe:key="com.cisco.csr1000v.mgmt-ipv4-gateway.1" oe:value="172.25.223.129"/>
<Property oe:key="com.cisco.csr1000v.mgmt-ipv4-network.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.mgmt-vlan.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.pnsc-agent-local-port.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.pnsc-ipv4-addr.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.pnsc-shared-secret-key.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.privilege-password.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.remote-mgmt-ipv4-addr.1" oe:value=""/>
<Property oe:key="com.cisco.csr1000v.ios-config-0001" oe:value="logging buffered 10000"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0002" oe:value="hostname uut-ovf"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0003" oe:value="ip domain-name cisco.com"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0004" oe:value="crypto key generate rsa modulus 1024"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0005" oe:value="interface GigabitEthernet2"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0006" oe:value="ip address 10.0.0.5 255.255.255.0"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0007" oe:value="no shut"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0008" oe:value="exit"/>
<Property oe:key="com.cisco.csr1000v.ios-config-0009" oe:value="ip route 0.0.0.0 0.0.0.0 10.0.0.1"/>
</PropertySection>
</Environment>

 

Example iosxe_config.txt File

When creating this bootstrap properties file, use this exact filename: iosxe_config.txt

hostname ultra-ios_cfg
license smart enable
username lab privilege 15 password lab
ip domain-name cisco.com
crypto key generate rsa modulus 1024
 
interface GigabitEthernet1
ip address 10.0.0.5 255.255.255.0
no shut
exit
 
ip route 0.0.0.0 0.0.0.0 10.0.0.1
 
line vty 0 4
login local
exit

 

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. For information about Red Hat Enterprise Linux requirements, see Table 6-1 .


Note Prior to Cisco IOS XE Release 3.13S, the Cisco CSR 1000V did not support jumbo packets larger than 1518 bytes for KVM on a Virtio interface. In those releases, packets larger than that were 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.


Notes and Troubleshooting — KVM Environments

Cloning the VM

In a KVM environment, cloning the CSR1000V virtual machine using the virt-manager virtual machine manager creates a CSR1000V virtual machine that may be un-bootable.

The issue is caused by an increase in the size of the cloned image size created by virt-manager, compared with the original CSR1000V VM image. The extra bytes (in the KB range) cause the boot failure.

This problem is described in bug CSCuo56920. (If you have an account on Cisco.com, you can also use the Bug Search tool to find view bugs/caveats. If the defect that you have requested is not displayed, it may be that the defect does not provide a description.)

Workarounds

There are three workarounds:

  • Use the virt-clone command to clone the CSR VM image.
  • For a cloned CSR VM image created by virt-manager, during the bootup, select the GOLDEN image to boot instead of packages.conf.
  • In the “Create a new virtual machine” window, deselect “Allocate entire disk now” before the new CSR1000V VM is created. This ensures that the cloned CSR image will be able to boot up. However, this workaround does not support nested cloning. Use this method only on the first cloned CSR1000V VM image.