about web gui reset and reboot

haiwan

Active Member
Apr 23, 2019
234
1
38
36
Hi, we found no same version no function.
eg1 : in promox ve5.4 no support reboot .support reset
1594197589351.png
eg2 : in promox ve6.1 support reboot and reset
1594197580273.png
trouble is on ve5.4 we use api send reboot no supprt . i no understand reboot and reset is same function or no same?
issues: becvause we use cloud-init. if we use cloudt-init change vm passwd need restart active . we use api running this, wish one-time . so if still use 5.4 have wish support reboot? tks
 
  • Reset is like pressing the physical "reset" button on a computer, or alternatively, yanking the power cord and then booting it back up
  • Reboot sends an ACPI shutdown signal to the VM (comparable to short-pressing the power button on a physical machine), and when it detects that it has been shutdown, it automatically starts it again
You can emulate "reboot" behaviour by sending a "poweroff" followed by a "start" with a delay (or by checking the VM status until it's no longer running).
 
  • Reset is like pressing the physical "reset" button on a computer, or alternatively, yanking the power cord and then booting it back up
  • Reboot sends an ACPI shutdown signal to the VM (comparable to short-pressing the power button on a physical machine), and when it detects that it has been shutdown, it automatically starts it again
You can emulate "reboot" behaviour by sending a "poweroff" followed by a "start" with a delay (or by checking the VM status until it's no longer running).
but we use api running php . we send together shutdown and start , just receview before task. behind task is loss. so ve 5.4 have wish support reboot? because cloud-init need this function.
tks
 
  • Reset is like pressing the physical "reset" button on a computer, or alternatively, yanking the power cord and then booting it back up
  • Reboot sends an ACPI shutdown signal to the VM (comparable to short-pressing the power button on a physical machine), and when it detects that it has been shutdown, it automatically starts it again
You can emulate "reboot" behaviour by sending a "poweroff" followed by a "start" with a delay (or by checking the VM status until it's no longer running).
eg: sending a "poweroff" followed by a "start" with a delay we use php api running this just task poweroff is successful. no get start task
 
The start task will only be successful when the poweroff task has already finished. Check using the status API if it is done.

And not, we will not backport features to 5.4. If you need the feature, update your node.
 
The start task will only be successful when the poweroff task has already finished. Check using the status API if it is done.

And not, we will not backport features to 5.4. If you need the feature, update your node.
hi Stefan_R tks.
so have wish give me a running code
sending a "poweroff" followed by a "start" with a delay (or by checking the VM status until it's no longer running)
how to write delay ?
 
Usually the 'poweroff' API only returns a value once the guest shutdown is complete anyway. If you really want to make sure, you can get the status and spin wait on that before starting again.

Something like this (written with 'pvesh', but you can just translate the API calls to your PHP interface):

Code:
#!/bin/bash
export VMID=100
export NODE=localhost

pvesh create /nodes/$NODE/qemu/$VMID/status/shutdown # POST

while [ $(pvesh get /nodes/$NODE/qemu/$VMID/status/current \
    --output-format json | jq '.status') != '"stopped"' ]; do
    sleep 1
done

pvesh create /nodes/$NODE/qemu/$VMID/status/start # POST
 
  • Like
Reactions: Moayad
Usually the 'poweroff' API only returns a value once the guest shutdown is complete anyway. If you really want to make sure, you can get the status and spin wait on that before starting again.

Something like this (written with 'pvesh', but you can just translate the API calls to your PHP interface):

Code:
#!/bin/bash
export VMID=100
export NODE=localhost

pvesh create /nodes/$NODE/qemu/$VMID/status/shutdown # POST

while [ $(pvesh get /nodes/$NODE/qemu/$VMID/status/current \
    --output-format json | jq '.status') != '"stopped"' ]; do
    sleep 1
done

pvesh create /nodes/$NODE/qemu/$VMID/status/start # POST
great. tks
 

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!