orphaned disks

This is for discussing general topics about how to use VirtualBox.
Post Reply
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

orphaned disks

Post by edstevens »

VBox 4.2.6 running on Win 7 Pro 64-bit

continuing problems cleaning up after supposedly deleting a vm.

A "vboxmanage list hdds" gives me this disk still associated with the deleted VM:

Code: Select all

UUID:        4d80cd40-d801-4b9c-99e9-1c0d3f96ee32
Parent UUID: base
Format:      VDI
Location:    C:\VMLab\VirtualBoxVMs\vbdwsbd04\asm1.vdi
State:       locked write
Type:        normal
(actually there are 5 of them, but they all show the same properties)

The vm was named 'vbdwsbd04'. Vbox console says it delete the vm. there is no vm by that name listed on the VBox console. The directory "C:\VMLab\VirtualBoxVMs\vbdwsbd04" exists, but is completely empty. I did not delete any files from it myself.

If I try to clean up with 'closemedium':

Code: Select all

C:\Users\estevens\Documents\sql>vboxmanage closemedium disk 4d80cd40-d801-4b9c-9
9e9-1c0d3f96ee32 --delete
VBoxManage.exe: error: Medium 'C:\VMLab\VirtualBoxVMs\vbdwsbd04\asm1.vdi' is loc
ked for writing by another task
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), c
omponent Medium, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "DeleteStorage(progress.asOutParam())" at line 1
166 of file VBoxManageDisk.cpp
VBoxManage.exe: error: Failed to delete medium. Error code Unknown Status 0x80BB
0007
VBoxManage.exe: error: Medium 'C:\VMLab\VirtualBoxVMs\vbdwsbd04\asm1.vdi' is loc
ked for writing by another task
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), c
omponent Medium, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "Close()" at line 1175 of file VBoxManageDisk.cp
p

C:\Users\estevens\Documents\sql>vboxmanage closemedium disk C:\VMLab\VirtualBoxV
Ms\vbdwsbd04\asm1.vdi --delete
VBoxManage.exe: error: Medium 'C:\VMLab\VirtualBoxVMs\vbdwsbd04\asm1.vdi' is loc
ked for writing by another task
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), c
omponent Medium, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "DeleteStorage(progress.asOutParam())" at line 1
166 of file VBoxManageDisk.cpp
VBoxManage.exe: error: Failed to delete medium. Error code Unknown Status 0x80BB
0007
VBoxManage.exe: error: Medium 'C:\VMLab\VirtualBoxVMs\vbdwsbd04\asm1.vdi' is loc
ked for writing by another task
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), c
omponent Medium, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "Close()" at line 1175 of file VBoxManageDisk.cp
p
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: orphaned disks

Post by Perryg »

Use the media manager to release/remove them and then close the VBox manager down for 20 seconds or so to be sure the cache is cleared. Open and see it they still exist.
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

Re: orphaned disks

Post by edstevens »

Essentially same result. dialog responds with "Medium .. is locked for writing by another task"

Details show

Code: Select all

Result Code: 
VBOX_E_INVALID_OBJECT_STATE (0x80BB0007)
Component: 
Medium
Interface: 
IMedium {29989373-b111-4654-8493-2e1176cba890}
Is that value "IMedium" the uuid for the disk? If I redirect the output of 'vboxmanage list hdds' to a txt file, then search for that value (29989373-b111-4654-8493-2e1176cba890) I get no hits.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: orphaned disks

Post by mpack »

edstevens wrote:Is that value "IMedium" the uuid for the disk? If I redirect the output of 'vboxmanage list hdds' to a txt file, then search for that value (29989373-b111-4654-8493-2e1176cba890) I get no hits.
I imagine you are using snapshots, and it's the UUID of the current state VDI.

You need to ensure that the owning VM is shut down (not suspended) before you can release the media.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: orphaned disks

Post by Perryg »

Post your VirtualBox.xml file (as an attachment) Zip it first to be able to clear the restricted file setting.
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

Re: orphaned disks

Post by edstevens »

mpack wrote:
edstevens wrote:Is that value "IMedium" the uuid for the disk? If I redirect the output of 'vboxmanage list hdds' to a txt file, then search for that value (29989373-b111-4654-8493-2e1176cba890) I get no hits.
I imagine you are using snapshots, and it's the UUID of the current state VDI.

You need to ensure that the owning VM is shut down (not suspended) before you can release the media.

I'd say the owning vm is shut down. It doesn't exist. I deleted it from the VBox management console ...
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

Re: orphaned disks

Post by edstevens »

VirtualBox.zip
Hopefully the file VirtualBox.zip is attached. It is the zipped form of c:\users\<username>\.VirtualBox\VirtualBox.xml
(1.3 KiB) Downloaded 18 times
Perryg wrote:Post your VirtualBox.xml file (as an attachment) Zip it first to be able to clear the restricted file setting.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: orphaned disks

Post by Perryg »

I see no mention of 'vbdwsbd04 in the control file. So it must be retaining the information from cache. Did you shut all guests down and then close the VM manager and wait for at least 20 seconds before you opened it again? Maybe a reboot.


The actual VDI files weren't attached to other guests were they?
edstevens
Posts: 85
Joined: 10. Nov 2011, 00:36
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Oracle Linux; MS Server

Re: orphaned disks

Post by edstevens »

Perryg wrote:I see no mention of 'vbdwsbd04 in the control file. So it must be retaining the information from cache. Did you shut all guests down and then close the VM manager and wait for at least 20 seconds before you opened it again? Maybe a reboot.

The actual VDI files weren't attached to other guests were they?
It must have been the cache. When you said 'shutdown for 20 seconds' I thought you were referring to the management console. I'm working with a couple of other VMs, up and down, so there's a good chance I never had a period when *all* VB processes were shut down. In the end, it took a complete reboot of the host, but finally everything is clean.

No, the files weren't attached to any other machines. While I was originally setting these up using instructions to create a sandbox RAC cluster. But I really have no need for RAC, just a standalone ASM - so don't even make those disks shareable. As I understand it, that should also make my snapshots cleaner, with no attached disks NOT getting included in snapshots. And I always shut the vm down before taking or restoring a snapshot.

Thanks again for the assistance. Hopefully I'll get my head wrapped around VB's 'quirks' before much longer.
Post Reply