I'm wonder if it's possible to revert virtual-box snaps from website using an script? I Am trying to use, but I cant find a useful answer or trick to do this dinamycally

$machine = system('code to revert machine')

The virtualbox syntax is:

VBoxManage snapshot <virtual-machine-name> restore <snapshot-name>

You should have of course sufficient authorization, and exposing that to a website requires some careful thoughts, probably more than just calling `system ("vboxmanage ... ") from a cgi. But it is possible.

  • what do you mean by more than a ``` system() ``` ? I Have my own server running with esxi , but I want to expose them to internet , but people be able to revert them without asking me... – user993191 Feb 2 at 21:12
  • Just two examples: 1) Your webserver runs for security reason under a userID that is not very powerful on the system (for exampleapache). The cgi-scripts also run under that userID. Are you seriously enabling that userID to mess with your virtual machine configuration? 2) Be very sure you sanitize your input. For example: you do not want someone to restore the machine abc'); rm-rf /var #. – Ljm Dullaart Feb 2 at 22:04
  • of course I know it , I will valid properly , but do I need to change to 755 perm right? – user993191 Feb 2 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy