Henrique Utsch
Henrique Utsch

Reputation: 1

proxmox pulumi tls: failed to verify certificate: x509: certificate signed by unknown authority when up

This is my proxmox python configure and i get this error

export PROXMOX_VE_PASSWORD="my root pass"
export PROXMOX_VE_ENDPOINT=https://192.168.31.100:8006/api2/json
export PROXMOX_VE_USERNAME=root@pam
export PROXMOX_VE_INSECURE=True
import os
from dotenv import load_dotenv
import pulumi
import pulumi_proxmoxve as proxmoxve

load_dotenv()

proxmox_username = os.getenv("PROXMOX_USERNAME")
proxmox_password = os.getenv("PROXMOX_PASSWORD")

# pve = proxmoxve.apt.Repository("deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription",
#     enabled=True,
#     file_path="/etc/apt/sources.list",
#     index=0,
#     node="pve")

# ceph = proxmoxve.apt.Repository("deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription",
#     enabled=True,
#     file_path="/etc/apt/sources.list.d/ceph.list",
#     index=0,
#     node="pve")

proxmox_provider = proxmoxve.Provider("proxmoxve",
    endpoint="https://192.168.31.100:8006/api2/json",
    username=proxmox_username,
    password=proxmox_password,
    insecure=True
)

vm = proxmoxve.vm.VirtualMachine("virtualMachineResource",
    node_name="netboot",
    name="netboot-xyz",
    memory=proxmoxve.vm.VirtualMachineMemoryArgs(
        dedicated=2048,  
        floating=0,  
        shared=0,  
        hugepages="2", 
        keep_hugepages=True
    ),
    disks=[proxmoxve.vm.VirtualMachineDiskArgs(
        interface="virtio",
        backup=False,
        size=100 * 1024 * 1024 * 1024
    )],
    cpu=proxmoxve.vm.VirtualMachineCpuArgs(
        cores=2,
        numa=True
    ),
    network_devices=[proxmoxve.vm.VirtualMachineNetworkDeviceArgs(
        bridge="vmbr0",
        model="virtio",
    )],
    clone=proxmoxve.vm.VirtualMachineCloneArgs(
        vm_id=100,
        full=False,
        node_name="netboot",
    ),
    operating_system=proxmoxve.vm.VirtualMachineOperatingSystemArgs(
        type="l26",
    ),
    on_boot=True,
    protection=False,
    started=False,
    template=False
)

pulumi.export('vm_id', vm.vm_id)

I expect my code work

Upvotes: 0

Views: 103

Answers (0)

Related Questions