[SOLVED] Was kann man mit Storageinhalt "snippets" genau anfangen?

fireon

Distinguished Member
Oct 25, 2010
4,502
475
153
Austria/Graz
deepdoc.at
Hallo Leute,

sah heute zufällig keinen neuen Storageinhaltstyp names "snippets". Was kann ich mit dem genau anfangen? In der Doku steht zwar:
snippets

Snippet files, for example guest hook scripts
Ok ich speichere solche Scripte dort ab... und dann weiter...?
 
container und vms haben einen neuen config eintrag 'hookscript'
nähere details siehe in der man page von qm/pct (man qm; man pct)
und im beispiel hookscript unter /usr/share/pve-docs/examples/guest-example-hookscript.pl
 
container und vms haben einen neuen config eintrag 'hookscript'
nähere details siehe in der man page von qm/pct (man qm; man pct)
und im beispiel hookscript unter /usr/share/pve-docs/examples/guest-example-hookscript.pl
3 # Exmple hook script for PVE guests (hookscript config option)
4 # You can set this via pct/qm with
5 # pct set <vmid> -hookscript <volume-id>
6 # qm set <vmid> -hookscript <volume-id>
7 # where <volume-id> has to be an executable file in the snippets folder
8 # of any storage with directories e.g.:
9 # qm set 100 -hookscript local:snippets/hookscript.pl
Does that mean I am forced to store my snippets in a storage with content type snippets or can I point qm/pct to any path as long as it is a executable script? For backup reasons I would prefer to store my snippets somewhere else on the root filesystem like I already do it with my VZDump hook script.
 
Does that mean I am forced to store my snippets in a storage with content type snippets or can I point qm/pct to any path as long as it is a executable script? For backup reasons I would prefer to store my snippets somewhere else on the root filesystem like I already do it with my VZDump hook script.
it must be on a storage with the snippets content type

but you can simply add a new storage on the directory you like and give it only the snippets content type?
 
  • Like
Reactions: Dunuin
it must be on a storage with the snippets content type

but you can simply add a new storage on the directory you like and give it only the snippets content type?
Ok, thank you.

Then I will have create a new directory storage just for snippets pointing to my script folder of choice on the root filesystem.
 

About

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!