Skip to content
Search

OpenStack:Nova

lastmod 2018-08-17created 2016-06-0815 edits

Command

nova list
Prints the list of active services (instances).
nova service-list
Prints the list of services.

File

/etc/nova/nova.conf
NOVA configuration file.
/var/log/nova/nova-compute.log
NOVA log file.

Configuration

Can be configured through the /etc/nova/nova.conf file.

Nova API Metadata Service

Allows metadata requests from instances. The nova-api-metadata service is generally used when installing nova-network and when running in multi-host mode. For more details, see Metadata service in the OpenStack Cloud Administrator Guide.

First check the OpenStack official documentation about the metadata service. Metadata Ideally if you run an OpenStack production environment you will opt for a multi compute node solution which requires nova metadata service on each nova-compute node (for performance purpose). You can assign the metadata server like so:

  1. Use the metadata_host option in nova.conf, specify the IP address of the node running nova-api
  2. Run the nova-api service on each nova-compute node and specify the enabled_apis = metadata flag in nova.conf
  3. Or the last option (my favorite), simply run the nova-api-metadata (with the same name package) service on each nova-compute node. It doesn’t require any modification in nova.conf (default options are enough)

Flags related to metadata in nova.conf:

metadata_listen_port = 8775
metadata_host = 172.17.1.3
metadata_manager = nova.api.manager.MetadataManager
quota_metadata_items = 128
metadata_listen = 0.0.0.0
enabled_apis = [‘ec2’, ‘osapi_compute’, ‘osapi_volume’, ‘metadata’]
metadata_port = 8775

Restart

In the RDO Project, use the following.

$ sudo systemctl | grep nova
$ sudo systemctl restart openstack-nova-api.service
$ sudo systemctl restart openstack-nova-cert.service
$ sudo systemctl restart openstack-nova-compute.service
$ sudo systemctl restart openstack-nova-conductor.service
$ sudo systemctl restart openstack-nova-consoleauth.service
$ sudo systemctl restart openstack-nova-novncproxy.service
$ sudo systemctl restart openstack-nova-scheduler.service

VGA PCI passthrough

Troubleshooting

KVM: Permission denied

When creating an instance from Horizon, the following error may occur.

Error: No valid host was found. There are not enough hosts available

Checking the log file may show an error like the following.

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1160, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 692, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/1 (label charserial0)
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied

In this case, the SELinux context for libvirt may be blocked. Check the settings here.

If that's a hassle, just disable it!

List of OpenStack Service

OpenStack Service

Main

Horizon, Nova, Neutron

Storage

Swift, Cinder

Shared services

Keystone, Glance, Ceilometer

Higher-level services

Heat

ETC

cloud-init

See also

Favorite site