Files copied from Host OS to Guest OS disappearing

Discussions about using Linux guests in VirtualBox.
Post Reply
SoftwareEngineer35781
Posts: 1
Joined: 1. Jun 2022, 01:42

Files copied from Host OS to Guest OS disappearing

Post by SoftwareEngineer35781 »

Hello,

I mounted a Virtual Disk on my Host Computer to copy files to the Home Folder of my VM (=Virtual Machine)
Mounting did not cause any issues. Here are the commands I used:

vboximg-mount -i XYZ -o allow_root vbox_sysdisk
ls /mnt/
cryptsetup luksOpen /home/<XYZ>/vbox_sysdisk/vol0 XYZ

(Instead of XYZ the appropriate ID or identifier was used!)

The VM was offline while the Virtual Disc was mounted!

However once I started to the VM - the Files are gone.
If I remount the Virtual Disk on my Host System the files are also not to be found.

The Virtual Disc is actually a VDI File.

Any idea why the files are disappearing ?!

Thank you for your replies
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Files copied from Host OS to Guest OS disappearing

Post by scottgus1 »

There is a topic in either Linux Hosts or Guests forums where "vboximg-mount" might have a bug in it when writing to the disk. I can't find it right off.

Personally, I'd more trust using host mounter apps for reading from a disk file, and instead, for writing, having the VM running and writing via a real shared folder or Virtualbox Shared Folders.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Files copied from Host OS to Guest OS disappearing

Post by fth0 »

FWIW, a virtual hard disk image can be mounted by either vboximg-mount or a VirtualBox VM, but not both at the same time. vboximg-mount is meant to access the virtual hard disk image without running a VM.
Post Reply