VirtualBox with raw disk

1 minute read

Power here (and in most areas around Toronto) has not been great the past week, and my little FreeBSD test server started misbehaving after a brown-out yesterday. It would run for ~5min and then reboot. I thought the issue was due to electronics being damaged by the power surge - it turned out to be a bad filesystem corruption that wasn’t being corrected with normal fsck on boot, but was quickly fixed in single-user mode.

In any case, the test server runs headless, so while troubleshooting I decided instead of rewiring monitors I’d try dropping the drive into my Windows machine and setting up a VirtualBox VM to read from it.

Turns out this is rediculously simple. I used the instructions here and the only issue I had was the permissions issue mentioned in the first comment, which was resolved by running VirtualBox as administrator. I also had to update the network interfaces inside the VM that had changed from NVidia on the test box to Intel in the VM, but this was expected and quickly done in the console.

I’m quite liking this setup, my Windows machine has way faster CPU (AMD A8 vs Atom) and excess memory even when running games, so I think I may setup a permanent raw drive or two. Now that I’m reasonably sure the testbed system itself is not the issue I’ll set that back up with a 32Gb SSD I bought for another project and it’ll be a nice little dedicated monitoring box.