Files
toallab-automation/roles/proxmox_sno_vm/README.md

1.9 KiB

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.proxmox collection
  • A proxmox_api inventory host with ansible_host and ansible_port set 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 ID
  • sno_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