Contents

Introduction

Background Information

Prerequisites

Requirements

Components Used

Problem

Find Virtual Machines Full Name

Manage Virtual Machines

Verify

Introduction

This document describes how to do basic Virtual Machine (VM) management in Network Function Virtualization Infrastructure Software (NFVIS) via command line interface (CLI).

Background Information

NFVIS is a part of Enterpise Network Function Virtualization (ENFV). NFVIS is the software platform that implements full life cycle management from the central orchestrator and controller (APIC-EM and ESA) for virtualized services. NFVIS enables the connectivity between virtual services and external interfaces as well as supporting the underlying hardware.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

- ENFV

- NFVIS

Components Used

The information in this document is based on these software:

- Enterprise NFV Infrastructure Software version 3.5.1

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Problem

The command show system deployments deployment shows the list of VMs and their status.

bdsol-encs-01# show system deployments deployment

NAME              ID  STATE

-------------------------------

1494763184.ISRv   2   running

1495371059.Linux  -   shut

The problem is that names under column NAME are not the full names for VMs. For VM management you need to find the full name to perform actions with it.

Find Virtual Machines Full Name

In order to find the full name of VM you need to run the command show vm_lifecycle opdata tenants tenant. You will see VM name in a line that begins with name, as well as in VM NAME column.

Tip: If you look for VMs in specific tenant, you can add the tenant name to the end of command.

bdsol-encs-01# show vm_lifecycle opdata tenants tenant

vm_lifecycle opdata tenants tenant admin

tenant_id AdminTenantId

networks network int-mgmt-net

netid                 085d726e-3193-469b-b9f8-7415e3e8b880

shared                true

admin_state           true

provider_network_type local

status                active

subnets subnet int-mgmt-net-subnet

subnetid   c56aa2e2-fd96-4e25-8744-0684acc2b14f

cidr       10.20.0.0/24

gateway    10.20.0.1

no_gateway false

dhcp       false

ipversion  4

deployments 1494763184 - -

deployment_id SystemAdminTenantId1494763184

vm_group ISRv

vm_instance ae521a5b-f173-4b22-9b05-2130b346fbe3

name     SystemAdminTena_ISRv_0_1989b9c8-311a-43d6-94e1-385752a3cc44

host_id  NFVIS

hostname bdsol-encs-01

interfaces interface 0

model       virtio

port_id     vnic0

network     int-mgmt-net

subnet      N/A

ip_address  10.20.0.2

mac_address 52:54:00:60:44:a6

netmask     255.255.255.0

gateway     10.20.0.1

interfaces interface 1

model       virtio

port_id     vnic1

network     N/A

subnet      N/A

ip_address  127.0.0.1

mac_address 52:54:00:0b:b9:95

interfaces interface 2

model       virtio

port_id     vnic2

network     N/A

subnet      N/A

ip_address  127.0.0.1

mac_address 52:54:00:ab:32:cd

state_machine state SERVICE_ACTIVE_STATE

VM NAME                                                      STATE

-----------------------------------------------------------------------------

SystemAdminTena_ISRv_0_1989b9c8-311a-43d6-94e1-385752a3cc44  VM_ALIVE_STATE

deployments 1495371059 - -

deployment_id SystemAdminTenantId1495371059

vm_group Linux

vm_instance 82030189-61d2-4675-9ea5-2f2c9a0514c6

name     SystemAdminTena_Linux_0_58b32552-37ba-4759-8c25-28065fc6158d

host_id  NFVIS

hostname bdsol-encs-01

interfaces interface 0

model   virtio

port_id vnic3

network lan-net

subnet  N/A

state_machine state SERVICE_INERT_STATE

VM NAME                                                       STATE

--------------------------------------------------------------------------------

SystemAdminTena_Linux_0_58b32552-37ba-4759-8c25-28065fc6158d  VM_SHUTOFF_STATE

Manage Virtual Machines

To manage a VM you can use vmAction command, followed by actionType and vmName.

bdsol-encs-01# vmAction

Possible completions:

actionType  vmName

Type in vmAction actionType command to get the list of possible actions.

bdsol-encs-01# vmAction actionType

Possible completions:

DISABLE_MONITOR  ENABLE_MONITOR  REBOOT  START  STOP

For example, to start a VM named SystemAdminTena_Linux_0_58b32552-37ba-4759-8c25-28065fc6158d use this command.

bdsol-encs-01# vmAction actionType START vmName SystemAdminTena_Linux_0_58b32552-37ba-4759-8c25-28065fc6158d

Verify

You have these options to verify VM status:

- Use NFVIS CLI command show system deployments deployment

- Use NFVIS CLI command show vm_lifecycle opdata tenants tenant

- In GUI navigate to VM Life Cycle -> Manage, and see the status of VM

- Latest log events in log file /var/log/messages

An example of event generated in log file /var/log/messages:

Jul  4 12:13:20 bdsol-encs-01 esc-manager-event: 2017-07-04 12:13:17,987 UI_INFO [LogContextService.java:outputDecoratedLog():185] [tid=4422933a-d335-456f-afa7-b02156be4438] [cl=esc ] [tags=eventType:rest_in] @event{"label": "rest_in",","data":{"Message":"Post back for starting VM:","ESC-Transaction-Id:  ":"4422933a-d335-456f-afa7-b02156be4438","OP-Status-Code: ":"200","OP-Status-Message: ":"VM successfully powered on."}}

Jul  4 12:13:20 bdsol-encs-01 esc-manager-event: 2017-07-04 12:13:17,997 UI_INFO [LogContextService.java:outputDecoratedLog():185] [tid=4422933a-d335-456f-afa7-b02156be4438] [cl=esc ] [tags=wf:create_vm,eventType:VM_START_EVENT,tenant:admin,depName:1495371059,vmGrpName:Linux,vmName:SystemAdminTena_Linux_0_58b32552-37ba-4759-8c25-28065fc6158d,eventType:rest_out] @event{"label": "rest_out",","data":{"headers":"{ESC-Transaction-Id=4422933a-d335-456f-afa7-b02156be4438, REMOTE_ADDR=127.0.0.1, OP-Status-Message=VM successfully powered on., OP-Status-Code=200}"}}