Hacker News new | ask | show | jobs
by vasi 5588 days ago
VirtualBox can actually do physical-partition virtualization, but you have to produce a VMDK file that points to the partition you want, and use that as the virtual disk. (Oh, and run VBox as root.) Conveniently, I've written some code to produce such a file: https://github.com/vasi/vmdk-raw-parts . Enjoy!
2 comments

Aha, cloned! Thanks for this. I had to make my VMWare vmdk for my GPT partition by hand :-). I've been dreading the day when my disk changes and I have to recreate it. Now I will not.
Neat, I assume this preserves FS changes upon native boot?
Yup, it's using the physical partition, so all changes are preserved. Whether you want that or not.

I suppose you could use a snapshot VMDK to put the FS changes into a file, which you could then keep or discard. No idea if VBox or even VMWare actually supports this behaviour. Nor can I think of any particularly good use for it!