1. O

    [TUTORIAL] lxc config common hook script for start-host,do not work

    proxmox version 7.4.1 execute command: echo "lxc.hook.start-host = /usr/share/lxc/hooks/test" >/usr/share/lxc/config/common.conf.d/03-test.conf under /usr/share/lxc/hooks/ touch test test file content below : #!/bin/bash vmid=$1 output=$(lxc-info -n "$vmid" -iH ) echo "$output " echo "...
  2. H

    custom pre/post-scripts/hooks for ACME renewals (not plugins, but firewall etc. related)

    I'm in need of executing a script to allow traffic through firewall and open port 80 inbound to the PVE (and next PBS), and then once done, close the ports etc. Is there a current way to do it in PVE 7.x ?
  3. N

    [SOLVED] Issue with post-stop phase in hookscripts on Debian Bookworm / Proxmox 8

    Hello, I've installed Proxmox 8 on a new Host in Debian bookworm (6.2.16-3-pve) and i noticed that the phase "post-stop" in my hookscript is not executed. It seems that the "post-stop" argument is not passed, i tried with a simple bash script and all the phases are ran but the post-stop one. Am...
  4. G

    socat for serial connection between 2 VM's

    Hello I have a setup where we need to connect serial ports of 2 VM's with each other. I have found a solution to add serial sockets to the 2 VM's and connect them via socat: socat UNIX-CLIENT:/var/run/qemu-server/100.serial0 UNIX-CLIENT:/var/run/qemu-server/101.serial1 This has to be active...
  5. D

    [SOLVED] Execute host command after starting guest.

    ref: https://forum.proxmox.com/threads/how-to-pass-vlan-0-priority-tags-to-pfsense-for-dhcp.112374/ I need to set a bridge flag to pass certain traffic to the vm. The problem is the bridge does not exist until *after* the vm is started. echo 8 > /sys/class/net/fwbr105i1/bridge/group_fwd_mask...
  6. K

    [SOLVED] Determine if backup is run interactively vs scheduled

    Within a vzdump hook script, how can I differentiate scheduled backups from those run interactively via the web UI? There doesn't appear to be anything in env I might use to do this.
  7. V

    Snippets hookscript can not change CT net config

    Hi all, I have a two node cluster PVE 7.3-4 on different data centers with different public networks. LXC container running on node1 and replicated to node2. I need to change container's network settings (MAC addres, ip-addres and gw) when it migrated on node2 and change it back when it...
  8. T

    Hook behaviour during VM migration

    Hi, I've been looking into using Hooks in my setup to announce the VM IP addresses via BGP but unfortunately, the documentation is lacking of important information such as the behaviour during a migration. I added my hook script to one VM, started a migration and noticed that the hook already...
  9. S

    Can't exec proxmox-usb-hotplug in a vm hookscript

    Hi. After having issues with usb passthough to a VM a was searching forums for a solution and ended up with proxmox-usb-hotplug. I followed the installation and now I'm able to manually run it from proxmox shell with proxmox-usb-hotplug --vmid $vmid -c /etc/usb-hotplug.conf -p $pwd Next I...
  10. S

    proxmox cluster live migration hooks and xxx.conf files

    Hi, I use exec-cmds pre-start to mount virtio from an nfs share. I am finding that when I do a live migration the 106.conf does not exist on the node at the point that I need it ? 19:53:08 Action phase: pre-start /mnt/pve/NFSShare/snippets/exec-cmds: line 46: /etc/pve/qemu-server/106.conf: No...
  11. A

    [SOLVED] Running commands on guest using hookscript fails (Error msg: QEMU guest agent is not running)

    I'm having trouble using the hookscript to run commands on the guest. The error I'm getting is QEMU guest agent is not running. However, I know this is wrong, since I can run the same commands after the VM is booted just fine. I thought it might be a problem with the QEMU agent needing extra...
  12. N

    [SOLVED] Proxmox PCI Passthrough

    Hello, i have some Problems with my PCI Passthrough... Im passing a Thunderboltcard through and sometimes when i disconnect a thunderbolt device and than start the VM my HOST wont respond over Network, i think its because after disconnecting a Thunderbolt device it also disappears form the...
  13. B

    vm rollback in hookscript

    Hello, I want to auto rollback when vm is stop. the same as PXE. use hookscript: my $cmd ="qm rollback $vmid snapshot"; ...... ....... elsif($phase eq 'post-stop') { print "$vmid stopped. Doing cleanup.\n"; system($cmd); Both tasks will lock the vm at the same time,and post error GUEST...
  14. P

    [SOLVED] hookscripts on container to gracefully start/stop docker images inside containers

    I try to execute hookscript. I successfully added hookscript from documentation /usr/share/pve-docs/examples/guest-example-hookscript.pl and I see it's beeng executed in gui taks log: GUEST HOOK: 112 pre-start 112 is starting, doing preparations. GUEST HOOK: 112 post-start 112 started...
  15. S

    API Question.

    I am running pve-manager/6.2-10 and have a VM running an old Natware 3.12 server system. The contents of the VM do not respond to shutdown commands. The only way to stop the VM is to enter the console and manually 'down' the server, exit to DOS then issue a 'stop'. I have written a hookscript...
  16. E

    vzdump hookscript error 'INFO: find: -exec: no terminating ";" or "+" and find: missing argument to -exec''

    Good day all, I might be doing something wrong that's very simple, I get the following error in the log file: find: missing argument to -exec or INFO: find: -exec: no terminating ";" or "+" These errors I get on proxmox 5.4 and newer, but on the proxmox 4.xx version the hookscript does what...
  17. E

    how to add qm unlock <vmid> to hookscript

    Afternoon all, Has anyone added qm unlock <vmid> to a hookscript? The vm gets locked, and most of the times I manually have to unlock vm in order to start it again, or any suggestions. Thank you


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!