IBM Support

vmware-discovery Information and Configuration

Question & Answer


Question

What is vmware-discovery and how is it configured?

Answer

Basic Information

The vmware-discovery process is responsible for discovering existing virtual machines, templates, and port groups in a VMware environment into OpenStack. Not to be confused with the standard OpenStack VMware driver. This driver is shipped with IBM Cloud Orchestrator 2.4.x.

Files

The configuration file is /etc/vmware-discovery.conf
The log file is /var/log/nova/discovery.log
The service script is /etc/init.d/nova-discovery

Process

The process can be seen here:


# ps -ef | grep discovery
nova     13776     1  0 Mar26 ?        00:00:03 /usr/bin/python /usr/lib/python2.6/site-packages/vmware_discovery/instance-discovery/bin/nova-vmware --logfile /var/log/nova/discovery.log

Ports and Firewall Considerations

The service is not a server and does not listen on a port (will not be found in netstat). However, discovery does communicate with the other OpenStack services. It needs access to those ports (refer to OpenStack documentation for required ports).

OpenStack communicates with VMware through HTTP/HTTPS requests. We require access to these ports:

80 - HTTP
443 - HTTPS

vCenter is usually configured to redirect HTTP requests on port 80 to port 443, but some OpenStack services still reference port 80 (thus, it needs to be open in the firewall to avoid time outs.)

Stopping and Starting

To stop and restart the service, run:

service nova-discovery stop
service nova-discovery start

Version Information

To see the current vmware-discovery driver version, check the RPM.


# rpm -qa | grep vmware
nova-vmware-driver-2014.1-201409182146.ibm.noarch

Install/Update Information

If a new driver build is supplied by IBM support, it will be provided as an RPM. To install it, remove the old version and install the new one.

rpm -e <nova-vmware-driver-old-version>
rpm -ivh --force <nova-vmware-driver-new-version>

Note on updating: Installing a new version of the driver will overwrite the vmware-discovery.conf configuration file. It is recommended that you make a backup of that file prior to running the rpm commands.

cp /etc/vmware-discovery.conf /etc/vmware-discovery.conf.bak

Then, compare the file to the new vmware-discovery.conf file and make the necessary changes.


Configuration

The vmware-discovery.conf file is located in /etc and has the following parameters (separated by section). The values in this file dictate how the vmware-discovery process operates. They must be set appropriately in order for VMware discovery to work. The configuration listed here is tailored toward the Icehouse driver.

######################################################

# /etc/vmware-discovery.conf

######################################################

[DEFAULT]



# To enable informational/debug logging, set these to true. Messages are logged in the
# file /var/log/nova/discovery.log . To disable logging, remove or set these to false.

verbose = true
debug = true

[openstack]


##################################
# Keystone connection information
##################################

# Authentication url to authenticate with Keystone. Must be set.
auth_url = http://<Keystone Server IP Address>:5000/v2.0

# Keystone version. Valid values are v2.0 or v3.0. Default is v2.0
keystone_version = v2.0

# Tenant name for connecting to Keystone. Default is admin.
admin_tenant_name = admin

# Username for connecting to Keystone. Default is admin.
admin_user = admin

# Password of the specified admin_user. Must be set.
admin_password = <password>

# When SSL is not in use, this is set to True. Defaults to true.
http_insecure = True

# Optional: For local SSL connections, specify the path and filename of the cacert file.
#connection_cacert =


##################################
# Qpid connection information
##################################

# Qpid broker hostname. Must be set.
qpid_hostname =

# Qpid broker port. Defaults to 5672.
qpid_port = 5672

# Username for qpid connection. Must be set.
qpid_username =

# Password for qpid connection. Must be set.
qpid_password =

# Transport protocol to use. Valid values are 'tcp' or 'ssl'. Defaults to TCP.
qpid_protocol = tcp



[vmware_discovery]

# The discovery manager. This must be set to the full class name for the VMware Discovery Manager.
discovery_manager = vmware.nova.driver.compute.manager.VMwareDiscoveryManager

# Full class name for the driver for VMware Discovery Service
discovery_driver = vmware.nova.driver.virt.vmware.driver.VMwareVCSynchingDriver

# The name of the staging project. Defaults to 'Public'. If this is set to another value, the named project
# must exist and be accessible to the specified staging_user.
staging_project_name = admin

# The name of the staging user. Defaults to 'admin'. This user must have access to the project listed
# for staging_project_name.
staging_user = admin

# The prefix that will be added to the name of discovered instances.
instance_prefix = "Discovered VM "

# The prefix that will be added to the instance name for flavors created for discovered instances.
flavor_prefix = "Flavor for "

# Instance periodic sync interval specified in seconds. Default is 20, minimum is 10.
instance_sync_interval = 20

# Template periodic sync interval specified in seconds. Default is 300, minimum is instance_sync_interval.
template_sync_interval = 300

# Portgroup periodic sync interval specified in seconds. Default is 300, minimum is instance_sync_interval.
portgroup_sync_interval = 300

# The number of sync intervals between full instance syncs. Only instances known to be out of sync are
# synced on regular intervals. After the number of intervals specified by this parameter, all instances are
# fully synced. Defaults to 30.
full_instance_sync_frequency = 30

# Image periodic sync interval. Specified in seconds. This is the amount time from the end of one
# successful image periodic sync operation to the start of the next. Defaults to 300.
image_periodic_sync_interval_in_seconds = 300

# The time in seconds between image sync retry attempts if an error was
# encountered during an image sync operation
image_sync_retry_interval_time_in_seconds = 60

# The maximum number of images to return/discover. Defaults to 500. If OpenStack has more than 500
# images, this limit should be increaesed to include all images.
image_limit = 500

# Minimum delay interval and initial delay seconds for long run tasks.
longrun_loop_interval = 7
longrun_initial_delay = 10

# Default name for image for discovered VMware instances (when the name cannot be determined).
vmware_default_image_name = VMware Unknown Image

# Target region for discovered templates (for setting the Glance server). Defaults to the current region name. # Must be set.
target_region =

# Virtual machines to be ignored by discovery. Defaults to blank (no VMs will be ignored).
vm_ignore_list =

# Specifies whether the discovery process will delete VMs from Nova if they have already been deleted
# directly in vCenter. Defaults to False.
allow_instance_deletion = False

# Specifies whether the discovery process will delete templates from Glance if they have already been
# deleted directly in vCenter. Defaults to False.
allow_template_deletion = False


[vmware]

# physical_network_mappings is required when importing port groups from the vCenter side. Each physical
# network must be mapped to exactly one vswitch. If multiple vswitches are specified, only the last vswitch \
# listed will take effect.
#
# The expected format is <physnet>:<vswitch>, specified in a comma-separated list.
#
# Example: physical_network_mappings=physnet1:vswitch0,physnet2:vswitch1
#
# This must be set in order for neutron discovery to work.
physical_network_mappings=physnet1:vSwitch1,physnet2:dvSwitch

# Allows you to specify which port groups to import. Defaults to blank (import all port groups).
port_group_filter_list=

[portgroup]

# The tenant ID that network will be imported into. This must be set.
tenant_id=

# Specifies whether the discovery process will delete networks from Neutron that have already been deleted # directly in vCenter. Defaults to False.
allow_neutron_deletion = False

[database]

# Define database connection to neutron. If neutron is in use, this must be set to the SQL connection string
# listed in /etc/neutron/neutron.conf. If neutron is not used (nova-network), this can be left blank.
neutron_connection=

Notes on Configuration Changes:

The discovery process must be restarted in order for the changes made to this file will take effect.

[{"Product":{"code":"SGKRPG","label":"OpenStack"},"Business Unit":{"code":"BU016","label":"Multiple Vendor Support"},"Component":"Not Applicable","Platform":[{"code":"PF016","label":"Linux"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
28 January 2020

UID

nas8N1020648