Orange-Cyberdefense / GOAD

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

proxmox-iso.windows: Error creating VM #159

Closed LauraSniky closed 3 months ago

LauraSniky commented 7 months ago
root@provisioning:~/GOAD/packer/proxmox# packer build -var-file=windows_server2019_proxmox_cloudinit.pkvars.hcl .
proxmox-iso.windows: output will be in this color.

==> proxmox-iso.windows: Retrieving additional ISO
==> proxmox-iso.windows: Trying ./iso/Autounattend_winserver2019_cloudinit.iso
==> proxmox-iso.windows: Trying ./iso/Autounattend_winserver2019_cloudinit.iso?checksum=sha256%3Ad68ca28ff95b5ee75893984e776e91e435a7c7bcabd1d24be4509658efdd6041
==> proxmox-iso.windows: ./iso/Autounattend_winserver2019_cloudinit.iso?checksum=sha256%3Ad68ca28ff95b5ee75893984e776e91e435a7c7bcabd1d24be4509658efdd6041 => /root/GOAD/packer/proxmox/iso/Autounattend_winserver2019_cloudinit.iso
    proxmox-iso.windows: Uploaded ISO to local:iso/Autounattend_winserver2019_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: 403 Permission check failed (/sdn/zones/localnetwork/vmbr3/10, SDN.Use), error status: {"data":null} (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/windows_server2019_x64FREE_en-us.iso,media=cdrom kvm:true machine: memory:4096 name:WinServer2019x64-cloudinit-qcow2 net0:virtio=D2:76:45:F9:A4:90,bridge=vmbr3,tag=10 numa:false onboot:false ostype:win10 pool:GOAD sata0:local-lvm:40,format=qcow2,discard=ignore scsihw:lsi sockets:1 startup: tags: vmid:102])
Build 'proxmox-iso.windows' errored after 57 milliseconds 912 microseconds: Error creating VM: error creating VM: 403 Permission check failed (/sdn/zones/localnetwork/vmbr3/10, SDN.Use), error status: {"data":null} (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/windows_server2019_x64FREE_en-us.iso,media=cdrom kvm:true machine: memory:4096 name:WinServer2019x64-cloudinit-qcow2 net0:virtio=D2:76:45:F9:A4:90,bridge=vmbr3,tag=10 numa:false onboot:false ostype:win10 pool:GOAD sata0:local-lvm:40,format=qcow2,discard=ignore scsihw:lsi sockets:1 startup: tags: vmid:102])

==> Wait completed after 57 milliseconds 936 microseconds

==> Some builds didn't complete successfully and had errors:
--> proxmox-iso.windows: Error creating VM: error creating VM: 403 Permission check failed (/sdn/zones/localnetwork/vmbr3/10, SDN.Use), error status: {"data":null} (params: map[agent:1 args: boot: cores:2 cpu:kvm64 description:Packer ephemeral build VM hotplug: ide2:local:iso/windows_server2019_x64FREE_en-us.iso,media=cdrom kvm:true machine: memory:4096 name:WinServer2019x64-cloudinit-qcow2 net0:virtio=D2:76:45:F9:A4:90,bridge=vmbr3,tag=10 numa:false onboot:false ostype:win10 pool:GOAD sata0:local-lvm:40,format=qcow2,discard=ignore scsihw:lsi sockets:1 startup: tags: vmid:102])

==> Builds finished but no artifacts were created.
Mayfly277 commented 7 months ago

" Error creating VM: error creating VM: 403 Permission check failed" Are you sure the user you configure for packer got enough permission ?

christomitov commented 7 months ago

I got the same issue. revisited the Packer role permissions over and over

EDIT: figured it out. As the error says, needs SDN.Use added to the role, can do it in GUI or add it the command that creates the Packer role.

Mayfly277 commented 3 months ago

i will update the blog post thank you

YugoCode commented 1 month ago

@Mayfly277 The command you updated unfortunately is not working I get:

privs: invalid format - invalid privilege 'SDN.Use'

Bildschirmfoto 2024-05-14 um 09 53 53

In the GUI I only see SDN.Allocate and SDN.Use: Bildschirmfoto 2024-05-14 um 10 05 40

How can this be? I'm running 7.1-10. Maybe that role was added in a later version?