Use the viocli inventory-admin command to compare the compute and block storage inventories against the vSphere inventory and to discover and remove orphaned objects. Orphaned instances are instances that do not have corresponding VMs in OpenStack and vSphere.

The viocli inventory-admin command collects vCenter and OpenStack credentials from internal inventories. This command requires that you enter the OpenStack administrative password. To prevent having to enter the password each time, set the OS_PASSWORD environment variable.

The viocli inventory-admin command uses the following syntax.

viocli inventory-admin SHOW_ACTION [-d NAME] [--json] \
       [--pretty] [--all] [--no-grace-period] \
       [--force] [-h] [-v]
viocli inventory-admin CLEAN_ACTION [-d NAME] [--json] \
       [--pretty] [--all] [--no-grace-period] \
       [--force] [-h] [-v]

Parameter

Mandatory or Optional

Description

SHOW_ACTION

Use one of the following positional arguments:

show-instances

show-instance-vms

show-shadow-vms

Mandatory

show-instances

Display orphaned OpenStack instances.

show-instance-vms

Display orphaned vSphere instances.

show-shadow-vms

Display orphaned volume shadow VMs. These are volume VMs that do not have corresponding block storage volumes in the OpenStack database.

CLEAN_ACTION

Use one of the following positional arguments:

clean-instances

clean-instance-vms

clean-shadow-vms

Mandatory

clean-instances

Remove orphaned OpenStack instances.

clean-instance-vms

Remove orphaned vSphere instances.

clean-shadow-vms

Remove orphaned volume shadow VMs. These are volume VMs that do not have corresponding block storage volumes in the OpenStack database.

-d, --deployment NAME

Automatic

Name of deployment to use.

Applied automatically. The default value is the name of the current deployment.

--json

Optional

Return output in JSON format. This is the default format when this command is used noninteractively.

--pretty

Optional

Return output in human-readable format. This is the default format when this command is used interactively.

--all

Optional

Show all objects. The default is to show only orphaned objects.

--no-grace-period

Optional

Disable the default grace period setting.

If no grace period is set, the command ignores all objects created or modified in the last 30 minutes.

-f, --force

Optional

Perform operation without requiring confirmation.

-h, --help

Optional

Show the use and arguments for this command.

-v, --verbose

Optional

Enter verbose mode.