User Tools

Site Tools


virtualbox

VirtualBox: Windows to/from Linux Transfers

Problem: Print or save to a mobile drive from Windows running in Virtual Box under Ubuntu Linux

        VBox setup to enable shared directories or activate USB are often tricky. 

Approach: Use SFTP to send file from Window to Ubuntu on the same computer.

Install (S)FTP progam in Windows:

In Virtual Box / Windows download and install Filezilla (http://filezilla-project.org/)

Set up to receive on the Ubuntu side: In terminal:

>sudo su  # to become superuser -- you must supply your password
>ifconfig # to learn the IP number of the Ubuntu host
# On most installations this will be a dynamic IP "leased" by DHCP
# You may need to rerun this each time you want to transfer and
# copy down the IP number, e.g., 192.168.1.64
# If you are going to do transfers regularly, then think of changing
# the file /etc/network/interfaces
# Here is a working example. Note the dhcp line is commented out. 
# If you make this change:
#      1) make sure the IP no. is free to use
#      2) remember to restart machine
#      3) your gateway etc. may be different in IP no. 
# sample /etc/network/interfaces for Ubuntu Linux host
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp

iface eth0 inet static
address 192.168.1.90
netmask 255.255.255.0
gateway 192.168.1.1

# end of sample interfaces file

# Install the ssh server (sshd daemon)

apt-get install openssh-server
# You may need to start sshd each time you want to transfer. Usually it
# configures to autostart.  If not     
> /usr/sbin/sshd
# will get it going (you may need to do 'sudo /usr/sbin/sshd')

Back in Windows

Start Filezilla

Near the top of the window, enter your Ubuntu username e.g., john

Enter the host e.g. 192.168.1.64 from ifconfig or the /etc/network/interfaces static address

Enter your password

Enter the port number 22 (for SSH/SFTP. Use 21 for FTP)

Hit “Enter”

You will likely have to accept the Server Host Key.

Filezilla should then connect.

You should now see the right panel of Filezilla populated with your Ubuntu home directory. The left panel will probably be your Documents and Settings directory in the Windows virtual machine. Right click on a file on the left (you can, of course, move to other directories first), and “Upload” Voila. Your file is now transferred across.

Filezilla has other features you can explore, but this will satisfy most immediate needs.

virtualbox.txt · Last modified: 2015/06/09 15:23 by 127.0.0.1