Open sudomas opened 3 years ago
I have the same issue on Ubuntu 20.04 with Packer 1.7.4, using the following configuration block:
disks {
type = "virtio"
disk_size = "10G"
storage_pool = "local"
storage_pool_type = "directory"
format = "qcow2"
}
Same issue here with Packer 1.7.6, I'm building a VM based off of a Peakflow ISO image with the following disk settings:
disks {
disk_size = "120G"
storage_pool = "gluster-volume"
storage_pool_type = "directory"
type = "scsi"
format = "qcow2"
}
The only workaround I found is to live change the disk format while the OS is installing, before Packer converts it to a template. I tried with storage_pool_type zfspool
and lvm
getting the same result.
Hello, is there any plan to bump github.com/Telmate/proxmox-api-go to v0.0.0-20220129131641-6909b62b8cf0 (I'm not aware at all about your release model)? Sounds like the fix is working
We are also experiencing this issue with Packer 1.7.10
Could you release a new version please? @azr
works fine now with 1.0.5, thanks
@Pumba98 Are you sure? I upgraded to 1.0.5 and it still ignores the format value and produces only raw disks...
yes, I am @theblop . I changed the version in my required_plugins to >= 1.0.5
and run packer init
.
Before the files were .raw
now they are .qcow2
and it fixed my problems after cloning them with terraform
@Pumba98 that's weird... I upgraded too and I still get a raw disk...
packer {
required_plugins {
proxmox = {
version = ">= 1.0.5"
source = "github.com/hashicorp/proxmox"
}
}
source "proxmox-iso" "vm" {
...
vm_id = 99999
disks {
disk_size = "80G"
format = "qcow2"
storage_pool = var.proxmox.storage_pool
storage_pool_type = var.proxmox.storage_pool_type
type = "scsi"
}
...
}
After the build I get a raw image:
root@ebsifactory:~# pvesh get /nodes/proxmox/qemu/99999/config
...
│ scsi0 │ storage:99999/base-99999-disk-0.raw,iothread=0,size=80G │
@theblop sorry, I have no idea what could be wrong.
Double check with packer plugins installed
(new in packer 1.8) that you got the right proxmox plugin version. Everything else lgtm
Can confirm it works on my side (Packer 1.8.0). Great !
root@baikonour:~# qemu-img info /mnt/pve/vmfs/images/1000/vm-1000-disk-0.qcow2
image: /mnt/pve/vmfs/images/1000/vm-1000-disk-0.qcow2
file format: qcow2
virtual size: 32 GiB (34359738368 bytes)
disk size: 65.3 MiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
I'm still experiencing the same issue even with plugin version 1.0.5:
packer {
required_plugins {
proxmox = {
version = ">= 1.0.5"
source = "github.com/hashicorp/proxmox"
}
}
}
... disks { disk_size = "120G" storage_pool = "efs" storage_pool_type = "directory" type = "scsi" format = "qcow2" } ...
- Packer and plugin version:
$ packer plugins installed /home/dbuenoparedes/.packer.d/plugins/github.com/hashicorp/proxmox/packer-plugin-proxmox_v1.0.5_x5.0_linux_amd64 $ packer version Packer v1.8.0
- Proxmox VM disk info:
│ boot │ order=scsi0;ide2;net0 │ │ scsi0 │ efs:9500/base-9500-disk-0.raw,iothread=0,size=120G │ │ scsihw │ virtio-scsi-pci │
image: /mnt/efs/images/9500/base-9500-disk-0.raw file format: raw virtual size: 120 GiB (128849018880 bytes) disk size: 579 MiB
@ruskofd, could you confirm that packer 1.8.0
does work for you?
I tested 1.8.0
and the issue was still there
But I confirmed that with 1.8.1
the problem is fixed!
@dbuenoparedes, could you confirm this?
my packer version is 1.8.2
and I have the same issue
disks {
disk_size = "20G"
format = "qcow2"
storage_pool = "Backup"
storage_pool_type = "lvm"
type = "virtio"
}
lvmthin: Backup
thinpool Backup
vgname Backup
content images,rootdir
nodes pve
The same config works with raw
just don't work with qcow2
Same issue for me, I am using Packer 1.8.3 and proxmox 1.0.8.
No issues currently for me:
Packer config file:
disks {
disk_size = "15G"
format = "qcow2"
storage_pool = "Proxmox"
storage_pool_type = "directory"
type = "scsi"
cache_mode = "writethrough"
io_thread = true
}
Proxmox storage.cfg
dir: Proxmox
path /mnt/prox
content images,snippets,rootdir,vztmpl,iso
prune-backups keep-all=1
shared 0
$ packer plugins installed
homedir/.config/packer/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v1.0.8_x5.0_linux_amd64
$ packer version
Packer v1.8.4
Packer creates the VM always with raw disks only, no matter what disk format is defined in
disks
block. Here's my disk configuration.disks { storage_pool = var.isoStore storage_pool_type = "directory" type = "virtio" disk_size = var.diskSize cache_mode = "none" format = "qcow2" }
It creates VM with a raw disk always. I tried changing the disk type to
iscsi
, format toqcow
etc. but that did not help.I use the Packer version 1.7.3 on Ubuntu 20.04 and trying to create a template of Ubuntu 20.04.