On Wed, Jun 5, 2019 at 9:57 AM Yonatan Alon <[email protected]>
wrote:

> Hello :)
>
> I am new to Vagrant, and have read the basic tutorials.
> As far as I understand, if you install Vagrant on a given computer,
> and also install a virtualization provider on the same computer,
> then Vagrant can launch virtual machines inside the installed
> virtualization provider.
>
> My question is: Is it possible to launch virtual machines inside a
> virtualization provider,
> while Vagrant itself is installed on a virtual machine inside the very
> same virtualization provider?
>

Yes! This is possible.

If you're using VMWare with the vagrant vmware plugin, you simply just need
to add this provider
setting to your Vagrantfile:

guest.vm.provider :vmware_desktop do |v|
      v.vmx['vhv.enable'] = 'TRUE'
      v.vmx['vhv.allow'] = 'TRUE'
end

Supposedly as of VirtualBox 6.0 you can do this too, but I've read some
where that it is only supported
on AMD architectures. I think in theory this should work, but I don't have
the right hardware to test it:

guest.vm.provider :virtualbox do |v|
      v.customize ["modifyvm", :id, "--nested-hw-virt", "on"]
end

I'm not sure if you need anything special for Hyper-V...

If anyone is curious I have a Vagrant guest that does exactly this. It has
some scripts that installs VirtualBox 6 and
Vagrant 2.2.4:
https://github.com/briancain/congenial-octo-palm-tree/blob/c9a46f47fb4630abeea1f167d50d158ff90d2099/Vagrantfile#L54-L87
<https://github.com/briancain/congenial-octo-palm-tree/blob/master/Vagrantfile#L54-L87>


>
> In other words - let's say I have a VMware Hypervisor,
> and I create a Linux VM inside my Hypervisor, then install Vagrant on my
> Linux VM,
> can I create a new vm on my hypervisor, using my Vagrant installation?
>
> Thanks in advance
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/a8f95a67-5c49-4f9f-9a25-9f992d50c175%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/a8f95a67-5c49-4f9f-9a25-9f992d50c175%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Brian Cain

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CADHESCXgZG%2B1FafrkogTu2YcnGPoBiFG%2B8tUejzEKZNkbfzj7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to