I want to mount the raw disk image (read only) from a running linux kvm virtual machine, to access the data outside the vm.
It works for accessing the files, but doesn't reflects filesystem changes:
losetup /dev/loop0 disk1.raw # image of running vm mount -o ro /dev/loop0 /mnt/disk1ro
After a touch of the file in the vm, the file doesn't exists in the mount point. When I do unmount and mount it again it's there.
I didn't found a mount option which helped. Is any kernel cache preventing the update?
A nfs server in the vm would be a solution, but to directly work with the image would be a lot more simple and slick trick (if it worked)!
Update: ok I agree with the others, this is a bad idea