proxmox_sno_vm
Creates a Proxmox virtual machine configured for Single Node OpenShift (SNO) deployment. The VM uses q35 machine type with UEFI boot (required for RHCOS), VirtIO NIC with optional VLAN tagging, and an empty CD-ROM slot for the agent installer ISO.
After creation the role retrieves the VM ID and MAC address, setting them as cacheable facts for use by subsequent plays.
Requirements
community.proxmoxcollection- A
proxmox_apiinventory host withansible_hostandansible_portset to the Proxmox API endpoint
Role Variables
| Variable | Default | Description |
|---|---|---|
proxmox_node |
pve1 |
Proxmox cluster node |
proxmox_api_user |
ansible@pam |
API username |
proxmox_api_token_id |
ansible |
API token ID |
proxmox_api_token_secret |
required | API token secret (sensitive) |
proxmox_validate_certs |
false |
Validate TLS certificates |
proxmox_storage |
local-lvm |
Storage pool for VM disks |
proxmox_iso_storage |
local |
Storage pool for ISOs |
proxmox_iso_dir |
/var/lib/vz/template/iso |
ISO filesystem path on Proxmox host |
sno_credentials_dir |
/root/sno-{{ ocp_cluster_name }} |
Credential persistence directory |
sno_vm_name |
sno-{{ ocp_cluster_name }} |
VM name in Proxmox |
sno_cpu |
8 |
CPU cores |
sno_memory_mb |
32768 |
Memory in MB |
sno_disk_gb |
120 |
Disk size in GB |
sno_bridge |
vmbr0 |
Network bridge |
sno_vlan |
40 |
VLAN tag |
sno_mac |
"" |
MAC address (empty = auto-assign) |
sno_vm_id |
0 |
VM ID (0 = auto-assign) |
Cacheable Facts Set
sno_vm_id— assigned Proxmox VM IDsno_mac— assigned or detected MAC address
Example Playbook
- name: Create SNO VM in Proxmox
hosts: sno.openshift.toal.ca
gather_facts: false
connection: local
roles:
- role: proxmox_sno_vm
tags: proxmox
License
MIT
Author
ptoal