After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Discussions related to using VirtualBox on Windows hosts.
Post Reply
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by hangerglide »

I cloned a windows 10 guest and the cloned vm fails to start with VERR_VD_IMAGE_READ_ONLY (full msg below). I've read a fair amount about how the VERR_VD_IMAGE_READ_ONLY error that can happen but don't find a way forward for myself. The vdi file is not marked read only. The login I used to clone and my current login are one and the same; domain level admin. I've cloned successfully in the recent past. There is plenty of disk space. Any ideas?

Originally this was the error:
Failed to save the settings of the virtual machine vm-o365x64 to E:\virtualbox\msmachines\vm-o365x64\vm-o365x64.vbox.
Failed to replace 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vbox' with 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vbox-tmp': -38 (Access denied.).
F:\tinderbox\win-6.0\src\VBox\Main\src-server\MachineImpl.cpp[10020] (long __cdecl Machine::i_saveSettings(bool *,int)).

Result Code: E_FAIL (0x80004005)
Component: SessionMachine
Interface: IMachine {5047460a-265d-4538-b23e-ddba5fb84976}
That full error mentions F:\tinderbox\win-6.0\src\VBox\Main\src-server\MachineImpl.cpp; I don't have such a folder, as far as I can tell.
I then took a look at the file perms and adjusted the owner from my local admin account to domain admins. Now the error is
Failed to open a session for the virtual machine vm-o365x64.
Failed to open image 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vdi' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).
AHCI: Failed to attach drive to Port0 (VERR_VD_IMAGE_READ_ONLY).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
I've shut down and booted the windows 7 host 2x.
Last edited by socratis on 13. Sep 2019, 12:22, edited 1 time in total.
Reason: Enclosed the information in [quote][pre] tags for better readability
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by scottgus1 »

F:\tinderbox on is Virtualbox's development computer. The error path is to tell the developers where in their files to look for info if the error happens on their computer.

The first error says:
Failed to replace 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vbox' with 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vbox-tmp': -38 (Access denied.).
Virtualbox does not edit the guest's .vbox file directly. It writes a new .vbox file, calls it .vbox-tmp, then when writing is successful, attempts to delete the old .vbox file and rename the new .vbox-tmp to just .vbox. This delete & rename ('replace') is apparently what failed.

After you adjusted file permissions you get the READ_ONLY error on the vdi. Which file did you adjust permissions on? Did you adjust permissions on the folder too?
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by hangerglide »

Thank you for the quick reply. I only adjusted ownership of the vdi, because the forum post that mentioned that it might help was specific about that file.

Now I've tried two more things. #1 made my account the owner of the vm folder and #2 change that folder so that read only is false, with apply to child files and folders. I'm not sure if the folder was read only before this time or if the ownership change made the change. Anyways, still fails with the same error.

edit - I've discovered that the read only setting rematerialized. I tried to remote it again, and it looks like it takes, but after I close the dialog, apon inspection the setting is still there.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by hangerglide »

I'm going to deep six this cloned vm and create a new one from scratch. Maybe there is something weird going on with my workstation. I plan to retire it in a few months; it has other signs of being somewhat out of kilter.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by mpack »

I very much doubt that the problem was due to cloning. These problems arise on Windows hosts when you transport the files on read-only media, on CDs say, and the problem has nothing to do with VirtualBox per se.

Windows sees each file on an ISO filesystem as read only. It "helpfully" preserves this attribute when you copy the file from the CD to your hard disk.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by hangerglide »

I'm not pursuing this cloned vm any more, it's gone. But it is a fact that it was cloned to the same host, and that it had these issues immediately. It wasn't moved to another machine.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by scottgus1 »

hangerglide wrote:I only adjusted ownership of the vdi, because the forum post that mentioned that it might help was specific about that file.
From your first post, your original error was not the read-only error.
hangerglide wrote:Originally this was the error:
Failed to save the settings of the virtual machine vm-o365x64 to E:\virtualbox\msmachines\vm-o365x64\vm-o365x64.vbox...."
....
I then took a look at the file perms and adjusted the owner from my local admin account to domain admins. Now the error is....VERR_VD_IMAGE_READ_ONLY
It appears that your tweaking of permissions caused the read-only error.

As mentioned above:
scottgus1 wrote:Virtualbox does not edit the guest's .vbox file directly. It writes a new .vbox file, calls it .vbox-tmp, then when writing is successful, attempts to delete the old .vbox file and rename the new .vbox-tmp to just .vbox. This delete & rename ('replace') is apparently what failed.
I deduce this from this part of the original error:
Failed to replace 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vbox' with 'E:\virtualbox\machines\vm-o365x64\vm-o365x64.vbox-tmp': -38 (Access denied.).
The error does not say what cause the rename & replace to fail, unfortunately.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: After clone, new vm shows VERR_VD_IMAGE_READ_ONLY

Post by hangerglide »

Yeah Scott thanks for your help on this. I'm sure your deduction is correct. As I mentioned before I think this workstation may have OS level issues, and maybe that's what threw an unusual wrench into the works.
Post Reply