Pulumi start | libvirt-python 03 | adding serial console
description⌗
adding serial console
tasks⌗
"""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",
consoles = [ libvirt.DomainConsoleArgs(
type = "pty",
target_port = "0",
target_type = "serial"
)],
disks = [ libvirt.DomainDiskArgs(
volume_id = filesystem.id
)]
)
Read other posts