•
csr1000v-universalk9.16.03.01a.qcow2
—
choose an image such as this (for Cisco IOS XE Denali 16.3.1) to use a virtual console. This is
recommended for later use with the OpenStack dashboard.
•
csr1000v-universalk9.16.03.01a-serial.qcow2
—
choose an image such as this (for Cisco IOS XE Denali 16.3.1) to use a serial console to access the
VM. This is useful in the lab or if you are using the Cisco Modeling Tool.
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 "Installation
Requirements" sections such as
Installation Requirements for KVM
Cisco IOS XE Denali 16.3, on page
131
or
Installation Requirements for KVM
Cisco IOS XE 3.x, on page 132
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
nova flavor-create
command
nova flavor-create
<
flavor_name
> <
flavor_id
> <
ram size MB
> <
disk size GB
> <
num_ vCPUs
>
See
Installation Requirements for KVM
Cisco IOS XE Denali 16.3, on page 131
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
Use the
glance
command, to create the OpenStack image
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:
Example:
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
Use the
nova boot
command, to create the instance and boot
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:
• “
ovf-env.xml
”
(OVF format)
• “
iosxe_config.txt
”
Cisco CSR 1000v Series Cloud Services Router Software Configuration Guide
123
Installing the Cisco CSR 1000v in KVM Environments
Creating the Instance Using the OpenStack Command Line Tool