VirtualBox

Ticket #6832 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

Immutable disks not being reset

Reported by: bksuvaco Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 3.2.0 Keywords: immutable differencing reset
Cc: Guest type: Windows
Host type: Linux

Description

After upgrading 3.1 -> 3.2, VMs using an immutable OS disk are not being reset at all. Completely removing to disk from the media manager, setting it immutable in cli does not fix the problem; although the disk is reported as immutable in various GUI locations, and differencing disks are being created, the differencing disk does not get reset under any conditions I have discovered. I have to manually release the diff. disk and re-attach the immutable base .vdi to simulate a reset.

Attachments

Windows XP-2010-05-30-00-02-31.log Download (68.7 KB) - added by bvitulan 4 years ago.
Windows XP-2010-05-30-00-09-32.log Download (68.4 KB) - added by bvitulan 4 years ago.

Change History

Changed 4 years ago by bvitulan

Changed 4 years ago by bvitulan

comment:1 in reply to: ↑ description Changed 4 years ago by bvitulan

I also am experiencing the same exact issue and have to go through the same process to reset my immutable disk images; although I have a Windows host, running a Windows Guest. I upgraded from Virtualbox 3.1.8 to 3.2.0 and found that immutable disk images are not automatically resetting themselves (they did when I was using Virtualbox 3.1.8, however have since stopped doing so since upgrading to 3.2.0). I have included two log files. The first log file, Windows XP-2010-05-30-00-02-31.log, is a Windows Guest that has its hard disk marked as immutable. Changes were performed and then the Windows Guest was cleanly shut down. The second log file, Windows XP-2010-05-30-00-09-32.log, is the same Windows Guest, however its immutable changes are still intact (they were not automatically wiped). Hopefully there will be something in the two log files that can help determine what the cause of the problem might be.

comment:2 Changed 4 years ago by bvitulan

This problem is still present in Virtualbox 3.2.2 as well. I know that this request has not been looked into yet; I just did not want it to be assumed that this might have been fixed in the maintenance release of 3.2.2 of Virtualbox.

comment:3 Changed 4 years ago by tawalusa

I'm new at this, but thought the following may prove helpful as I am experiencing the same issue described above:

I have confirmed that issue remains with VirtualBox 3.2.4 - Differencing disk (child of immutable disk) is not reset - regardless of the state of the [autoReset="true"] flag in virtualbox.xml.

Example:

cat virtualbox.xml | grep 6d58ca58-c900-4bc6-a273-a2c139b8e0d8

<HardDisk uuid="{6d58ca58-c900-4bc6-a273-a2c139b8e0d8}" location="/Users/me/Library/VirtualBox/Machines/WinXp/Snapshots/{6d58ca58-c900-4bc6-a273-a2c139b8e0d8}.vmdk" format="VMDK" autoReset="true"/>

Indicates the differencing disk should automatically be reset...

vboxmanage showhdinfo 6d58ca58-c900-4bc6-a273-a2c139b8e0d8 Oracle VM VirtualBox Command Line Management Interface Version 3.2.4 (C) 2005-2010 Oracle Corporation All rights reserved.

UUID: 6d58ca58-c900-4bc6-a273-a2c139b8e0d8 Accessible: yes Description: Logical size: 10240 MBytes Current size on disk: 86 MBytes Type: normal (differencing) Storage format: VMDK In use by VMs: WinXp (UUID: 8867d9b9-4877-486a-a480-c64d2e7b79b8) Location: /Users/me/Library/VirtualBox/Machines/WinXp/Snapshots/{6d58ca58-c900-4bc6-a273-a2c139b8e0d8}.vmdk Auto-Reset: off

Although virtualbox.xml indicates autoReset="true", the vboxmanage showhdinfo indicates Auto-Reset: off - and the disk does not get reset on power cycle of the virtual machine.

Also note: vboxmanage modifyhd 6d58ca58-c900-4bc6-a273-a2c139b8e0d8 --autoreset off

Oracle VM VirtualBox Command Line Management Interface Version 3.2.4 (C) 2005-2010 Oracle Corporation All rights reserved.

cat virtualbox.xml | grep 6d58ca58-c900-4bc6-a273-a2c139b8e0d8

<HardDisk uuid="{6d58ca58-c900-4bc6-a273-a2c139b8e0d8}" location="/Users/me/Library/VirtualBox/Machines/WinXp/Snapshots/{6d58ca58-c900-4bc6-a273-a2c139b8e0d8}.vmdk" format="VMDK"/>

The command to turn off the autoreset flag removes the autoReset="true" entry from the virtualbox.xml file and vboxmanage modify hd {uuid} --autoreset on replaces the flag, but regardless of the flag state in virtualbox.xml, the [showhdinfo] command indicates that Auto-Reset is off and the virtual machine will not reset the differencing disk on startup.

Please see forum topic:  http://forums.virtualbox.org/viewtopic.php?f=1&t=31682

Perhaps this is a regression, perhaps a new defect with the autoReset flag. I hope this is helpful.

comment:4 Changed 4 years ago by j4design

I also have the exact same problem. I run VirtualBox on both Ubuntu 10.04 x64 and WinXP Pro x64, both with a WinXP Pro x86 SP3 Guest.

VirtualBox 3.1.8 on Ubuntu used to work with the Differencing disk auto resetting on start-up, however it didn't work at all on the WinXP x64 Host (VBox 3.1.8).

Now that I've upgraded to VirtualBox 3.2.4 on both Ubuntu and WinXP host, auto-resetting feature for the differencing disk has STOPPED working all altogether!

As suggested elsewhere on the forum, the only work around at the moment is to create a Snapshot (A) of the Differencing Disk that is attached to the Immutable Disk in question, then Restore that Snapshot (A) before every startup of the guest VM!

This is definitely a regression bug!

I hope this gets assigned quick and fixed in an upcoming release. Thanks.

comment:5 Changed 4 years ago by bugsbunny

An easier workaround that some may find helpful. (This is geared for a Linux host, you can adapt it for Windows hosts)

Assume the following:

1) Virtual Machine is named SampleVM
2) Snapshots (differencing disks) are located in /home/user/.Virtualbox/Machines/SampleVM/Snapshots/

a) Reset the machine so you have a clean differencing disk. Should be about 40K in size (40.5 on my system at the moment). I'll use the name {differencing}.vdi to refer to this.
b) copy {differencing}.vdi to /home/user/.Virtualbox/Machines/SampleVM/ You now have 2 {differencing}.vdi images, the original plus a copy 1 level higher in the directory structure.
c) create a script as follows (note there's only 2 lines total in the script, in case the display wraps):

#!/bin/bash
cp -f /home/user/.Virtualbox/Machines/SampleVM/*.vdi 
/home/user/.Virtualbox/Machines/SampleVM/Snapshots/ && exec VBoxManage startvm SampleVM

d) Create a launcher to execute the script and use the launcher to start the VM. If you ever want to bypass the "reset" simply start the VM from the VBox console instead of via the script.

comment:6 Changed 4 years ago by czietz

From what I see this is a problem with trunk/src/VBox/Main/MediumImpl.cpp, more specifically the COMGETTER(AutoReset) method, which will always return FALSE if a hard disk has a parent (i.e. is differencing). I think changeset 25152 introduced this bug:  http://www.virtualbox.org/changeset/25152

comment:7 Changed 4 years ago by klaus

Good that you independently arrived at the same conclusion (found this ticket after starting investigation). Regression in 3.2.0, and will be fixed with 3.2.8.

comment:8 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

comment:9 Changed 4 years ago by kixik

  • Status changed from closed to reopened
  • Resolution fixed deleted

Hello, I had and still have problem with immutable disks. Made update from 3.2.6 to 3.2.8 but I didn't find no change. I'm using VirtualBox sdk in Java. If I need to reset disk, I have to call reset before starting. Second problem I have is, in case I have immutable disk attached in two VirtualBox guests. Each have his own differencial disk. Problem is, I'm not able to Login to guest then. It ends on Login screen, although auto lobin is set.

I'm running VirtualBox on Snow Leopard, and my guest is Leopard.

comment:10 Changed 4 years ago by klaus

  • Status changed from reopened to closed
  • Resolution set to worksforme

Just double-checked this, and it definitely works. I have a setup with 20 VMs all pointing to the same immutable disk, and on VM restart all changes are gone.

Without more details (could be that you have snapshots or some such which are documented to disable auto-reset) there's nothing I can do.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use