Booting a vm from php

22 views
Skip to first unread message

Francisco Munguengue

unread,
Nov 3, 2015, 5:29:18 AM11/3/15
to Vagrant

I’m so begginner in the vagrant tool,,but i did somethings with vagrant and the next step should be booting up a virtual machine with php. I normally booting up the vms from command line with vagrant up, now, i want to know that is possible do it from php and how can i do it, because i already try this: <?php exec('vagrant up');?> but, i don’t get some answer.

Alvaro Miranda Aguilera

unread,
Nov 4, 2015, 12:12:53 AM11/4/15
to vagra...@googlegroups.com
Hello,

Try to create a wrapper script.

ie:

run.sh

#!/bin/bash
pushd <path>
vagrant status


Vagrant need to be executed where the Vagrantfile is, so a cd/pushd is required.

Alvaro.
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/e884ff3c-cbc3-4f3a-a495-3e83228b076f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages