Solved how to copy files from a guest os to host os?

October 1, 2015 at 08:30:40
Specs: Peppermint 5, 2ghz 3gb ram
yeah right, vm. virtualbox.. just for fun I didn't download the guest additions, so no shared folders. is there any alternative way to copy files from guest os to host os? my host PC s peppermint 5 and guest is winxp.

See More: how to copy files from a guest os to host os?

Report •

✔ Best Answer
October 3, 2015 at 16:37:01
Here's one way to transfer files without guest additions. It works with Virtualbox, and QEMU images. I learned this by searching on the internet.
First, make sure the guest VM that you want to copy files from isn't running.
You will also have to have a driver for NTFS filesystem in your case.
If you have QEMU-utils installed, you can use:

sudo modprobe nbd max_part=16 #this loads network block device driver into kernel

then...

sudo qemu-nbd -c /dev/nbd0 <path to your VBox hdimage.vdi> #binds your hdimage to network block device, which can then be mounted as a normal filesystem.

and lastly...

sudo mount /dev/nbd0p1 /mnt #or wherever you'd like to mount it.

When you're done transferring files you'll need to unmount the filesystem and...

sudo qemu-nbd -d /dev/nbd0 #unbind hdimage from network block device.

That's it.
I've used it several times, and it works very well.

message edited by pbznmg18



#1
October 1, 2015 at 11:06:39
Just for fun - download guest additions.

Report •

#2
October 1, 2015 at 23:43:12
haha no Lol,, there might be some other way.. I mean, creating a networking link or sharing removable drives or something.. luv experimenting mate :)

Report •

#3
October 3, 2015 at 07:42:48
Perhaps you can add a DVD drive connected to an ISO image that will contain your files: http://geek-university.com/oracle-v...

Or install an FTP server on one system and FTP client on another?


Report •

Related Solutions

#4
October 3, 2015 at 16:37:01
✔ Best Answer
Here's one way to transfer files without guest additions. It works with Virtualbox, and QEMU images. I learned this by searching on the internet.
First, make sure the guest VM that you want to copy files from isn't running.
You will also have to have a driver for NTFS filesystem in your case.
If you have QEMU-utils installed, you can use:

sudo modprobe nbd max_part=16 #this loads network block device driver into kernel

then...

sudo qemu-nbd -c /dev/nbd0 <path to your VBox hdimage.vdi> #binds your hdimage to network block device, which can then be mounted as a normal filesystem.

and lastly...

sudo mount /dev/nbd0p1 /mnt #or wherever you'd like to mount it.

When you're done transferring files you'll need to unmount the filesystem and...

sudo qemu-nbd -d /dev/nbd0 #unbind hdimage from network block device.

That's it.
I've used it several times, and it works very well.

message edited by pbznmg18


Report •

#5
October 3, 2015 at 23:22:37
English please!!! lol m not an expert yet. what is qemu?

Report •

#6
October 4, 2015 at 00:33:50
QEMU is another emulator, similar to Virtualbox.

You can use the utilities from QEMU-tools package (I'm using Debian - may be called something different in your distribution.) to mount virtual hard disk images from emulators.

You're supposed to type the commands preceded by "sudo" in your terminal. (anything including the # and after is a comment explaining what each one does.)

You can also use a USB removable drive, or whatever to transfer files. Just mount it in the guest OS...copy files...unmount...mount drive in host OS, and copy files...done.

message edited by pbznmg18


Report •

#7
October 4, 2015 at 04:19:43
ok i ll try immediately.. i ll let you know and mark your answer best if it works :)

Report •

Ask Question