Shutdown proxmox on VM shutdown?

Discussion in 'Proxmox VE: Installation and configuration' started by rumble06, Jul 12, 2019.

  1. rumble06

    rumble06 New Member

    Joined:
    Jul 12, 2019
    Messages:
    11
    Likes Received:
    0
    I'm new using proxmox, this is the first day I tried it, successfully managed to passthrough the single GPU present in the PC, waiting for an pcie extender to come from aliexpress because there is no physical space to install the second GPU because of the first.

    My main usage for Proxmox is having one main Windows VM, where I do my work and then a second VM that I will fire up whenever I want to play something with one of my friends (like a lan party) or whenever I have some work to do that needs virtual machines or running software on linux. I do tend to use VMs when I do my work on the PC, so this will make my life easier. Proxmox works pretty good for me, my VM starts with proxmox, however there is one thing I want to achieve and currently I'm not sure how (I'm thinking of making a bash script or something to shutdown the VM that will also send a shutdown signal to the proxmox API, if there is something like a shutdown signal for the api) however I would like to find better solutions than a bash script to shutdown the computer. It would be nice if the result will be like just pressing the windows shutdown button on the VM and it will also shutdown the host (proxmox), this will make my life easier whenever someone else uses my PC and they do not have the knowledge of running a bash script to shut down it.
     
  2. dcsapak

    dcsapak Proxmox Staff Member
    Staff Member

    Joined:
    Feb 1, 2016
    Messages:
    3,617
    Likes Received:
    328
    you can use hookscripts (see man qm for details) where you shutdown the host after the vm was powered down
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    rumble06 likes this.
  3. rumble06

    rumble06 New Member

    Joined:
    Jul 12, 2019
    Messages:
    11
    Likes Received:
    0
    Thanks, will look into it and I'll try to make a hookscript for my usecase (shutdown host on vm shutdown) and come back with the script for the people that need the same thing as me.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice