Auto Shutdown

eizo114

New Member
Jun 15, 2022
8
0
1
Hello everyone, I apologize immediately for creating this post, but I am a windows systems engineer, and I have been using proxmox for a short time, I do not know linux and I do not know in any way how to move, after these premises I propose my question, someone can you explain me step by step how to shut down my proxmox node? I have no problem having the virtual machines shut down before the node shuts down, but I just need to figure out how to set prox mox to shut down by itself every day at a certain time, anyone who will be kind enough to help me will be welcome.
Thanks in advance
 
hi,
propose my question, someone can you explain me step by step how to shut down my proxmox node? I have no problem having the virtual machines shut down before the node shuts down, but I just need to figure out how to set prox mox to shut down by itself every day at a certain time,
to shutdown your node, just run the poweroff command as root user over an SSH connection.

in order to make it scheduled, you can create a cron job like this inside /etc/cron.d/poweroff:
Code:
00 18 * * * root poweroff

the example above would poweroff your node every day at 18:00

hope this helps!
 
I tried to follow the explanation and I used putty but something is wrong.
I apologize again but what may seem simple and automatic to a Linux user is not to me. I need to know step by step what to do. I don't expect anyone to have patience, but if someone understands my difficulty and wants to help me, I'm here. Thank you
 

Attachments

  • 2022-06-15 13_52_34-Window.png
    2022-06-15 13_52_34-Window.png
    19.2 KB · Views: 136
you need to create a file /etc/cron.d/poweroff with the contents inside the code block on my previous post.

in your screenshot i see "00 24" so i assume you'd like to run it at midnight, though it should be instead 00 00 * * * in that case :)

you could also execute this command to put the file in there:
Code:
echo "00 00 * * * root poweroff" > /etc/cron.d/poweroff

afterwards you can check it with cat /etc/cron.d/poweroff to see if the file is really there.
 
Thanks for the help, the question is how do I create the /etc/cron.d/poweroff file? and where do I place it? For your question, yes I would like it to go off at 12:00 pm, I understand that for you it is all automatic and any information should be understood immediately but I have never used these tools.
Thanks again
 
how do I create the /etc/cron.d/poweroff file?
execute the command in my previous post (that starts with echo), that will create the file for you at the right location with the contents.

the "cat" command will show you the contents of the file
 
Last edited:
I did it, but was alredy working with other command.
But now I have an other problem, when server started up automatically the WM started too, now the server wake up at the time I setted on bios but ProxMox doesn't start WM automatically.
I didn't change anything, so what could happend?
I wait for next reboot maybe this new command line that u wrote doesn't make this issue.
Thank you a lot.


2022-06-27 18_50_40-Window.png
 
now the server wake up at the time I setted on bios but ProxMox doesn't start WM automatically.
to start the VM automatically at boot you have to enable the "Start on boot" option for your VM.
for example if your VM is 300, then you do qm set 300 -onboot=1
 
to start the VM automatically at boot you have to enable the "Start on boot" option for your VM.
for example if your VM is 300, then you do qm set 300 -onboot=1
As I wrote that setting was alredy setted from the First Time.... The wm alredy wake up when the server started, but now that i used the First command line u wrote the server go up but doesn t start the wm.. so the question Is l... what could happend After use that command. By the way now i Will check if your new command line suggestion solved the problem. Thank u for anything
 
Now everything seems to be working correctly, I only have two questions to ask. The first is how I do if I want to temporarily disable the automatic shutdown, and the second is that I am experiencing an oddity, in fact the time zone is correctly set on Proxmox but at each start it moves the time by two hours on the bios, even if on the bios system manually, the next day I find it two hours forward. I noticed that the time zone is set fine on ProxMox but on the task events it shows me with a difference of two hours, what could it be?
Thank you so much
 
The first is how I do if I want to temporarily disable the automatic shutdown
you can unset it before the next boot, e.g. qm set 300 -onboot=0

and the second is that I am experiencing an oddity, in fact the time zone is correctly set on Proxmox but at each start it moves the time by two hours on the bios, even if on the bios system manually, the next day I find it two hours forward. I noticed that the time zone is set fine on ProxMox but on the task events it shows me with a difference of two hours, what could it be?
* did you check your BIOS time?
* did you take a look at here? [0]

[0]: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_time_synchronization
 
Thanks as always for your help, currently the timetable problem seems to be solved.
I have another question, I was thinking that if the SSD where ProxMox is installed should fail, I would lose all configurations and virtual machines, could you tell me how I can show ProxMox my NAS so that it can make a total backup of the configuration so that if one day the SSD should fail I would have a way to recover everything easily instead of installing the system again and then having to create the VMs? Thank you
 
I have another question, I was thinking that if the SSD where ProxMox is installed should fail, I would lose all configurations and virtual machines, could you tell me how I can show ProxMox my NAS so that it can make a total backup of the configuration so that if one day the SSD should fail I would have a way to recover everything easily instead of installing the system again and then having to create the VMs? Thank you
you can add your NAS as a storage unit for your PVE server. go to Datacenter -> Storage -> Addand click the type of storage (for example NFS, or CIFS for SMB share).
 

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!