Move files from one guest to another

Discussions about using Linux guests in VirtualBox.
Post Reply
rickyoswaldiow
Posts: 9
Joined: 30. Aug 2016, 20:31

Move files from one guest to another

Post by rickyoswaldiow »

I've got two different Linux guests on a Windows 10 host and I want to transfer a large selection of files from one guest to the other. Is there a direct way to do this, without copying the files into the host first?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Move files from one guest to another

Post by socratis »

To begin with, the files are already in your host, just in a different format, inside the virtual HD of your VM. If you are asking this because you don't want to allocate extra space in your host, I have to ask you a very important question first: are the HDs of your VMs dynamic? Because if they are, by moving them from a VM to the other, you're going to make matters worse. So are they dynamic or fixed?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
rickyoswaldiow
Posts: 9
Joined: 30. Aug 2016, 20:31

Re: Move files from one guest to another

Post by rickyoswaldiow »

socratis wrote:To begin with, the files are already in your host, just in a different format, inside the virtual HD of your VM. If you are asking this because you don't want to allocate extra space in your host, I have to ask you a very important question first: are the HDs of your VMs dynamic? Because if they are, by moving them from a VM to the other, you're going to make matters worse. So are they dynamic or fixed?
No, I am changing to a different Linux OS. I suppose I can just launch my new guest and then mount the virtual HD of the old guest?

EDIT I just tried to add the old virtual HD as a 2nd storage attachment to the SATA controller. The virtual HD is encrypted with cryptsetup, it appears as a drive but when I enter the (correct) password it fails and the drive disappears... The home folder on the old guest is also encrypted, but I guess I'll cross that hurdle when I get to it.
rickyoswaldiow
Posts: 9
Joined: 30. Aug 2016, 20:31

Re: Move files from one guest to another

Post by rickyoswaldiow »

After the old drive disappears from the file manager, it is still listed correctly with fdisk -l

Code: Select all

Disk /dev/sdb: 350 GiB, 375809638400 bytes, 734003200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x***

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sdb1  *       2048    999423    997376   487M 83 Linux
/dev/sdb2       1001470 734001151 732999682 349.5G  5 Extended
/dev/sdb5       1001472 734001151 732999680 349.5G 83 Linux
Attachments
After entering the password for the Encrypted volume
After entering the password for the Encrypted volume
two.png (38.82 KiB) Viewed 1255 times
Prior to selecting the Encrypted volume
Prior to selecting the Encrypted volume
one.png (101.84 KiB) Viewed 1255 times
rickyoswaldiow
Posts: 9
Joined: 30. Aug 2016, 20:31

Re: Move files from one guest to another

Post by rickyoswaldiow »

In the end I've just created a temporary virtual drive without encryption. I mount it on the old VM first and copy my files onto it, then mount it on the new VM and pull them back off.
Post Reply