Discussion:
[vagrant-up] unable to copy files to vagrant ubuntu
a***@gmail.com
2018-11-24 16:51:39 UTC
Permalink
Hi All,

I have installed vagrant on windows 7 and downloaded repo from
https://github.com/bitfield/puppet-beginners-guide-3.git (extracted and
saved in C:\drive)to learn puppet.

As per john Arundel's - puppet 5 beginner's guide (page 32), i am trying to
run the following command *cp /examples/files/run-puppet.sh files/* from
ubuntu virtual machine to copy run-puppet script from examples/ directory

i get following error cp: cannot stat '/examples/files/run-puppet.sh': No
such file or directory.

I am not able to understand why...could some one please help.


Thanks in advance
Regards,
Alex
--
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/3309582b-3dd1-4494-a8e6-c357f3ce052e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-11-24 22:42:52 UTC
Permalink
the path seems correct

make sure you are in the vm

whats the output of

df -Ph
ls -al /examples/files

?
Post by a***@gmail.com
Hi All,
I have installed vagrant on windows 7 and downloaded repo from
https://github.com/bitfield/puppet-beginners-guide-3.git (extracted and
saved in C:\drive)to learn puppet.
As per john Arundel's - puppet 5 beginner's guide (page 32), i am trying
to run the following command *cp /examples/files/run-puppet.sh files/*
from ubuntu virtual machine to copy run-puppet script from examples/
directory
i get following error cp: cannot stat '/examples/files/run-puppet.sh': No
such file or directory.
I am not able to understand why...could some one please help.
Thanks in advance
Regards,
Alex
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/3309582b-3dd1-4494-a8e6-c357f3ce052e%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/3309582b-3dd1-4494-a8e6-c357f3ce052e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exuHofYXrBChLNeEJ3hNr%2BdY4XUSt0u4z5AsCbhP2FLLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alex R
2018-11-27 05:22:48 UTC
Permalink
Hi Alvaro,
thanks for resp
this is the result of df -Ph

[image: image.png]

And when i try ls -al /examples/files i get ls: cannot access
'/examples/files': No such file or directory

Thanks and Regards,
Alex
Post by Alvaro Miranda Aguilera
the path seems correct
make sure you are in the vm
whats the output of
df -Ph
ls -al /examples/files
?
Post by a***@gmail.com
Hi All,
I have installed vagrant on windows 7 and downloaded repo from
https://github.com/bitfield/puppet-beginners-guide-3.git (extracted and
saved in C:\drive)to learn puppet.
As per john Arundel's - puppet 5 beginner's guide (page 32), i am trying
to run the following command *cp /examples/files/run-puppet.sh files/*
from ubuntu virtual machine to copy run-puppet script from examples/
directory
i get following error cp: cannot stat '/examples/files/run-puppet.sh': No
such file or directory.
I am not able to understand why...could some one please help.
Thanks in advance
Regards,
Alex
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/3309582b-3dd1-4494-a8e6-c357f3ce052e%40googlegroups.com
<https://groups.google.com/d/msgid/vagrant-up/3309582b-3dd1-4494-a8e6-c357f3ce052e%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Alvaro
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/CAHqq0exuHofYXrBChLNeEJ3hNr%2BdY4XUSt0u4z5AsCbhP2FLLQ%40mail.gmail.com
<https://groups.google.com/d/msgid/vagrant-up/CAHqq0exuHofYXrBChLNeEJ3hNr%2BdY4XUSt0u4z5AsCbhP2FLLQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAChY%2Bvc%3DqSqjG_tiA6AzWSgDYTTMdpezTQwV04sOrLpdR3%2BgFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alvaro Miranda Aguilera
2018-11-27 14:31:57 UTC
Permalink
Hello Alex!

Thanks for sharing that.

Ok, so basically your folders are not mounted.


Vagrant does the share folders as part of the vagrant up.


Each time you do vagrant up to start the VM
or vagrant reload to reboot the VM, vagrant will mount the files.

So make sure you are not operating the box outside the vagrant commands, ie
turning VM on/off with the VirtualBox ui.

So try this please.



vagrant halt

this will power off the VM

vagrant up

this will run on the vm.

If after this process the folders are still not mounted, then try this.


vagrant destroy
this will delete the vm

vagrant up --no-provision

this will create a new vm, and won't run any provisioning.

Lets check if the shared folders are here now

vagrant ssh -c 'df -Ph'

will show the mounted folders


Heres the ouput of vagrant up, you can see the folders mounted

default:

default: Guest Additions Version: 5.1.38

default: VirtualBox Version: 5.2

*==> default: Mounting shared folders...*

default: /examples =>
/Users/kikitux/Downloads/puppet-beginners-guide-3/examples

default: /etc/puppetlabs/code/environments/pbg =>
/Users/kikitux/Downloads/puppet-beginners-guide-3/puppet

*==> default: Machine not provisioned because `--no-provision` is
specified.*

*0* kikitux ~/Downloads/puppet-beginners-guide-3* (master)* $

here is the output of the last command, from the VM the folders are mounted


$ vagrant ssh -c 'df -Ph'


Filesystem Size Used Avail Use% Mounted on

..

etc_puppetlabs_code_environments_pbg 466G 196G 270G 43%
/etc/puppetlabs/code/environments/pbg

..

Connection to 127.0.0.1 closed.


Thanks
Alvaro.
--
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 vagrant-up+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezseuLocnDzBmr9kDaag3pN7jN_B0v_hZdJA7eqAju6FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...