Installation and configuration¶
Install¶
Important
First need to do setting up the environment. All commands are executed only from superuser.
Mode superuser:
sudo -i
Install package:
from Python packages repository:
pip3 install nova-virt-driver
Note
To install Nova Virt Driver on Astra Linux (Smolensk) do following:
Connect the provided repository with AccentOS packages.
Install the package with the command:
sudo apt install -y aos-nova-virt-driver
Configure¶
After installation, the module must be activated by specifying it as a driver in the Nova configuration file
/etc/nova/nova.conf
. Example:[DEFAULT] compute_driver = nova_virt_driver.driver.LibvirtDriver [libvirt] virt_type = kvm
Restart
nova-compute
service:# Debian: systemctl restart nova-compute.service
Settings in Dashboard to change the amount of memory and CPU of instances¶
Important
Agent module must be installed and configured on the compute nodes before changing the amount of RAM and the number of CPU cores of instance.
Log in to Dashboard, the process is described in the section “Authorization and navigation in the module”.
Go to the “Administrator” section, to the “Flavors” tab. Select the required flavor and click “Update Metadata”.
In the window that opens, set the maximum number of processor cores and RAM for this “Flavor”. Two parameters
cpu:maximum
andmem:maximum
are responsible for this (they must be greater than or equal to the current flavor parameters, for example, for an instance type with 128 MB RAM,mem:maximum
must be greater than or equal to 131072 (KB), in the picture below 524288 KB = 512 MB). These parameters indicate what the maximum number of processor cores and RAM (the value of the amount of RAM is indicated in KB). You can set for instance created on the basis of this “Flavor”, that is, you can change the number of processor cores and RAM in the future, after creating and running instance on the fly without restarting it.Go to the «Project», then to the “Instances” tab. Create instance with the required parameters and the flavor that was configured earlier. Detailed description of the process of creating a instance is available in subsection “Launch instance”. The created instance will have the parameters of the original flavor (VCPUS, RAM, Disk size, etc.).
Select instance created based on flavor with updated metadata, use the «Hot Plug» action to change the number of CPU cores and RAM on the instance on the fly.
You can also change the processor cores and RAM of instance manually by updating the instance’s metadata.
In the window that opens, set the required number of processor cores and RAM for this instance. Two parameters are responsible for this:
cpu:current
andmem:current
. These values must not exceed thecpu:maximum
andmem:maximum
values specified for the “Flavor”. These values must not exceed the values specified for the “Flavor”. The amount of RAM and the number of processor cores will be applied without rebooting if instance guest system supports hot plugging of processor cores and RAM.
Functionality is described in more detail in the corresponding section.