System Operations Commands

scp

To secure copy a file from the Cisco NFVIS to an external system or from an external system to Cisco NFVIS, the admin user can use the scp command in privileged EXEC mode.

For detailed information about how to use this command to copy to or from supported locations, see the Usage Guidelines section.

scp source destination

Syntax Description

source

To copy a file from an external system, specify the source in the following format: user@remotehostip:file .

To copy a file to an external system, specify the NFVIS location and name of the file.

The external host can have an IPv4 or IPv6 address as described in the Usage Guidelines section.

destination

To copy a file to an external system, specify the the destination in the following format: user@remotehostip:file .

To copy a file from an external system, specify the NFVIS location and name of the file.

The external host can have an IPv4 or IPv6 address as described in the Usage Guidelines section.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.7.1 Support for IPv6 address, NFS location, USB, prefix mappings and log file copy was added.
3.6.1

This command was introduced.

Usage Guidelines

Following are the guidelines for using the scp command:

  • Supported Users: Only the admin user can run the scp command.

  • Certain special characters are blacklisted from source and destination path, except in certain positions - '*', '&', ';', ':', '@', '|', '..'

  • Supported Locations

    • The admin user can copy files to and from the intdatastore, extdatastore1, extdatastore2, usb, and nfs locations in Cisco NFVIS. In addition, the admin user can copy the log files from Cisco NFVIS to an external system.

      Any attempt to SCP to NFVIS file system other than the mentioned list is prohibited by the command:

      intdatastore - /data/intdatastore/uploads/

      extdatastore1 - /mnt/extdatastore1/uploads/

      extdatastore2 - /mnt/extdatastore2/uploads/

      usb - /mnt-usb/

      nfs - /data/mount/

      logs - /data/intdatastore/logs

      You can copy to and from extdatastore1, extdatastore2, usb, and nfs locations only if they are available or mounted. The extdatastore1 and extdatastore2 locations are available only in the Cisco ENCS 5400 Series.

    • The admin user can copy the log files from the logs folder of Cisco NFVIS to an external system. Copying files to the logs folder is not allowed. All SCP actions are logged into /data/intdatastore/logs/nfvis_scp.log file.

    • To copy to or from a USB, you must first mount the USB by using the system usb-mount mount ACTIVE command. After the USB is mounted, use the show system file-list disk usb command to find the exact USB name and provide the identified USB name in the scp command; for example, scpuser@remotehostip:fileusb:usb_name/filename .

    • To copy to or from NFS, you must first mount an NFS location by using the system storage nfs_storage command. After the NFS is mounted, you must specify the name of the NFS mount in the scp command; for example, scp user@remotehostip:filenfs: mount_name/filename .

  • Supported Address Types: You can specify IPv4 or IPv6 address of an external system. The IPv6 address of the external system must be specified within square brackets ([ ]); for example, scp user@[ remotehostip]:sourcefile destinationfile

Examples

The following example copies the sample.txt file from intdatastore to an external system.

nfvis# scp intdatastore:sample.txt user@203.0.113.2:/Users/user/Desktop/sample.txt

Examples

The following example copies the test.txt file from an external system to intdatastore.

nfvis# scp user@203.0.113.2:/Users/user/Desktop/test.txt intdatastore:test_file.txt

Examples

The following example copies the test.txt file from an external system to USB.

nfvis# scp user@203.0.113.2:/user/Desktop/my_test.txt usb:usb1/test.txt

Examples

The following example copies the sample.txt file to an NFS location.

nfvis# scp user@203.0.113.2:/user/Desktop/sample.txt nfs:nfs_test/sample.txt

Examples

The following example copies the sample.txt file from an external system with IPv6 address.

nfvis# scp user@[2001:DB8:0:ABCD::1]:/user/Desktop/sample.txt intdatastore:sample.txt

Examples

The following example copies the nfvis_scp.log file to an external system.

nfvis# scp logs:nfvis_scp.log user@203.0.113.2:/Users/user/Desktop/copied_nfvis_scp.log

system file-copy usb

To copy a VM image using the USB drive, use the system file-copy usb command in global configuration mode.

system file-copy usb file name string

Syntax Description

file name string

Specifies the file name of the VM image.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification

This command was introduced.

Examples

The following example shows how to copy a VM image using the USB drive:


nfvis(config)# system usb-mount mount active
nfvis(config)# system file-copy usb file name usb1/package/isrv-universalk9.16.03.01.tar.gz
nfvis(config)# commit

system file-download file

To download a file to a specific location (/data/intdatastore/uploads) on the host server, from a HTTP server, use the system file-download file command.

system file-download file { source http checksum sha256 checksum }

Syntax Description

source

Specifies the path for the file to be copied.

(Optional) checksum

Specifies the SHA256 checksum for the file to be downloaded.

Command Default

None

Command Modes

None

Command History

Release Modification
3.9.1

This command was introduced.

Examples

The following example shows how to download a file to a specific location (/data/intdatastore/uploads) on the host server, from the HTTP server:


nfvis#  system:system file-download file { source http://1.2.3.4/file_1 checksum 73f0474f9d145c8e2d89e9b3dda937676a52e854bc76c2da18738733503a0d83 }

Note


Multiple files can be downloaded, either with or without checksum, at the same time.


system file-delete

To delete a file from the default location (/data/intdatastore/uploads) on the host server, use the system file-delete command in global configuration mode.

system file-delete file name string

Syntax Description

name string

Specifies the name of the file.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Examples

The following example shows how to delete a file from the default location on the host server:


nfvis(config)# system file-delete file name /data/intdatastore/uploads/TinyLinux.tar.gz
nfvis(config)# commit

system usb-mount

To mount the USB drive on the NFVIS server, use the system usb-mount command in global configuration mode. To unmount, use the no form of this command.

system usb-mount mount active

no system usb-mount

Syntax Description

mount active

Mounts the USB drive on the NFVIS server.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

Ensure that you have plugged the USB drive that contains the required images into the server before mounting the USB drive.

Examples


nfvis(config)# system usb-mount mount active
nfvis(config)# commit

telnet

To open a telnet session to a local service on a serial port, use the telnet command in privileged EXEC mode.

telnet serial-port

Syntax Description

serial-port

Specifies the name of the serial port. The serial port must be enabled for the VM.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.7.1

This command was introduced.

Examples


nfvis# telnet 7000
Trying 127.0.0.85...
Connected to 127.0.0.85.
Escape character is '^]'.

Router>
Router>
Router>? 
Exec commands:
  access-profile   Apply user-profile to interface
  app-hosting      Application hosting
  appnav           IOS Wide Area Application Services
  clear            Reset functions
  connect          Open a terminal connection
  crypto           Encryption related commands.
  disable          Turn off privileged commands
  disconnect       Disconnect an existing network connection
  do-exec          Mode-independent "do-exec" prefix support
  enable           Turn on privileged commands
  ethernet         Ethernet parameters
  exit             Exit from the EXEC
  help             Description of the interactive help system
  ip               IP SLA Exec Command
  lat              Open a lat connection
  license          Smart licensing Commands
  lig              LISP Internet Groper
  lock             Lock the terminal
  login            Log in as a particular user
  logout           Exit from the EXEC
  mrinfo           Request neighbor and version information from a multicast
 --More--

show system file-list

To display a list of system files, use the show system file-list command in privileged EXEC mode.

show system file-list [ disk [local | nfs | usb]]

Syntax Description

disk

Displays files from the specified disk type.

local

Displays the files on local system.

nfs

Displays the files on NFS.

usb

Displays the files on mounted USB drive.

Command Modes

Privileged EXEC (#)

Command History

Release Modification

3.6.1

This command was introduced.

Examples

nfvis# show system file-list
system file-list disk local 1
 name          nfvisvmpackagingtool.tar
 path          /data/intdatastore/uploads/vmpackagingutility
 size          50K
 type          "VM Packaging Tool"
 date-modified "2017-09-07 02:18:53"
system file-list disk local 2
 name          catalina.out-20171001.gz
 path          /data/intdatastore/logs/2017-10
 size          40
 type          "Log File"
 date-modified "2017-10-01 04:00:01"
system file-list disk local 3
 name          ovsdb-server.log-20171001.gz
 path          /data/intdatastore/logs/2017-10
 size          276
 type          "Log File"
 date-modified "2017-10-01 04:00:01"
system file-list disk local 4
 name          ovs-vswitchd.log-20171001.gz
 path          /data/intdatastore/logs/2017-10
 size          204
 type          "Log File"
 ...