How can I transfer the scripts and text files I've created in my CentOS environment and put it in my host desktop (Windows 7)? I've tried using ftp but it needs to configure the routers to use vsftpd, which I do not have administrative privileges. Is there any way I can transfer these files in another approach? Thank you.

  • Do you have (or can you install) the VirtualBox Guest Additions in your guest? If so, have a look at using Shared Folders (from the VirtualBox 'Devices' menu) – GregHNZ Jun 2 '14 at 8:57
  • I usually do it via SSH, but i don't know if your config allow for it. ## on centOS shell : scp path_to_file <winzozz_username>@<winzozz_ip_address>:<destination_path> – lese Jun 2 '14 at 9:09
  • @GregHNZ, When I click the 'Insert Guest Additions' tab, nothing seems to happen. – Miguel Roque Jun 2 '14 at 9:10
  • @lese, SSH is not available in my workstation. :( – Miguel Roque Jun 2 '14 at 9:10

One way to transfer files is by using the Shared Folders feature of VirtualBox which allows a directory on the host computer to be mounted or mapped on a guest that has the Guest Additions installed.

  1. Install the Guest Additions, for Centos

    yum groupinstall "Development Tools"
    yum install kernel-devel
    yum --enablerepo rpmforge install dkms
  2. Create a shared folder on your host

    VBoxManage sharedfolder add <vmname> --name <some_share_name> --hostpath <hostpath>

    Alternatively you can complete the same config via your virtual machines settings dialogue under the "Shared Folders" tab.

  3. Mount the shared folder on your guest

    mkdir /mnt/shared; mount -t vboxsf <some_share_name> /mnt/shared 

Now you can copy back and forth to the shared directory on your host.

  • 1
    Apparently, I can't install the last one since it says the rpmforge repository is not found. – Miguel Roque Jun 3 '14 at 1:31
  • What should be the host path? Thank you. – Miguel Roque Jun 3 '14 at 1:32
  • Sorry I don't have any CentOS guests handy.. There's some detail about it here: wiki.centos.org/AdditionalResources/Repositories/RPMForge – Matt Jun 3 '14 at 1:49
  • The <hostpath> is whatever directory on the host that you want to copy the files to. It can be anywhere. – Matt Jun 3 '14 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.