Strange raw disk behavior

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Gherardo
Posts: 2
Joined: 15. May 2014, 13:12

Strange raw disk behavior

Post by Gherardo »

Hello,
I've been playing around a lot with virtualbox lately and I'm using raw disk access to give a VM full control of the hard drive.
It's a FreeBSD 9.2 guest on a Win7 Host.

On Computer Management->Storage->Disk Management the disk (raw disk passed to FreeBSD) is labeled as Online, even if
Windows cannot see anything inside it (it's black and it's written 'Uallocated', and that's expected since Win doesn't understand ZFS).
Everything is working fine, VM starts and stops ok, I can do everything inside it (I have a mirror ZFS, data integrity seems ok, scrub
runs fine...) but there's one thing I cannot seem to get working.

Unfortunatly with this setup, I cannot check SMART parameters from Windows (the host PC).
If I use a program like CrystalDiskInfo, simply the disk isn't there.

If I go to Device Management and take the disk offline, it instantly appears along the other drives, I can run any 3rd party program
to check the SMART parameters, but the VM stops working or shows serious crash problems.

Is there a way around it?

Thanks in advance,


Gherardo
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Strange raw disk behavior

Post by mpack »

Gherardo wrote:I'm using raw disk access to give a VM full control of the hard drive.
Eh? Raw disk access does not give the guest "full control of the hard drive". The guest's hard drive is as virtual as ever, which explains why you can use an IDE API for raw access to a host SATA drive - or vice versa. It also explains why you can't access the drive metrics for a host drive.

The only thing different about raw mode is that host reads and writes bypass the host filesystem and read/write at a sector level, as opposed to buffered block I/O from a host image file. And, since you're bypassing host buffering and caches, you can expect this to run somewhat slower than a normal virtual drive.

As it says in the user manual, raw disk access is an expert level feature. That means that if you need to ask questions like this about it, you really shouldn't be using it. Failure to heed this could result in a dead host PC.
Post Reply