12 min to read
Deep Dive into OpenStack Nova
Understanding OpenStack's Compute Service Architecture and Components

Understanding OpenStack Nova
What is Nova?
Nova provides the backbone for the most essential cloud computing capability: creating and managing instances of virtual servers. As a core component of OpenStack, Nova:
- Manages Resources: Orchestrates compute, network, and storage resources for virtual machines
- Provides Flexibility: Supports multiple hypervisors, allowing technology choice
- Enables Scaling: Designed for horizontal scaling across data centers
- Offers API Control: Exposes a RESTful API for automation and integration
Nova translates user requirements into infrastructure resources, bridging the gap between raw hardware and consumable cloud computing capabilities.
Nova Architecture and Components
Core Services and Daemons
Service | Role | Description |
---|---|---|
nova-api | API Endpoint |
|
nova-scheduler | Resource Allocation |
|
nova-compute | Hypervisor Management |
|
nova-conductor | Database Proxy |
|
nova-novncproxy | Console Access |
|
Nova Architectural Flow
Service Communication
Nova components communicate through several key mechanisms:
- Message Queue (RabbitMQ/Oslo): Asynchronous communication between components
- RESTful API: External interface for user and service requests
- Database: Persistent state storage shared between components
- Driver Interfaces: Standardized communication with hypervisors and hardware
This distributed architecture ensures scalability and fault tolerance, allowing Nova to manage thousands of compute nodes across multiple data centers.
Compute Instance Management
Instance Types
Type | Characteristics | Best For |
---|---|---|
Virtual Machines |
|
|
Bare Metal Servers |
|
|
Containers |
|
|
Hypervisor Support
Nova supports multiple hypervisors through its driver architecture:
- KVM: The most widely deployed and mature hypervisor in OpenStack
- VMware vSphere: Enterprise-grade commercial hypervisor
- Hyper-V: Microsoft's hypervisor for Windows environments
- Xen: Open-source hypervisor with strong isolation properties
- QEMU: Software virtualization for development and testing
This flexibility allows organizations to leverage existing investments in virtualization technology while providing a consistent management interface.
Resource Scheduling and Allocation
Scheduling Process
Scheduling Filters
Filter Type | Description |
---|---|
ComputeFilter | Ensures host is enabled and capable of servicing requests |
AvailabilityZoneFilter | Filters hosts by requested availability zone |
RamFilter | Checks if host has sufficient RAM for requested instance |
DiskFilter | Ensures host has enough disk space for instance |
CoreFilter | Verifies host has enough CPU cores for instance |
ImagePropertiesFilter | Matches image properties (architecture, hypervisor type) with host capabilities |
ServerGroupAntiAffinityFilter | Places instances on different hosts for redundancy |
ServerGroupAffinityFilter | Places instances on the same host for performance |
To improve the efficiency of Nova's scheduling decisions:
- Define appropriate instance flavors to standardize resource allocation
- Use host aggregates to group similar compute nodes
- Configure weighing to prefer hosts with more available resources
- Implement custom filters for specialized requirements
- Monitor scheduler decisions to identify bottlenecks
Proper scheduling configuration is critical for optimizing resource utilization and maintaining performance as the cloud environment grows.
Integration with Other OpenStack Services
Service Integrations
Service | Integration Purpose | Functionality |
---|---|---|
Keystone | Identity Management |
|
Glance | Image Management |
|
Neutron | Networking |
|
Cinder | Block Storage |
|
Placement | Resource Inventory |
|
Service Communication Flow
Working with Nova’s API
API Versioning
Nova uses microversioning to manage API changes:
- Format: X.Y where X is the major version and Y is the microversion
- Backward Compatibility: Guaranteed within major versions
- Version Discovery: Clients can query for supported versions
- Version Negotiation: Clients specify desired version in request headers
This approach allows for API evolution while maintaining compatibility with existing clients and scripts.
Common API Operations
# List instances (servers)
openstack server list
# Get detailed information about an instance
openstack server show <server_id>
# Create a new instance
openstack server create --flavor m1.small --image ubuntu-20.04 \
--network private-net my-new-server
# Stop an instance
openstack server stop <server_id>
# Start an instance
openstack server start <server_id>
# Resize an instance
openstack server resize --flavor m1.large <server_id>
# Create a snapshot of an instance
openstack server image create --name my-snapshot <server_id>
# Delete an instance
openstack server delete <server_id>
Advanced Features and Capabilities
Instance Features
Feature | Description |
---|---|
Live Migration | Move running instances between compute hosts with minimal downtime, useful for maintenance and load balancing |
Resize | Change the flavor (resource allocation) of an existing instance to scale up or down |
Snapshots | Create point-in-time copies of instances that can be used to create new instances |
Shelving | Temporarily offload instances to free up resources while preserving instance data |
Rescue Mode | Boot an instance from a special rescue image to recover from boot failures |
Server Groups | Define affinity or anti-affinity policies to control instance placement |
Host Aggregates | Group hosts with similar characteristics for specialized workloads |
Quotas | Set resource usage limits per tenant to prevent resource exhaustion |
Block Device Mapping
Nova's Block Device Mapping (BDM) provides flexible options for configuring storage for instances:
- Root Disk: Boot device containing the operating system (typically vda)
- Ephemeral Disks: Temporary storage that exists only during instance lifetime
- Persistent Volumes: Cinder volumes that persist beyond instance lifecycle
- Config Drive: Special device for passing instance metadata and configuration
BDM allows precise control over how storage is configured, including boot options, device naming, and size specifications.
# Example Block Device Mapping (in YAML format)
block_device_mapping_v2:
- device_name: vda
source_type: image
destination_type: volume
uuid: 6d39447b-2bd9-4f68-8f4d-59aa304a5444 # Image UUID
volume_size: 20
boot_index: 0
delete_on_termination: true
- device_name: vdb
source_type: blank
destination_type: volume
volume_size: 100
boot_index: -1
delete_on_termination: false
Key Points
-
Core Functionality
- Manages the lifecycle of compute instances
- Supports multiple hypervisors for technology flexibility
- Provides robust API for automation and integration
- Scales horizontally for large deployments -
Architecture
- Distributed, service-oriented design
- Specialized components with distinct responsibilities
- Message-based communication for scalability
- Integration with multiple OpenStack services -
Advanced Capabilities
- Sophisticated scheduling for optimal resource utilization
- Live migration for maintenance without downtime
- Multi-tenant isolation for security
- Flexible storage configuration options
- Support for bare metal and container workloads
Comments