How to connect to a remote VM using vagrant?

5,370

Solution 1

So essentially you are trying to access/manage a VirtualBox VM on a remote host with Vagrant? Nope, that's not possible currently with the existing Vagrant-VirtualBox provider :( Though there are solutions for other platforms like EC2 https://github.com/mitchellh/vagrant-aws/ that accomplish roughly the same...

Solution 2

In your vagrant file, use a bridged network type then you can access it from another machine. This line for example:

config.vm.network :public_network

Share:
5,370

Related videos on Youtube

Znatz
Author by

Znatz

Updated on September 18, 2022

Comments

  • Znatz
    Znatz over 1 year

    I have two Windows 7 machines in my local network.

    One Windows 7 with Virtual Box (running Ubuntu) installed.

    Is it possible to connect to the Ubuntu from another machine by using vagrant ?

  • Znatz
    Znatz about 11 years
    Yes, that's what I want. Thank you. Is it possible to connect to it through ssh ?
  • cmur2
    cmur2 about 11 years
    Where do you want to connect to via ssh?
  • Znatz
    Znatz about 11 years
    Sorry for my English. I have 2 PCs (A and B) in local network. A has Virtual Box installed. The guest system is Ubuntu. What I want is to connect Ubuntu via ssh from B. I finally figure out how to do it now. By setting the virtual machine network type to bridged, make Ubuntu visible in the local network. I am able to ssh it from B now. Thanks a lot !