Quickest method of data transfer between host and guest OS

This is for discussing general topics about how to use VirtualBox.
Post Reply
Concrete Donkey
Posts: 2
Joined: 16. May 2011, 05:13
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Debian, Crunchbang, Ubuntu

Quickest method of data transfer between host and guest OS

Post by Concrete Donkey »

Hello,

I'm a convert from VMware Workstation and the one feature that I miss the most is drag and drop file transfers, I understand that Virtualbox has an alternative to this called Shared Folders however I have encountered problems with these especially where they would "stick" and the folder would be constantly shared even after I had removed it from the sharing menu. I have also tried to use a USB drive as an alternative for data transfer however I have also found this to be very unstable with Virtualbox failing to either detect and sometimes even mount or unmount the USB drive.

What would be the best solution for transferring files between the guest and host OS? Typically I will transfer between 10mb - 200mb of files with a maximum of 1,000 files each time so this obviously places online methods out of the picture.

Thanks,
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Quickest method of data transfer between host and guest OS

Post by BillG »

Why not use Windows/Samba file sharing?
Bill
Concrete Donkey
Posts: 2
Joined: 16. May 2011, 05:13
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Debian, Crunchbang, Ubuntu

Re: Quickest method of data transfer between host and guest OS

Post by Concrete Donkey »

Setting up file sharing is hardly a streamlined process, especially when you have to deal with Windows permissions. It's a possibility however after moving to Virtualbox the main thing I miss overall is drag and drop transfers.
TimHerb
Posts: 23
Joined: 7. Feb 2009, 23:44
Primary OS: Mandriva
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP

Re: Quickest method of data transfer between host and guest OS

Post by TimHerb »

USB performance is definitely a sometimes thing.

Yes, Windows (at least the XPPro I use) does maintain a memory of attached network drives even when it fails to find them in a given session. This is perhaps a feature rather than a bug, and unrelated to VB's Shared Folder tool. I do miss the days when Win4Lin could write directly to the entire linux file system, but have over time had very few problems writing to shared directories hosted by VBOXSVR. I got used to the one extra operation with a linux file tool which really is not that big a deal (and not even necessary for my scripted writes to the host file system). By contrast I've had no end of annoyances with permissions and firewalls using Samba.

I will say I've developed the habit of copying files all the way into the Win guest file system before tying to modify them with some old Win applications that just don't like attached network drives. That might be a pita if I needed it more often.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Quickest method of data transfer between host and guest OS

Post by mpack »

I agree that a network share is the way to go, or a VirtualBox Guest Additions shared folder if you value convenience and security above performance (GA shared folders don't need you to actually make any host folders network shareable).

You have been rather vague as to your objections to these. Still, one final possibility which is ok for a one-off, is to use a tool such a ImgBurn to copy your ~200MB of files into an ISO image, then mount that as a virtual CD inside the VM.

Drag and drop has been discussed here before. It opens a security hole between guest and host, and it's hard to implement when you support as wide a range of potential host/guest OS combinations as VBox does.
NeBlackCat
Posts: 154
Joined: 3. Aug 2008, 13:37

Re: Quickest method of data transfer between host and guest OS

Post by NeBlackCat »

I use shared folders all the time, across various combinations of host/guest OS, and haven't seen any such issues with them that I can recall. It's part of my standard VM setup to have a global shared folder that all VMs can see, and one private to each (just to share stuff with the host). It seems to work fine.

What's really handy about that is that you can add symlinks from the shared folders to other places in your filesystem (eg. USB stick) as you need to at any time, and the VMs can follow them too.

The only pain is the need to have the guest extensions installed.

Where are the files coming from? If it's a recent Windows system you could put a VHD on a USB stick, or somewhere else commonly accessible. You can mount that directly in Windows for copying files on, and add it to the VM as a regular virtual disk image (not a USB device as such) for copying them off. Or if you need to do it with the VM running, you can make an ISO (eg. on USB stick or network) out of a bunch of files with a single command (eg. mkisofs), and hot plug that into the VM.

Or you can map the USB disk into the VM as a 'raw' VMDK, so it look just like a regular hard drive, not a USB device. I'm doing that at the moment to test USB booting - seems to work ok. I always make sure the USB stick is inserted before starting the VM.

Are the VMs networked? How about rsync (or equivalent), if you don't want to start creating network shares.

Lots of options!
Post Reply