No history yet

Internal Component Interaction

The Life of a VM Request

When you ask OpenStack to create a virtual machine, you're kicking off a complex internal ballet. It all starts with a simple REST API call to the nova-api service. This service acts as the front door, validating your request and translating it into an internal message. But it doesn't do the heavy lifting itself. Instead, it delegates.

In modern OpenStack deployments, Nova is designed with a multi-cell architecture to improve scalability. This means your compute hosts are partitioned into groups called cells, each with its own database and message queue. This "shared nothing" approach prevents a single database from becoming a bottleneck. However, it creates a new problem: how do you make a global decision, like where to place a new VM, without talking to every cell's database directly? The answer is the nova-super-conductor.

The nova-api service doesn't know or care about cells. It sends a remote procedure call, or RPC, to the super conductor. This message contains all the details of the requested VM. The super conductor's first job is to create a preliminary record of this new instance. But where does this record live before a cell has been assigned? It goes into a special, minimalist database known as cell0.

The cell0 database is a key innovation for scalability and resilience. It's designed to be simple and only contains instance mappings and build requests. By creating a record here first, Nova ensures that if the placement process fails very early on, there's still a trace of the request. Without cell0, a failure before the instance was assigned to a proper cell database would leave the request in a strange limbo, making it difficult to debug.

From Scheduling to Building

With the build request safely logged in cell0, the super conductor's next task is to find a home for the VM. It makes another RPC call, this time to the nova-scheduler service. The scheduler's sole purpose is to solve this puzzle. It queries the database for a list of available compute hosts across all cells that haven't been marked as disabled.

Then, it runs a series of filters. Can Host A support the requested RAM? Does Host B have enough disk space? Is Host C part of the correct availability zone? After filtering, it uses a set of 'weighers' to score the remaining hosts. For example, the RAMWeigher might prefer hosts with the least amount of used RAM to spread the load. The scheduler picks the host with the best score.

This entire process is asynchronous. The moment nova-api successfully passes the request to the conductor, it returns a "202 Accepted" status to the user. The actual VM creation happens in the background, which is essential for a system that needs to handle thousands of requests without making users wait.

Once the scheduler returns its chosen host, the super conductor performs its final act. It updates the instance record, pointing it to the correct cell database. Then, it forwards the build request via RPC to the nova-conductor service running within that specific cell. From this point on, the cell-level conductor takes over, making a final RPC call to the nova-compute service on the destination host, which finally starts the hypervisor process to boot the VM.

This hand-off from a global 'super' conductor to a local cell conductor is what allows Nova to scale to enormous sizes while maintaining a central point of control for initial request placement. It elegantly solves the problem of managing a distributed system without creating a single, monolithic database that would crumble under the load.

Let's test your understanding of how these internal components work together.

Quiz Questions 1/5

What is the very first OpenStack Nova service to receive a user's REST API call to create a new virtual machine?

Quiz Questions 2/5

What is the primary purpose of the cell0 database in a multi-cell Nova architecture?

Understanding this flow is crucial for troubleshooting failed builds and appreciating the sophisticated design that makes a cloud platform like OpenStack possible.