Transferring Files to and from Virtual Machinesvirtualbox150

This page provides information on transferring files between different types of virtual machines provided by the SCS. It is often useful to be able to transfer files between the guest machine and the host machine. On this page, you will find instructions for the following methods:

Creating a Shared Folder in VirtualBox
Shared Folders on SCS Lab Computers using Course VMs
Shared Folders on Personal Computers
Dragging and Dropping Files in VirtualBox
Managing Files with NextCloud

Creating a Shared Folder in VirtualBox

A shared folder is a folder that makes its files available on both the guest machine and the host machine at the same time. Creating a shared folder between the guest and the host allows you to easily manage files that should be present on both machines. The course virtual machines are ready to use shared folders right away, but if you are using the virtual machine on your personal computer, then you will need to specify which folder to use as shared storage.

Shared Folders on SCS Lab Computers using Course VMs

If you are using a course VM on a lab computer, it is likely that a shared folder has already been set up for you. On the desktop of your course VM, you should notice a folder titled SharedFolders. Inside this folder, you will find any folders that have been shared between the course VM and lab computers.

You should see two folders that have already been configured for you: Z_DRIVE and Temp.

Z_DRIVE gives you access to your Windows Account Z:\ drive. This is storage that is persistent to your SCS account and available as a network drive on the lab computers.

Temp gives you access to the folder found at D:\temp on the lab computer. Files stored in this folder are local to the machine, meaning that they can be accessed faster but will delete from the system when you log out.

If you are working with data that you will need to use again, use the Z_DRIVE for your shared folder. If you need a faster read/write speed, use the Temp folder, but remember to back up your files, or they will be deleted when you log off the computer.

Shared Folders on Personal Computers

If you are using your own personal machine, you will need to configure VirtualBox to look in the right place for your shared files.

First, click on the guest machine you intend to share files with. From there, you can select the guest Settings and navigate to Shared Folders on the left side menu. To create a new shared folder, either click the New Folder icon on the right menu or right-click the empty list of shared folders and click Add Shared Folder. From here, there are six options:

  • Folder Path: The folder name on the host machine. Click the drop-down menu and navigate to the folder you would like to share.
  • Folder Name: This is the name of the folder as it will appear on the guest machine.
  • Read-Only: If you check read-only, the guest machine will be unable to write changes to the folder. This is valuable when you only want to send files to the virtual machine, but do not want to risk having the files modified by the guest.
  • Auto-Mount: When any external storage is connected to a computer, it must be mounted in order to be used. It is recommended that you turn on auto-mounting unless you are familiar with the process of mounting a drive yourself.
  • Mount Point: Unless you already know about mount points, leave this blank.
  • Make Permanent: If you check this, the shared folder will be a permanent machine folder. If it is not checked, the folder will not be shared after a shutdown.

On the course virtual machines, when you load into the desktop, you should see a folder labelled SharedFolders. In there, you will see any folders that are currently mounted and being shared.

Dragging and Dropping Files in VirtualBox

If you only need to transfer a few files quickly, you can simply drag and drop the files in. On the top bar of the running guest machine, click on Devices > Drag and Drop and make sure that Bidirectional is selected. This means that you will be able to drag files from the host to the guest and from the guest to the host. Once bidirectional drag and drop is checked, you should be able to begin dragging and dropping files.

NOTE: Sometimes when dragging files into the course VM, you may not be able to drag them into the file browser directly. If you encounter this issue, you should drag your files onto the Desktop and move the files around from there. You should see the cursor change when it is ready to drop files.

You can also drag files from the guest machine into the host. To do this, simply open the file browser on the host to where you would like to drop the files and drag the files from the virtual machine into the file browser of the host. File transfers should be pretty quick; if the virtual machine seems stuck when transferring, simply cancel the transfer and try again.

Managing Files with NextCloud

On any virtual machine, including VirtualBox, VMWare, or the virtual machines hosted on the SCS OpenStack, you can access the SCS NextCloud services to move files between multiple machines and your SCS Windows Account storage. NextCloud offers you all of your SCS storage in one remote location, similar to how you might use other file hosting services like Dropbox or Google Drive. Before trying to use NextCloud, you should check that you can access the service by logging in here.

If you can access the NextCloud services, you can browse the various file storage services available to you:

  • Linux Home: These are the files from your SCS Linux Account
  • Windows Home: These are the files from your SCS Windows Account and your lab Z:\ drive.
  • NextCloud: In addition to the other storage accounts provided to you by the SCS, you can also upload up to 20GB of files directly to NextCloud.

With NextCloud, you can upload your files from any machine with an internet connection and download them onto any other machine with an internet connection. For example, you can move project files off of your virtual machine, onto the NextCloud storage, and then download them on your personal laptop. Alternatively, you can upload files from your personal PC onto the NextCloud storage, place them into the Windows Home folder, and access those files from either the lab Z:\ drive or download them on a virtual machine like VirtualBox or OpenStack.

Uploading Files to NextCloud from a Lab Computer

If you would like to upload files from a lab computer, the easiest way to do this is to place the files you would like to transfer into your Z:\ drive. These files will be automatically backup into your NextCloud storage under the Windows Home folder. After that, you can move them into the main NextCloud storage or choose to keep them in your Z:\drive.

Uploading Files to NextCloud from a VM or Other PC

If you would like to upload files from either a VM or any other computer, you can log in to the NextCloud service using any of the available interfaces, such as the web interface. Press the “+” icon in the top left of the file browser and select Upload File. From here, you can choose to keep it in the main NextCloud storage, move it into your Windows Account storage (the Windows Home folder), or into your Linux Account storage (the Linux Home folder).

Downloading NextCloud Files to a VM or Other PC

Once your files are uploaded, you will be able to download those files onto any machine, which can connect to NextCloud. First, log in to your preferred NextCloud interface (e.g. the web interface). Navigate to the folder which contains the files you would like to download. Once you are in the target folder, click the checkbox next to each file you would like to download. Above the file listing, you should notice the context bar changing to tell you how many files you have selected and a button labelled Actions. Click Actions > Download.

If you selected a single file, it will prompt you to confirm the download. If you have chosen more than one file, NextCloud will place all of the selected files into a zip archive. Before you can use the files, you will need to extract them from the archive. Once you have downloaded your file or extracted your archive, you are ready to use your files on your machine.