A slice is the fundamental unit of isolation in Cloud Repositorio — a named container that groups virtual machines and the L2 links between them, backed by a dedicated pool of VLANs. Every resource (VM, link, network) belongs to exactly one slice, and slices are owned by a single user. Isolation is enforced at the VLAN layer: no two slices share VLAN IDs, so traffic cannot leak between tenants at the network level.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/markitobonito/cloud_repositorio/llms.txt
Use this file to discover all available pages before exploring further.
Slice lifecycle
A slice moves through two states from creation to deployment:| State | Triggered by | What it means |
|---|---|---|
design | create_slice | Slice exists in the database. VMs and links can be added but nothing is running. |
running | deploy_slice | VLAN gateways and DHCP namespaces are configured on the network node; all VMs are started on their assigned workers. |
running it cannot be deployed again. To rebuild the topology, delete the slice and create a new one.
VLAN pool allocation
Each slice is assigned a contiguous block of 20 VLAN IDs at creation time. The block is derived directly from the slice ID:1000 gets VLANs 100–119 (100 + (1000 % 100) * 20 = 100), while slice 1001 gets 120–139. Because slice_id % 100 cycles through 0–99, the formula supports up to 100 concurrent slices without any VLAN overlap. VLAN IDs are consumed in order as links are created; get_next_vlan() returns the first unused ID in the pool.
User VM quota
Each user account carries aquota_vms ceiling and a used_vms counter. Before every add_vm_to_slice call the orchestrator checks:
database.yaml:
| Role | quota_vms |
|---|---|
| admin | 10 |
| student | 6 |
used_vms is incremented when a VM is added and decremented (via max(0, used_vms - vm_count)) when a slice is deleted.
Slice composition
One slice contains:- Many VMs — each assigned to a worker node, with one or more network interfaces
- Many links — each link connects two VM interfaces and consumes one VLAN from the pool
- Many networks — one
Networkobject per VLAN, carrying CIDR, gateway IP, and DHCP state
Sample slice data structure
What happens on slice deletion: If the slice is
running, the orchestrator stops every VM by sending SIGKILL to the QEMU process on each worker, removes all TAP interfaces from br-int, and tears down VLAN gateways and DHCP namespaces on the network node (ns-dhcp-vlan{vlan_id} deleted, gw_vlan{vlan_id} port removed). Regardless of run state, all per-VM QCOW2 overlay images are deleted from /tmp/vm_images/ on their respective workers. The user’s used_vms counter is reduced by the number of VMs that were in the slice.