Orange-Cyberdefense / GOAD

game of active directory
GNU General Public License v3.0
5.11k stars 714 forks source link

GOAD on Proxmox Part 2 -> Error creating VM #207

Closed IntegralD-503 closed 5 months ago

IntegralD-503 commented 6 months ago

I have gone through this a couple of times with a fresh install, and I am pretty sure I am sticking to the directions. I am getting an unsupported format 'qcow2' error. I even pulled the binary so the packer version would match the on in the tutorial but still same issue. Tried with proxmox 7 and 8 as well.

proxmox-iso.windows: output will be in this color.

==> proxmox-iso.windows: Retrieving additional ISO
==> proxmox-iso.windows: Trying ./iso/Autounattend_winserver2016_cloudinit.iso
==> proxmox-iso.windows: Trying ./iso/Autounattend_winserver2016_cloudinit.iso?checksum=sha256%3A30ff6b6316bd0a1d81cbdd7281d61ca8c34910c0ba6fa643bdcd070bb23d8487
==> proxmox-iso.windows: ./iso/Autounattend_winserver2016_cloudinit.iso?checksum=sha256%3A30ff6b6316bd0a1d81cbdd7281d61ca8c34910c0ba6fa643bdcd070bb23d8487 => /root/GOAD/packer/proxmox/iso/Autounattend_winserver2016_cloudinit.iso
    proxmox-iso.windows: Uploaded ISO to local:iso/Autounattend_winserver2016_cloudinit.iso
==> proxmox-iso.windows: Creating VM
==> proxmox-iso.windows: No VM ID given, getting next free from Proxmox
==> proxmox-iso.windows: Error creating VM: error creating VM: unable to create VM 102 - unsupported format 'qcow2' at /usr/share/perl5/PVE/Storage/LvmThinPlugin.pm line 87., error status:  (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/windows_server_2016_14393.0_eval_x64.iso,media=cdrom kvm:true machine: memory:4096 name:WinServer2016x64-cloudinit-qcow2 net0:virtio=4E:75:98:3E:21:7E,bridge=vmbr3,tag=10 numa:false onboot:false ostype:win10 pool:GOAD sata0:local-lvm:40,discard=ignore,format=qcow2 scsihw:lsi sockets:1 startup: tags: vmid:102])
Build 'proxmox-iso.windows' errored after 2 seconds 63 milliseconds: Error creating VM: error creating VM: unable to create VM 102 - unsupported format 'qcow2' at /usr/share/perl5/PVE/Storage/LvmThinPlugin.pm line 87., error status:  (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/windows_server_2016_14393.0_eval_x64.iso,media=cdrom kvm:true machine: memory:4096 name:WinServer2016x64-cloudinit-qcow2 net0:virtio=4E:75:98:3E:21:7E,bridge=vmbr3,tag=10 numa:false onboot:false ostype:win10 pool:GOAD sata0:local-lvm:40,discard=ignore,format=qcow2 scsihw:lsi sockets:1 startup: tags: vmid:102])

Anything look off?

NeffIsBack commented 6 months ago

I guess you are using zfs? That solved it for me: Had that error a while ago when i set up the lab on proxmox as well, can you try to change the "vm_disk_format" variable in /packer/proxmox/windows_server...*.hcl files from "qcow2" to "raw"?

IntegralD-503 commented 6 months ago

Looks like it is working now, thanks! Yeah, I believe I picked zfs on the install (I think it was just the first option so I thought it was default). Is there a preferable option?

NeffIsBack commented 6 months ago

Not really sure what the pros and cons for zfs are. I just used what my company provided me. But either way, maybe mayfly can fix it by detecting the file system type somehow.

IntegralD-503 commented 6 months ago

actually, i was wrong. I was using lvm. Changing from qcow to raw helped, but then I ran into a bunch of build issues for windows server 2019 /2016. I ended up making an ext4 directory, and then updated the .hcl file like so

iso_file = "ext4:iso/windows_server_2016_14393.0_eval_x64.iso" now it works for me

Mayfly277 commented 5 months ago

ok thanks, so i close the issue as it was due to proxmox configuration

app3rol commented 1 month ago

actually, i was wrong. I was using lvm. Changing from qcow to raw helped, but then I ran into a bunch of build issues for windows server 2019 /2016. I ended up making an ext4 directory, and then updated the .hcl file like so

iso_file = "ext4:iso/windows_server_2016_14393.0_eval_x64.iso" now it works for me

were the build issues when you got to using ansible? i think i've encountered the same problem