GithubHelp home page GithubHelp logo

Comments (8)

h6w avatar h6w commented on July 19, 2024

Alan Latteri - 2014-02-24
Yes this is a good step, but upon system shutdown, it just kills the VM. There is no clean shutdown as with VBoxTool.

from phpvirtualbox.

h6w avatar h6w commented on July 19, 2024

Alejandro Vargas - 2014-02-24
Well... it is a virtual box problem, not phpvirtualbox. I think it should not be difficult to pause or shutdown all active virtual machines when stopping a server.
But I think the autostart function is more important than the shutdown one because in servers, shutdowns are very rare. The most common scenario is a power fail, in which case it will not be shutdown sequence. But upon power up it is important to auto start the virtual machines otherwise the administrator will need to do it manually.

from phpvirtualbox.

h6w avatar h6w commented on July 19, 2024

Wilco Jansen - 2014-08-01
You can set the way a VM needs to be terminated. You can for example set the following option to the following:
VBoxManage modifyvm "MyVM" --autostart-enabled on
VBoxManage modifyvm "MyVM" --autostop-type savestate
This ensured the VM is autostarted, and when the machine (or the hypervisor) is shut down, the state of the VM is saved (more options available, but this is what you probably have been looking to).
Regardless of that, I would welcome the addition to phpVirtualbox being able to set/unset all these options that now require a command line solution (and seem to be hidden deep away from the admin). Might be time that Oracle also updates the client program used to manage VM's ;-)

from phpvirtualbox.

h6w avatar h6w commented on July 19, 2024

VVD - 2016-01-11
For FreeBSD I wrote start/stop script /usr/local/etc/rc.d/vboxinit.
It starts VMs on a system startup with a user defined extra attribute pvbx/startupMode = auto (phpvirtualbox use it too) and savestate (by default) all running VMs on system shutdown.
On my servers with 48Gb RAM savestate and start from savestate for all VMs can be more than 5 minutes. My sollution is:

  1. echo 'kern.init_shutdown_timeout=610' >> /etc/sysctl.conf
  2. echo 'rcshutdown_timeout="600"' >> /etc/rc.conf
  3. start it only after sshd was started to allow login on server during start process.
    Work in production for more than 2 years (with small changes).

from phpvirtualbox.

shellster avatar shellster commented on July 19, 2024

Would also like to see this feature. It is the one thing I cannot configure on a VM via phpvirtualbox that I regularly use. As mentioned by h6w, I can configure it through the command line, but it would be great to do it in the phpvirtualbox ui.

from phpvirtualbox.

trasherdk avatar trasherdk commented on July 19, 2024

If you installed the vboxinit script /etc/init.d/
your configured guests should start/stop with the host.

The script is looking VBoxManage getextradata $UUID 'pvbx/startupMode' for pvbx/startupMode = auto

VBoxManage --help setextradata will tell you how to set that key.

from phpvirtualbox.

shellster avatar shellster commented on July 19, 2024

@trasherdk I'm aware of how to configure VM's to autostart from the command line. I'm doing precisely that right now.
I feel like this feature really need to be in phpVirtualbox, because this is the only "normal" thing that I have to still do from the commandline. Wanting VM's to automatically restart on boot is a very common task, and it is unfortunate that such an otherwise feature-complete solution as phpVirtualBox is, can't accomplish this.

from phpvirtualbox.

trasherdk avatar trasherdk commented on July 19, 2024

Someone started doing this:

endpoints/lib/vboxconnector.php ~Line 1450 - 1871 - 3602
js/datamediator.js ~Line 423

An icon next to the guest name indicating autostart status and a autostart sequence to be able to start guests in the correct order. Eg. DNS and DB servers before services that rely on those services 😃

from phpvirtualbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.