Reputation: 1128
How can one copy files from guest to host in Vagrant environment?
I know there are synced_folders but this doesn't work with darwin guest. I need to copy build result from guest to host, ideally using vagrant provisioning scripts as all my other stuff happens there.
VM is VirtualBox.
Upvotes: 0
Views: 434
Reputation: 672
From your host use this command -
scp -P <vagrant guest ssh port number> vagrant@localhost:/path/to/source/file /path/to/destination/file
The "vagrant guest ssh port number" is the forwarded port from host to guest for ssh, and you can find this from the output of your vagrant up command.
Upvotes: 1