VM Management
Guide to virtual machine lifecycle management in Infinibay
VM Management
Infinibay provides comprehensive virtual machine management through a GraphQL API and the Infinization module.
Overview
Virtual machines are managed through the @infinibay/infinization package, a TypeScript library that builds QEMU commands and spawns processes directly. This approach bypasses libvirt for VM lifecycle management. Firewall rules are managed via nftables.
Creating VMs
VMs are created through the GraphQL API with automatic configuration:
mutation CreateVM {
createVM(input: {
name: "dev-workstation"
departmentId: "dept-123"
memory: 4096
vcpus: 2
diskSize: 50
osType: "windows11"
}) {
id
name
status
}
}
VM Lifecycle
VMs have the following states:
- STOPPED - VM is powered off
- RUNNING - VM is active
- PAUSED - VM is suspended
- PENDING - VM is being created/modified
Automatic Configuration
When creating a VM, Infinibay automatically:
- Configures TPM 2.0 for Windows 11
- Sets up network interfaces
- Applies department firewall rules
- Configures storage pools
VM Operations
Available operations:
- Start - Power on the VM
- Stop - Graceful shutdown
- Force Stop - Immediate shutdown
- Restart - Reboot the VM
- Pause - Suspend to memory
- Resume - Resume from pause
Resource Management
VMs can be resized (requires restart):
- Modify CPU count
- Adjust memory allocation
- Expand disk size (cannot shrink)