Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

This is for discussing general topics about how to use VirtualBox.
Post Reply
Tim Wood
Posts: 4
Joined: 26. Nov 2019, 22:33

Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by Tim Wood »

This post echoes the bug report I signed onto, per the suggestion in the report.

VBox 6.1.2; Host: Windows 10 Pro 64, 20GB RAM; Guest: Windows 10 insider 64 + guest adds, 4GB VRAM. Log containing error msg. attached.
Attachments
VBoxSVC.log
(3.95 KiB) Downloaded 15 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by scottgus1 »

Could you please post the output of this command:

CD "drive:\folder\where\virtualbox\is\installed"
vboxmanage showmediuminfo "C:\Users\timwood\VirtualBox VMs\insider\insider-disk1.vmdk'"
Tim Wood
Posts: 4
Joined: 26. Nov 2019, 22:33

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by Tim Wood »

Hi Scott,

Here's what I get:

Code: Select all

C:\Program Files\Oracle\VirtualBox>vboxmanage showmediuminfo "C:\Users\timwood\VirtualBox VMs\insider\insider-disk1.vmdk"
VBoxManage.exe: error: Could not find file for the medium 'C:\Users\timwood\VirtualBox VMs\insider\insider-disk1.vmdk' (VERR_FILE_NOT_FOUND)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.a
sOutParam())" at line 191 of file VBoxManageDisk.cpp

C:\Program Files\Oracle\VirtualBox>vboxmanage showmediuminfo "H:\VM Images\insider\insider-disk1.vmdk"
UUID:           667abd38-4a03-41be-9364-083620a91dca
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       H:\VM Images\insider\insider-disk1.vmdk
Storage format: VMDK
Format variant: dynamic streamOptimized
Capacity:       488617 MBytes
Size on disk:   23781 MBytes
Encryption:     disabled
Child UUIDs:    70702388-fc4a-4309-a753-2b4e3465338f

C:\Program Files\Oracle\VirtualBox>vboxmanage showmediuminfo "C:\Users\timwood\VirtualBox VMs\insider\Snapshots\{70702388-fc4a-4309-a753-2b4e3465338f}.vmdk"
UUID:           70702388-fc4a-4309-a753-2b4e3465338f
Parent UUID:    667abd38-4a03-41be-9364-083620a91dca
State:          created
Type:           normal (differencing)
Auto-Reset:     off
Location:       C:\Users\timwood\VirtualBox VMs\insider\Snapshots/{70702388-fc4a-4309-a753-2b4e3465338f}.vmdk
Storage format: VMDK
Format variant: differencing default
Capacity:       488617 MBytes
Size on disk:   114109 MBytes
Encryption:     disabled
In use by VMs:  insider (UUID: 935c4593-bbcd-4ca1-80dd-89068f01fffe)
The first path you asked for is my destination location, which is expected to be absent. Just included it for completeness. :)
The second (H:\...) path is the passport drive with the base vmdk I wish to move to C:\Users\timwood\VirtualBox VMs\insider.
The third path (Snapshots\...) is the child vmdk of the base vmdk.

Thank you!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by scottgus1 »

Thanks, Tim, for the info. I was looking to see if there was a linked clone involved, at which point moving drives might not be possible.

I looked through the manual but could not discover a way to make a snapshot-like child disk of a main disk without actually making a snapshot. I have seen posts where that somehow happened: Child disks without snapshots. I couldn't figure it out, so I made a guest with a 100GB main disk and a snapshot. The 100GB main disk takes 5.28GB on the host drive, and the snapshot is half a GB. Then I used the Virtual Media Manager to move both the base disk and the snapshot from the 500GB host drive to another host drive with only 44GB free and moved them back. No errors at any time.

Do you get the error every time you try the move?

I see from the guest's .vbox file that the expected location for the virtual drive files is listed in one spot in the .vbox file, in the XML <Media Registry> tags. So if you rebooted your host so no Virtualbox processes were running (disable any auto-start guests btw) you could move the disk file in Explorer then manually edit the .vbox file to show the new location. (note that if any Virtualbox processes are running your edits to .vbox will get overwritten) Keep a backup copy of the present .vbox file to fall back on, as well as leave the original disk file in place, with a slight name change so Virtualbox won't know it's there but you could rename and restore everything if the experiment fails.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by fth0 »

Tim Wood wrote:

Code: Select all

Format variant: dynamic streamOptimized
Capacity:       488617 MBytes
Size on disk:   23781 MBytes
Just a small hint: The streamOptimized VMDK variant is a compressed format. I could imagine that the uncompressed size also plays a role.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by mpack »

Yes. This indicates that the OP took a compressed (and therefore inherently read-only) VMDK that was included in an OVF/OVA appliance and manually attached it directly to a VM. For some reason the devs thought it would be smart to silently accept this error and "correct" the situation by creating a difference image to receive the writes.

I've always thought that this feature is a bad idea. I can't think of any situation where this situation would be desirable. For one thing there will be considerable overhead in having to decompress for every disk access, it's not as if the zlib functions are optimized for that.

Happily the fix should be relatively easy: clone the VM, preserve the current state only.
Tim Wood
Posts: 4
Joined: 26. Nov 2019, 22:33

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by Tim Wood »

@fth0: I always thought the main explanation for that size difference was sparse allocation in the vmdk file; lots of "missing" zero-blocks. I doubt that 23kMB dynamic would explode to 488kMB uncompressed on its own...?

@mpack: Simple, effective idea! An 8-minute clone job on the SSD saves 30-60 of fiddling... thanks!
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Attempt to Move Virtual Media Fails with VERR_NO_MEMORY

Post by fth0 »

Tim Wood wrote:@fth0: I always thought the main explanation for that size difference was sparse allocation in the vmdk file; lots of "missing" zero-blocks. I doubt that 23kMB dynamic would explode to 488kMB uncompressed on its own...?
Sure, many virtual disk formats and variants thereof use sparse allocation, for example the dynamically allocated standard variant of the VDI format. But the streamOptimized VMDK variant uses data compression, is intended for low bandwidth network streaming, and doesn't allow random read/write access. I could imagine that copying this format means uncompressing it first, even if it is only temporarily.
Post Reply