description

add storage

tasks

for faster .img/qcow2 consumption, you can follow: Simple HTTP Server

"""A Python Pulumi program"""

import pulumi_libvirt as libvirt

pool = libvirt.Pool("cluster",
  type = "dir",
  path = "/var/lib/libvirt/images/cluster_storage"
)

ubuntu = libvirt.Volume("ubuntu",
  pool   = pool.name,
  source = "http://media/_cloud/ubuntu-20.04-server-cloudimg-amd64.img",

)

filesystem = libvirt.Volume("filesystem",
  base_volume_id = ubuntu.id,
  pool           = pool.name,
  size           = 10000000000
)

domain = libvirt.Domain("ubuntu",
  disks = [ libvirt.DomainDiskArgs(
    volume_id = filesystem.id
  )]
)