I had a VM created by Vmware Station and used a vmdk drive. Then the vhdx file was mounted to a directory by guestmount under Ubuntu system. All worked well and I could access the data in vmdk through the mounted directory. But I met a question that the new data in vmdk generated after mounting time did not appear in the directory. For example, if there were two files A.f and B.f in the vhdx file at first, then mounted to dir D and the two files could be found in D. After that, the VM created a new file C.f in the vmdk, which would not be seen in D. The data in D would not be updated until an unmount and re-mount operation. Does anyone has the same problem? Thanks for any help. This is my mount command: guestmount -a path/disk.vmdk -m /dev/sda1 --ro -o allow_other path/dir
CodePudding user response:
guestmount (and in fact, filesystems / block devices in general) doesn't work like this. You can't update the underlying block device without unmounting the filesystem, doing the modification, and then remounting. Trying anything else will result in file corruption.