VirtualBox

Ticket #7468 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

clonehd under pause

Reported by: Fulike Owned by:
Priority: major Component: other
Version: VirtualBox 3.2.8 Keywords:
Cc: Guest type: other
Host type: Linux

Description

I'm using this script:

VBoxManage controlvm "test" pause

VBoxManage clonehd /path/test.vdi /backup/test.vdi

VBoxManage controlvm "test" resume


console output (virtualbox 3.2.6,ubuntu 8.04/32bit):

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

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

ERROR: Failed to lock source media '/path/test.vdi' Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Medium, interface IMedium, callee nsISupports Context: "CloneTo(dstDisk, DiskVariant, NULL, progress.asOutParam())" at line 690 of file VBoxManageDisk.cpp Oracle VM VirtualBox Command Line Management Interface Version 3.2.6 (C) 2005-2010 Oracle Corporation All rights reserved.


console output (virtualbox 3.2.8, ubuntu 10.04/64bit):

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

ERROR: Failed to lock source media '/path/test.vdi' Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Medium, interface IMedium, callee nsISupports Context: "CloneTo(dstDisk, DiskVariant, NULL, progress.asOutParam())" at line 693 of file VBoxManageDisk.cpp


This script works fine in virtualbox 3.1.6, ubuntu 8.04/64bit

Change History

comment:1 Changed 4 years ago by Fulike

Hi,

what's up? This problem is still alive!

comment:2 follow-up: ↓ 3 Changed 4 years ago by frank

So where is your patch to fix the problem?

comment:3 in reply to: ↑ 2 Changed 4 years ago by Fulike

Replying to frank:

So where is your patch to fix the problem?

What? My patch? Are you crazy? :)

comment:4 Changed 4 years ago by klaus

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

Just checked both the VirtualBox code and the intended behavior and I cannot spot anything wrong. Images are locked on VM process start and unlocked on VM process termination. You can check the medium state with "VBoxManage list hdds" (the output has been improved in 3.2.x).

I believe the error is in your script - it assumes that pausing a VM will unlock the image files it uses. This isn't the case, and if it ever was I'm glad this bug is fixed. The assumption is quite dangerous anyway - there is absolutely no guarantee that the copy you get this way is a consistent filesystem. You're copying the disk contents of a logically running OS, and that cannot be safe since the filesystem cache can hold lots of data which needs to be written.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use