Delayed Write and Data Loss Question

Discussions about using Windows guests in VirtualBox.
Post Reply
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Delayed Write and Data Loss Question

Post by danf84 »

Hello,

I was hoping someone could clarify whether what happened to my data today could be considered normal. Was coding in Delphi inside my VM, periodically hitting Save, then my host BSoD'ed (but that's a known issue with the machine). How come when I rebooted the host, loaded the VM, my changes disappeared? No data corruption, just my changes weren't saved.

I then tried to experiment with it. Loaded the guest, made some changes, hit Save, then killed everything VBOX related on the host. My changes were preserved. So I was then thinking I guess since my host OS was alive, it could complete the IO.
I experimented again - to replicate the original scenario by pulling the plug on the host. My changes in the VM were indeed GONE.
Could someone enlighten me as to how does the disk write caching work inside the VM on Windows? I'd have hoped the VM would commit all changes, and it'd be up to the host to manage delayed writes to the VDI.
I know after having a blue screen you could expect some data loss and I shouldn't have any particular provisions in place should my host BsOd again.

Many thanks, Dan
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Delayed Write and Data Loss Question

Post by vbox4me2 »

This is due to delayed writing on the main Host disk(and OS disk drivers) not the VM. A VM commit is a secondairy commit but passed to the primary system for writing (a VDI is a flatfile ON the Host). There is no way out of pulling the power or a bsod and its related dataloss other then using an advanced battery powered write cache.
Post Reply