Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to transfer files from my Host OS (Windows 7) to Guest OS (CentOS) running on VirtualBox.

I tried using pscp but it gives the error: More than one remote source not supported

I tried ftp but it doesn't connect and I don't know why.

share|improve this question

migrated from stackoverflow.com Aug 16 '12 at 22:25

This question came from our site for professional and enthusiast programmers.

add comment

4 Answers

You can install Guest Additions: http://www.virtualbox.org/manual/ch04.html

and then use Shared Folders: https://forums.virtualbox.org/viewtopic.php?t=15868

share|improve this answer
    
It's also possible to mount a vdi from the host (and access the guest operating system's files): superuser.com/questions/34913/mount-virtualbox-vdi-disk –  Anderson Green Nov 8 '12 at 3:35
add comment

You can do it with "scp" command, then the ssh daemon (sshd) has to be running on the Windows box as well.

Or use one of the windows scp clients to talk to the centos VM. You can transfer files either way using scp.

share|improve this answer
    
how do you identify the IP and credentials of the guest machine for the scp command? –  ted.strauss Jan 7 at 19:25
add comment

I have the exact same setup (Windows 7 Host OS, CentOS 6.5 Guest OS)...

(if you have SSH working on an IP address for CentOS, then you can skip this paragraph below)
I set Virtualbox to use bridged network adapter (Settings > Network > Adapter 1: set to bridged) and after installing Apache (set a hostname, and also turn off firewall with: service iptables stop). You can view the IP address given to you with ifconfig eth0 or narrow the ouput with ifconfig eth0 | grep 'inet addr' | awk '{print $2}'. This is the IP address that should also be in your /etc/hosts file on the same line with your hostname. For testing purposes, put an index.html file in /var/www/html (your web root). Then you should be able to browse to the VM at a local IP address: 192.168.x.x from a browser on your Windows 7 OS.

To transfer files back and forth, you can use WinSCP on your Windows 7 host OS. Create a new session with these settings in WinSCP:

File protocol: SFTP (this means you will be connecting via SSH)
Host name: 192.168.x.x (this is the ip address of your VM)
User name: root
Password: (leave this blank for security reasons...
           but when prompted during connecting you'll enter your root password 
           you set for CentOS)
Private Key file: (leave blank...you will be prompted to say 'yes' to accept the key)
share|improve this answer
add comment

You can use Samba for transferring files. Just install Samba, and then choose the Host OS and then the OS where the files are to be transferred.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.