[Solved](Can not convert VHD into VDI); Can not add a clone; Can not delete a snapshot

Discussions related to using VirtualBox on Linux hosts.

[Solved](Can not convert VHD into VDI); Can not add a clone; Can not delete a snapshot

Postby Plagrö » 15. Mar 2020, 11:41

Hello,

I have one VM that works. Its virtual HD is "Windows 7 laufend.VDI".
But I want to make a second with a different virtual HD with different content. (But use the same settings.)

I did clone the working VM several times and then have deleted them again.
I also have deleted several virtual HD's because I was not able to bring them into VirtualBox.

So at the moment I just have the following virtual HD's:
"14-03-2020.VHD"
"Windows 7 laufend.VDI" (see above)

-> "Windows 7 laufend.VDI" is not from "14-03-2020.VHD". This two have different contents.
-> "14-03-2020.VHD" is the new virtual HD which I want to convert into VDI to use it for a second VM.

-> "14-03-2020.VHD" is identical with "Version 2.VHD" (which I have copied and renamed). But there is no "Version 2.VHD" more there yet.
I simply want to make a VDI from "14-03-2020.VHD"

But this does not work:

Code: Select all   Expand viewCollapse view
$ VBoxManage clonemedium "/home/Konto/VirtualBox VMs/14-03-2020.VHD" "/home/Konto/VirtualBox VMs/Win7 Len 14-03-20.VDI" --format VDI
VBoxManage: error: Cannot register the hard disk '/home/Konto/VirtualBox VMs/14-03-2020.VHD' {def297a8-4b6c-4f83-baed-038508a44608} because a hard disk '/media/D-Konto/HP Personal Media Drive/vhdx mit altem PC gemacht/Version 2.VHD' with UUID {def297a8-4b6c-4f83-baed-038508a44608} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 191 of file VBoxManageDisk.cpp


What can I do?
Last edited by Plagrö on 16. Mar 2020, 08:33, edited 4 times in total.
Plagrö
 
Posts: 37
Joined: 27. May 2018, 14:57

Re: Can not convert VHD into VDI

Postby Plagrö » 15. Mar 2020, 13:29

I was able to solve it with
File-> Manager for virtual medias
Tab HD
remove the corresponding virtual HD's
Plagrö
 
Posts: 37
Joined: 27. May 2018, 14:57

Re: Can not convert VHD into VDI; Can not add a clone

Postby Plagrö » 15. Mar 2020, 14:26

It is still not solved.

In the meantime I tried to clone my old VM.
Actually I do not want to clone it. I simply want to have a second VM with a different virtual HD, but the same settings in the VM.
So I thought, I clone the first VM, and then reomve the virtual HD and import the other virtual HD.

I was trying to clone my old VM, but the following error occured:

Code: Select all   Expand viewCollapse view
It was not available to create a new virtual Machine.

Machine settings file '/home/D-Konto/VirtualBox VMs/Windows 7 Lenovo-Klon/Windows 7 Lenovo-Klon.vbox' already exists.

Fehlercode: VBOX_E_FILE_ERROR (0x80BB0004)
Komponente: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
Callee: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}


But I have only one VM at the moment. (I made a lot of them in the past while I was trying things, but I have all my clones removed. But looks as if the are still anywhere.(?)



Edit:

There is also an other problem.
When I want to delete a snapshot of my old VM the following message appears:

Code: Select all   Expand viewCollapse view
Error deleting the backup point Starting point for Windows 7 Lenovo and Windows 7 Lenovo clone of the Windows 7 Lenovo virtual machine.

Hard disk '/home/D-Konto/VirtualBox VMs/Windows 7 laufend.VDI' has more than one child hard disk (2).

Fehlercode: NS_ERROR_FAILURE (0x80004005)
Komponente: SessionMachine
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}


-> Yes I had made a lot of clones, (becaus I was trying to bring a second VM to work.)
But I have removed all this clones in the meantime. Nevertheless this message appears.


What can I do?
Plagrö
 
Posts: 37
Joined: 27. May 2018, 14:57

Re: (Can not convert VHD into VDI); Can not add a clone; Can not delete a snapshot

Postby Plagrö » 15. Mar 2020, 17:33

I have solved it with the tips from
https://www.virtualbox.org/ticket/7461

I have solved the problem. I shutdowned virtual machine. In Virtual Media Manager on Hard Disk tab there was one main vdi file with two snapshots displayed. First one was 36 KB in size and another was 3 GB in size. I have deleted 36 KB vdi file from Virtual Media Manager. Then from main VBox GUI Snapshots I was able to delete the snapshot. So after deleting the last snapshot the Snapshot GUI displayed I have any snapshot.

At this moment there was no snapshots in GUI, but I have checked the C:\Documents and Settings\[user]\VirtualBox VMs\[vm]\Snapshots folder and there was 5 files with sum of 7 GB of disk. I manually deleted all of this files from Snapshot folder. Then I run a virtual machine and machine runs OK. I can also create snapshots and delete them without any additional problem.


This is still an issue in 4.3.24. My VM has two disk images, one of them with two diff files, but i have only one snapshot.

As a workaround you need to open Virtual Media Manager, expand the disk image node and delete the .vdi file that states Attached to: = Not Attached.


Although I have removed all clones in the GUI, in "/home/Konto/VirtualBox VMs/" they remained.
So I have also deleted all clones in "/home/Konto/VirtualBox VMs/".

I was now able to delete all snapshots and I was able to create a new clone from my old VM. (It's in progress.)

The problem was related to removed clones. Although I had removed clones, there were some connections that were not removed.

So to create my new clone from my old VM, I now decided to make a full clone, so that I will not have any connections to my old VM, although I do not need a copy of my old virtual HD (I only need the settings of my old VM). I will delete the cloned virtual HD as soon as it will be created (this will take more than 2h). Then I will add another new virtual HD to this full clone.
Plagrö
 
Posts: 37
Joined: 27. May 2018, 14:57


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 12 guests