-
Environment
Problem DescriptionI'm experiencing an issue where Ubuntu 22.04 cloud images deploy successfully to my LVM storage ( What Works
What Doesn't Work
The VM creation appears to complete, but the VM either:
Terraform Configurationmain.tfresource "proxmox_virtual_environment_vm" "ubuntu_vm" {
name = "test-ubuntu"
node_name = "node1"
stop_on_destroy = true
agent {
enabled = true
}
cpu {
cores = 2
}
memory {
dedicated = 2048
}
disk {
datastore_id = "proxmox_storage_2" # LVM storage - works with 22.04, fails with 24.04
interface = "scsi0"
file_id = "nfs-isos:iso/ubuntu-24.04.3-server-cloudimg-amd64.img"
discard = "on"
size = 10
}
initialization {
dns {
servers = ["10.4.62.102", "10.4.4.143"]
}
ip_config {
ipv4 {
address = "10.4.50.131/24"
gateway = "10.4.50.254"
}
}
user_data_file_id = proxmox_virtual_environment_file.user_data_cloud_config.id
}
network_device {
bridge = "vmbr70"
}
}provider.tfterraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "0.95.0"
}
}
}
provider "proxmox" {
endpoint = "https://10.4.21.100:8006"
username = "root@pam"
password = "xxxxx"
insecure = true
ssh {
agent = true
username = "root"
node {
name = "node1"
address = "10.4.21.100"
}
}
}cloud-config.tfresource "proxmox_virtual_environment_file" "user_data_cloud_config" {
content_type = "snippets"
datastore_id = "local"
node_name = "node1"
source_raw {
data = <<-EOF
#cloud-config
package_update: true
timezone: America/Bogota
hostname: test_bgp
manage_etc_hosts: true
users:
- name: provision
gecos: provision
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: false
passwd: "$6$hashed_password"
packages:
- vim
- net-tools
- qemu-guest-agent
- htop
runcmd:
- systemctl enable --now qemu-guest-agent
- sysctl --system
final_message: "The system is finally up, after $UPTIME seconds"
power_state:
mode: reboot
message: Restarting server after setup
EOF
file_name = "user-data-cloud-config.yaml"
}
}What I've Tried
None of these solutions worked. The issue persists specifically with Ubuntu 24.04 + LVM storage combination. Storage Informationpvesm status | grep proxmox_storage_2
proxmox_storage_2 lvm active 4394524672 943722496 3450802176 21.47%PVE Informationpveversion --verbose
proxmox-ve: 9.1.0 (running kernel: 6.17.4-2-pve)
pve-manager: 9.1.4 (running version: 9.1.4/5ac30304265fbd8e)
proxmox-kernel-helper: 9.0.4
proxmox-kernel-6.17.4-2-pve-signed: 6.17.4-2
proxmox-kernel-6.17: 6.17.4-2
proxmox-kernel-6.17.2-1-pve-signed: 6.17.2-1
ceph-fuse: 19.2.3-pve2
corosync: 3.1.9-pve2
criu: 4.1.1-1
dnsmasq: 2.91-1
frr-pythontools: 10.4.1-1+pve1
ifupdown2: 3.3.0-1+pmx11
intel-microcode: 3.20251111.1~deb13u1
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-5
libproxmox-acme-perl: 1.7.0
libproxmox-backup-qemu0: 2.0.1
libproxmox-rs-perl: 0.4.1
libpve-access-control: 9.0.5
libpve-apiclient-perl: 3.4.2
libpve-cluster-api-perl: 9.0.7
libpve-cluster-perl: 9.0.7
libpve-common-perl: 9.1.4
libpve-guest-common-perl: 6.0.2
libpve-http-server-perl: 6.0.5
libpve-network-perl: 1.2.4
libpve-rs-perl: 0.11.4
libpve-storage-perl: 9.1.0
libspice-server1: 0.15.2-1+b1
lvm2: 2.03.31-2+pmx1
lxc-pve: 6.0.5-3
lxcfs: 6.0.4-pve1
novnc-pve: 1.6.0-3
proxmox-backup-client: 4.1.1-1
proxmox-backup-file-restore: 4.1.1-1
proxmox-backup-restore-image: 1.0.0
proxmox-firewall: 1.2.1
proxmox-kernel-helper: 9.0.4
proxmox-mail-forward: 1.0.2
proxmox-mini-journalreader: 1.6
proxmox-offline-mirror-helper: 0.7.3
proxmox-widget-toolkit: 5.1.5
pve-cluster: 9.0.7
pve-container: 6.0.18
pve-docs: 9.1.2
pve-edk2-firmware: 4.2025.05-2
pve-esxi-import-tools: 1.0.1
pve-firewall: 6.0.4
pve-firmware: 3.17-2
pve-ha-manager: 5.1.0
pve-i18n: 3.6.6
pve-qemu-kvm: 10.1.2-5
pve-xtermjs: 5.5.0-3
qemu-server: 9.1.3
smartmontools: 7.4-pve1
spiceterm: 3.4.1
swtpm: 0.8.0+pve3
vncterm: 1.9.1
zfsutils-linux: 2.3.4-pve1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
Hey @rodfranck 👋🏼 Have you checked https://github.com/bpg/terraform-provider-proxmox?tab=readme-ov-file#serial-device-required-for-debian-12--ubuntu-vms? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your answer @bpg-dev, The issue is actually related to the LVM storage. I’m able to provision virtual machines using the Ubuntu 24 image with Cloud-Init as long as the disk storage (scsi0) is not set to the LVM storage (proxmox_storage_2). I can use NFS or Local-LVM without any problems. I applied the required serial device change, but it still doesn’t work. I believe that change was not particularly relevant to the root cause. Here is the configuration of the VM created using Local-LVM storage, which works correctly. However, if I switch the storage to proxmox_storage_2 (LVM), the VM fails during boot, indicating that it was unable to execute the Cloud-Init configuration. |
Beta Was this translation helpful? Give feedback.


I honestly have no way of explaining why the problem only occurred with Ubuntu 24. The exact same script was successfully tested with cloud images of Ubuntu 22, Oracle Linux 9, and Debian 12, and only failed with Ubuntu 24 cloud images (several of them).
I found a very similar behavior described in this forum thread:
https://forum.proxmox.com/threads/template-on-shared-storage.146756
For context, our shared storage is a Dell PowerVault ME4024.
As a workaround, I decided to create the VMs on local-lvm first, and then migrate the disks to the SAN storage afterward. Although this required an additional manual step, it seemed acceptable if the end result matched the expected architecture.
How…