Snapshots and Writethrough

Discussions about using Windows guests in VirtualBox.
Post Reply
Demiourgos
Posts: 4
Joined: 20. Mar 2009, 11:00

Snapshots and Writethrough

Post by Demiourgos »

I have an XP guest on a normal vdi drive and documents on a writethrough drive. I have copied some files on the documents disk but after snapshot restore they were lost. I can't do anything with this. I can't use NFS and ISCSI drive (through the MS ISCSI initiator on the guest) doesn't work properly after restores. Are there any ideas about the subject?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Snapshots and Writethrough

Post by Perryg »

I have an XP guest on a normal vdi drive and documents on a writethrough drive
Is this write through drive another VDI that you have attached and marked as writethrough?
If so these are not included in the snapshot and should not be touched when you revert or delete snap shots.
Explain a little more about how these were created and also post the following information about the guest in question.
From the host terminal/command windows VBoxManage showvminfo <VM Name> --details --machinereadable and post here. Replace <VM Name> with the actual name of the VM. Use "" if the name has a space in it.
Demiourgos
Posts: 4
Joined: 20. Mar 2009, 11:00

Re: Snapshots and Writethrough

Post by Demiourgos »

I tried VDI and ISCSI (both marked as writethrough, cache on windows guest is turned off), but the result is the same. I make a snapshot, then copy files, restore snapshots, see no files at all.

Code: Select all

name="Test"
ostype="WindowsXP"
UUID="7c484d4f-765b-4c59-a9d1-15c071f9a1ed"
CfgFile="G:\VD\.VirtualBox\Machines\Test\Test.xml"
hardwareuuid="7c484d4f-765b-4c59-a9d1-15c071f9a1ed"
memory=1536
vram=32
cpus=2
synthcpu="off"
bootmenu="messageandmenu"
boot1="floppy"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
pae="on"
biossystemtimeoffset=0
hwvirtex="on"
hwvirtexexcl="off"
nestedpaging="on"
vtxvpid="off"
VMState="running"
VMStateChangeTime="2010-03-22T09:01:09.732000000"
monitorcount=1
accelerate3d="on"
accelerate2dvideo="on"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
storagecontrollername0="IDE Controller"
storagecontrollertype0="PIIX4"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="2"
storagecontrollerportcount0="2"
storagecontrollername1="Floppy Controller"
storagecontrollertype1="I82078"
storagecontrollerinstance1="0"
storagecontrollermaxportcount1="1"
storagecontrollerportcount1="1"
storagecontrollername2="SATA ??????????"
storagecontrollertype2="IntelAhci"
storagecontrollerinstance2="0"
storagecontrollermaxportcount2="30"
storagecontrollerportcount2="3"
"IDE Controller-0-0"="none"
"IDE Controller-0-1"="none"
"IDE Controller-1-0"="C:\PROGRA~1\Sun\VIRTUA~1\VBoxGuestAdditions.iso"
"IDE Controller-ImageUUID-1-0"="69494da0-5e7b-4d69-9eac-a8bbc7ebe330"
"IDE Controller-1-1"="none"
"Floppy Controller-0-0"="emptydrive"
"Floppy Controller-0-1"="none"
"SATA ??????????-0-0"="G:\VD\.VirtualBox\Machines\Test\Snapshots\{a356d7d8-a9d
e-4d03-a92f-51c3eacb9a8b}.vdi"
"SATA ??????????-ImageUUID-0-0"="a356d7d8-a9de-4d03-a92f-51c3eacb9a8b"
"SATA ??????????-dvdpassthrough"="on"
"SATA ??????????-1-0"="127.0.0.1|iqn.WorkDoc2"
"SATA ??????????-ImageUUID-1-0"="13a2305c-4507-433f-8cd2-5f74cc9f3ea8"
"SATA ??????????-2-0"="g:\test.vdi"
"SATA ??????????-ImageUUID-2-0"="be7f4d31-40bd-48cb-9437-2836353672f7"
Demiourgos
Posts: 4
Joined: 20. Mar 2009, 11:00

Re: Snapshots and Writethrough

Post by Demiourgos »

UUID: be7f4d31-40bd-48cb-9437-2836353672f7
Accessible: yes
Description:
Logical size: 5120 MBytes
Current size on disk: 39 MBytes
Type: writethrough
Storage format: VDI
In use by VMs: Test (UUID: 7c484d4f-765b-4c59-a9d1-15c071f9a1ed)
Location: g:\test.vdi


The most interesting thing is that current size on disk is 39 mbytes. Just like it should be if the files are really there, but in windows there is nothing.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Snapshots and Writethrough

Post by Perryg »

These kinds of problems that are reproducible should be reported to bugtracker. You will need to setup an account there as it is on a different system.
It would also help if you can post the ticket number here so other can see the progress, add information, or see the final results.
Be sure to post your log file and this showinfo as an attachment (not in the main body of the ticket) they will need them both.
Demiourgos
Posts: 4
Joined: 20. Mar 2009, 11:00

Re: Snapshots and Writethrough

Post by Demiourgos »

I finally got it. This is the Windows XP guest problem (not VirtualBox) that appears only when restoring snapshots when writethrough or ISCSI (not Virtualbox but normal drive through the iscsi initiator) drive attached.
Windows has a filesystem cache or something like that and the only way to update it is disconnecting the drive and connecting it back. The solution I've found was using a snapshot with non-attached iscsi drive and connecting it right after restore. It's quite inconvinient but works good. Trying to use writethrough drives with WinXp guest will certainly result in corrupted filesystem. So be careful. If someone finds a better way please write here.
jorgensen
Posts: 583
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, LinuxMint

Re: Snapshots and Writethrough

Post by jorgensen »

I also had a problem with snapshots and writethrough data drives, which turned out to be a bug in version 3.1.0.
After updating to 3.1.4 I haven't had a problem with this issue - uses AHCI interface for all XP drives.
maxchen
Posts: 25
Joined: 27. Oct 2010, 15:57
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows

Re: Snapshots and Writethrough

Post by maxchen »

Demiourgos wrote:I finally got it. This is the Windows XP guest problem (not VirtualBox) that appears only when restoring snapshots when writethrough or ISCSI (not Virtualbox but normal drive through the iscsi initiator) drive attached.
Windows has a filesystem cache or something like that and the only way to update it is disconnecting the drive and connecting it back. The solution I've found was using a snapshot with non-attached iscsi drive and connecting it right after restore. It's quite inconvinient but works good. Trying to use writethrough drives with WinXp guest will certainly result in corrupted filesystem. So be careful. If someone finds a better way please write here.
I test this on Win 10 ltsc. Yeah, be careful! The data are there but if you write to disk in a state by restoring to previous snapshot, they may damage the disk.
To disconnect and then connect it back in Win 10: disk manager, offline, then online the disk
For this reason, writethrough is dangerous for snapshots. I would rather using man network driver to share the data between snapshots
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Snapshots and Writethrough

Post by socratis »

@maxchen
Can you please explain to me, what value does an answer have to a semi-resolved topic after 9 years?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply