Open anitsh opened 2 years ago
Another way to set up a temporary terminal, besides opening up the VirtualBox settings, is to use vagrant ssh, with additional arguments given after the --:
vagrant ssh -- -L 3000:localhost:3000
This will forward port 3000 on the host to port 3000 on the guest.
The first number is for the host. To forward port 7001 on the host to the default postgresql port on the guest:
vagrant ssh -- -L 7001:localhost:5432
This will only last as long as your ssh session. If ssh gets disconnected, run it again. To make it persist after restarts, add it to your Vagrantfile.
Must specified id: "ssh"
in order to override the default forwarded SSH port.
config.vm.network :forwarded_port, guest: 22, host: 2322, id: "ssh"
Creating a VM
Starting a VM
Getting into a VM
Stopping a VM
Cleaning Up a VM
Boxes
Saving Progress
-vagrant snapshot save [options] [vm-name] -- vm-name is often default. Allows us to save so that we can rollback at a later time
Tips
Plugins