PaulDotCom mailing list archives

accessing unallocated VM disk areas


From: Robin Wood <robin () digininja org>
Date: Mon, 29 Apr 2013 11:09:45 +0100

I had this random thought last night that I don't have time to test out so
was wondering if anyone else knew the answer...

When you create a disk in VirtualBox it lets you create it as a dynamically
growing one so that the file on host disk starts small but grows as you
write more data into it from the guest. If in the guest you try to read
areas of the disk which have not yet been created, for example by using dd
to clone the whole disk, what do you get from the areas which haven't yet
been created?

I'd guess it would be either nulls or random stuff but just wondering. I
could lab it up but don't have time at the moment.

What if you use direct disk write to write to the last sector? Does the
whole disk then get created on the host or does it do some smart
allocation? Or does it just crash?

Does VMWare behave the same? Could checking this space be a way to try to
identify if you are in a VM? I know there are other, better, ways but the
more options you have the better.

Robin
_______________________________________________
Pauldotcom mailing list
Pauldotcom () mail pauldotcom com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

Current thread: