Custom Search

Saturday, January 9, 2016

How to Install vagrant-scp plugin and copy file from Vagrant VM to Host Machine

1)
Install vagrant-scp plugin
a)
$vagrant plugin install vagrant-scp

b)
$vagrant scp [local_path] [vm_name]:[remote_path]
$vagrant scp [vm_name]:[remote_path] [local_path]

OR

2)
a)
How to copy file from Host Machine to Vagrant VM
$scp -i /root/puppet-vpc/.vagrant/machines/vpc-ctrl1/virtualbox/private_key -P 2201 myfile.txt vagrant@127.0.0.1:~

b)
How to copy file from Vagrant VM to Host Machine

$scp -i /root/puppet-vpc/.vagrant/machines/vpc-ctrl1/virtualbox/private_key -P 2201 vagrant@127.0.0.1:~/myfile.txt .

No comments:

Post a Comment