This section describes the COT commands and scripts that are commonly used for deploying Cisco Catalyst 8000V using COT.
cot edit-properties
This command is part of COT and lets you configure or modify the properties within the OVA file. Use the cot edit-properties command to pre-apply a small number of configuration commands to the OVA.
cot edit-properties ova-filename
Here, -o output specifies the name or path to a new OVA package, if you are creating a new OVA instead of updating the existing OVA.
-c config-file specifies the name of a text file containing IOS XE commands to be added to the OVA.
In this example, a previously created text file, iosxe_config.txt, containing the appropriate IOS XE configuration commands, is added to the OVA deployment using the cot edit-properties command.
$ cat iosxe_config.txt
interface GigabitEthernet1
no shutdown
ip address 192.168.100.10 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet1 192.168.100.1
$ cot edit-properties c8000v-universalk9.ova \
-o c8000v-universalk9-customized.ova \
-c iosxe_config.txt
$ cot info c8000v-universalk9-customized.ova
The cot info command is used to show the modified OVA.
Properties:
<config-version> "1.0"
Router Name ""
...
Intercloud Tunnel Interface Gateway IPv4 Address ""
<ios-config-0001> "interface GigabitEthernet1"
<ios-config-0002> "no shutdown"
<ios-config-0003> "ip address 192.168.100.10 255.255.255.0"
<ios-config-0004> "ip route 0.0.0.0 0.0.0.0 GigabitEthernet1 192.168.100.1"
This table specifies the command and arguments used in the example.
| Script step |
Description |
cot edit properties c8000v-universalk9.ova |
Edits the custom environment properties of the OVA file. |
-o "c8000v-universalk9-customized.ova" |
Creates a new OVA containing configuration commands from the text file. |
-c iosxe_config.txt |
The text file that contains IOS XE configuration commands. Each line of configuration in this file results in an entry such as com.cisco.productname.ios-config-xxxx in the XML of the OVA. |
cot inject-config
The cot inject-config command is used in COT to embed one or more bootstrap configuration files into the OVA package.
Use the cot inject-config commandto pre-apply a large set of configuration commands to the OVA, for example, a complete running configuration. This method is efficient for file size and loading time, because it uses plain text for configuration commands rather than XML.
For more information about the cot inject-config command, see http://cot.readthedocs.io/en/latest/usage_inject_config.html
cot inject-config ova-filename
Here, -o output specifies the name or path to a new OVA package if you are creating a new OVA instead of updating the existing OVA.
-c config-file specifies the name of a text file, such as iosxe_config.txt to be embedded in the OVA.
In this example, the cot inject-config command adds Cisco IOS XE commands in text file iosxe_config.txt to the OVA.
$ cat iosxe_config.txt
interface GigabitEthernet1
no shutdown
ip address 192.168.100.10 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet1 192.168.100.1
$ cot inject-config c8000v-universalk9.ova \
-o c8000v-universalk9-customized.ova \
-c iosxe_config.txt
$ cot info c8000v-universalk9-customized.ova
<.. other output snipped for brevity ..>
Files and Disks: File Size Capacity Device
--------- --------- --------------------
c8000v_harddisk.vmdk 71.50 kB 8.00 GB harddisk @ SCSI 0:0
bdeo.sh 52.42 kB
README-OVF.txt 8.53 kB
README-BDEO.txt 6.75 kB
cot.tgz 116.78 kB
c8000v-universalk9.iso 484.80 MB cdrom @ IDE 1:0
config.iso 350.00 kB cdrom @ IDE 1:1
This table specifies the cot inject-config command and arguments used in the example.
| Script step |
Description |
cot inject-config
c8000v-universalk9.ova
|
Edits the custom environment properties of the OVA file. |
-o "c8000v-universalk9-customized.ova" |
Specifies the name of the new or modified OVA that contains the configuration commands from the text file. |
-c iosxe_config.txt |
The name of the text file that contains the IOS XE configuration commands. |