Hi !
I try to use DRBD 8.4 with Proxmox 4.3. DRBD 8.4 lacks the Auto-Promote feature, so someone needs to do the primary setting. I don't want to use the primary-primary mode on my disks to be more secure.
I thought to use a script prior to starting a VM and after stopping it, which checks some things and does this primary setting automatically and can stop the start process with a return value. For this to work I need a hook in Proxmox prior to start the VM (and also when stopping).
Is there any possibility for executing Hook Scripts implemented in Proxmox?
I searched already, but I couldn't find something useful.
AFAIK it is /usr/sbin/qm (and the Perl classes behind) which does all the VM handling. If it is not implemented, is "PVE::CLI::qm" the point to start implementing this?
Is this something which would be useful to have and eventually accepted for the code base?
I noticed also, that my disks on the LVM storage are act/deactivated. It seems this is a function of the storage plugin. So it would be a possibility to write either a slightly modified LVM Plugin (DRBD8Plugin), or to implement this on a higher level inside the Proxmox code.
I also noticed, that my volume didn't get deactivated, when I stopped the VM by issuing a "poweroff" command inside the VM. Is this a bug or isn't it simply not possible to detect such a situation?
I try to use DRBD 8.4 with Proxmox 4.3. DRBD 8.4 lacks the Auto-Promote feature, so someone needs to do the primary setting. I don't want to use the primary-primary mode on my disks to be more secure.
I thought to use a script prior to starting a VM and after stopping it, which checks some things and does this primary setting automatically and can stop the start process with a return value. For this to work I need a hook in Proxmox prior to start the VM (and also when stopping).
Is there any possibility for executing Hook Scripts implemented in Proxmox?
I searched already, but I couldn't find something useful.
AFAIK it is /usr/sbin/qm (and the Perl classes behind) which does all the VM handling. If it is not implemented, is "PVE::CLI::qm" the point to start implementing this?
Is this something which would be useful to have and eventually accepted for the code base?
I noticed also, that my disks on the LVM storage are act/deactivated. It seems this is a function of the storage plugin. So it would be a possibility to write either a slightly modified LVM Plugin (DRBD8Plugin), or to implement this on a higher level inside the Proxmox code.
I also noticed, that my volume didn't get deactivated, when I stopped the VM by issuing a "poweroff" command inside the VM. Is this a bug or isn't it simply not possible to detect such a situation?