hashicorp / packer-plugin-proxmox

Packer plugin for Proxmox Builder
https://www.packer.io/docs/builders/proxmox
Mozilla Public License 2.0
143 stars 65 forks source link

Use tablet for pointer #88

Open walmins opened 2 years ago

walmins commented 2 years ago

Hello to all, Someone knows how to enable the Use tablet as pointer option during VM creation? image

mabeett commented 2 years ago

Hello, This option is not settable. I base this answer in the information I see in the documentation and the source code in this repository. On the other hand, I see this plugin uses Telmate/proxmox-api-go module which (I understand) supports the /api2/json/nodes/{node}/qemu/{vmid}/config API call which sets the pointer as you asks. You (or anyone) can do a PR with a change feature proposal.

walmins commented 2 years ago

So, I try to use this hack

  provisioner "shell-local" {
    only = ["proxmox-clone.template_clone"]
    inline = [
      "curl -k --silent --location --request POST ${var.proxmox_url}/nodes/${var.proxmox_node_name}/qemu/VM_ID/config --header 'Authorization: Bearer PVEAPIToken=${var.proxmox_username}=${var.proxmox_token}' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'tablet=1'"
    ]
  }

But the problem is then I don't know how to get the ID of current machine, someone knows how I can get this information?

Thanks, people

mabeett commented 2 years ago

On Thu, 9 Jun 2022, 01:38 walmins, @.***> wrote:

So, I try to use this hack

provisioner "shell-local" { only = ["proxmox-clone.template_clone"] inline = [ "curl -k --silent --location --request POST ${var.proxmox_url}/nodes/${var.proxmox_node_name}/qemu/VM_ID/config --header 'Authorization: Bearer PVEAPIToken=${var.proxmox_username}=${var.proxmox_token}' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'tablet=1'" ] }

But the problem is then I don't know how to get the ID of current machine, someone knows how I can get this information?

You may setup a specific vmid via variables an use the variable which stores the VM id

See the optional options in the documentation

https://www.packer.io/plugins/builders/proxmox/clone

Thanks, people

— Reply to this email directly, view it on GitHub https://github.com/hashicorp/packer-plugin-proxmox/issues/88#issuecomment-1150517918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLYEVCYUYPAUBNZ3IVFI3VOEVH3ANCNFSM5W555I7Q . You are receiving this because you commented.Message ID: @.***>

walmins commented 2 years ago

Yes, of course but the idea it's to use a dynamic Vm ID because we can start multiple packer process us via gitlab-runner for example. Do you know, people, if it's to possible to get vm ID from current processus?

Thanks

guy-BW commented 2 years ago

This seems to be a recent change.. We've been using this for months and tablet was not being set, which gave the default of 1.

Now when I do debug I can see that packer is posting tablet=1.

2022/07/01 07:13:15 packer-builder-proxmox-iso plugin: agent=1&cores=2&cpu=kvm64&description=Packer+ephemeral+build+VM&ide2=LabImages%3Aiso%2Fen_windows_10_multiple_editions_version_1607_updated_jan_2017_x64_dvd_9714399.iso%2Cmedia%3Dcdrom&kvm=1&memory=4096&name=No-agent-build-20220701&net0=virtio%3D2E%3A70%3AAE%3A22%3A3F%3AF3%2Cbridge%3Dvmbr0%2Cfirewall%3Dfalse&numa=0&onboot=0&ostype=win10&pool=vm_dev&scsihw=lsi&sockets=1&tablet=0&vga=type%3Dstd%2Cmemory%3D32&virtio0=LabImages%3A50%2Ciothread%3Dfalse&vmid=150

guy-BW commented 2 years ago

I can confirm this is a change in packer..

In version 1.8.0, on Proxmox tablet is defaulted to 1, it's not being set by packer.

from version 1.8.1-1 I can see that packer is sending tablet=0

ts-sz commented 1 year ago

hello, I tested today and already have tablet=0 packer version: 1.8.4 proxmox version: 7.3-3

ts-sz commented 1 year ago

hello, Someone have any update about pointer? Thanks, guys