parent UUID of the medium does not match

Allgemeine Diskussionen über den Einsatz von VirtualBox.
VM-F4n
Posts: 181
Joined: 25. Oct 2015, 12:53
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win7 64-Bit

Re: parent UUID of the medium does not match

Post by VM-F4n »

You can also use a snapshot without the original VDI file to create a working new VDI by using clonehd over an empty filesystem set up in the right structure and formatted the same.

Quelle: https://www.treshna.com/rebuilding-virt ... snapshots/
Hätte ich gerne probiert, aber ich komme mit der Syntax nicht klar! :roll:

Code: Select all

VBoxManage clonehd <uuid|inutfile> <uuid|outputfile> [--format VDI|VMDK|VHD|RAW|<other>] [--variant Standard,Fixed,Split2G,Stream,ESX] [--existing]
Wurde ja ersetzt durch

Code: Select all

VBoxManage clonemedium      [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>

                            [--format VDI|VMDK|VHD|RAW|<other>]
                            [--variant Standard,Fixed,Split2G,Stream,ESX]
                            [--existing]
Quelle: https://www.virtualbox.org/manual/ch08. ... lonemedium

Woher nehme ich aber eine neue UUID und was muss ich denn nun alles angeben?
Würde die neue VDI gerne in einem neuen Ordner haben, so dass, wenn ich diese als vorhandene Festplatte angebe, sich darin alle Dateien befinden die VirtualBox erzeugt.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: parent UUID of the medium does not match

Post by Martin »

Für einen neuen Clone gibt's Du den Zieldateinamen inklusive vollem Pfad an.
Die Alternative mit UUID gilt für den Fall, dass Du mit "--existing" eine bereits bestehende VDI überschreiben willst und lieber die UUID als den Dateinamen verwenden willst.
Die restlichen Paramter sind optional, Default ist das Format VDI.
VM-F4n
Posts: 181
Joined: 25. Oct 2015, 12:53
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win7 64-Bit

Re: parent UUID of the medium does not match

Post by VM-F4n »

@Martin
Hast du dafür bitte ein Beispiel? :oops:

So in etwa?

Code: Select all

VBoxManage clonemedium disk uuid_ausgeschrieben|name_der_snapshot.vdi neuer_vdi_name.vdi
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: parent UUID of the medium does not match

Post by Martin »

Der "|" im Beispiel steht für "oder" ;)
Also entweder eine UUID oder den vollen Dateinamen angeben.
Die { ] geben an, dass der jeweilige Paramter optional ist, nur die nicht eingeklammerten werden zwingend benötigt.

Also wäre minimal nötig
VBoxManage clonemedium Pfad/Name_Quelldatei Pfad/Name_Zieldatei
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: parent UUID of the medium does not match

Post by scottgus1 »

Just so we don't go down the rabbit hole and get lost:
You can also use a snapshot without the original VDI file
This quoted statement is false. You need the entire chain of disk files starting at the base disk to make a new disk from a snapshot chain. You cannot skip links in the chain.

If one tries to cobble together a chain by editing the UUIDs to fake out the chain-checker, then the data will be corrupted.

The only hope for good data is a complete chain with no missing disk files from the base disk to the snapshot one wants to clone.
MarkFalk
Posts: 29
Joined: 11. Mar 2021, 19:16

Re: parent UUID of the medium does not match

Post by MarkFalk »

Ich habe die gleiche Fehlermeldung (viewtopic.php?f=5&t=102155, zur Beschreibung der IT-Situation siehe dortige Angaben), allerdings ohne (teil)defekte HD, einfach so. Und zwar häufig, eben wieder, es ist zum Verrücktwerden. Gestern konnte ich auf die VM noch normal zugreifen, habe sie dann wie immer (da ich noch immer in der Testphase bin und noch an dem Problem knabbere, eine sehr langjährige und "komplexe" Win7-32-Installation in eine VM zu überführen, um aus dem neuen System bei Bedarf schnell darauf zurückgreifen zu können) mit der Option der Wiederherstellung des letzten Sicherungspunkts beendet - und heute kommt die Fehlermeldung und überhaupt nichts geht mehr.

Da es anscheinend - jedenfalls bei mir - anscheinend "nur" um falsche UUID-Einträge geht habe ich mal entsprechend gegoogelt und bin ebenfalls auf dies hier
viewtopic.php?f=6&t=79896
gestoßen. Dort wird anhand der UUID des eigentlichen VM-files der wohl falsche Eintrag im Snapshot korrigiert.

Das konnte ich so leider nicht ausprobieren, weil ich nicht weiß, welcher der vielen .VHD-files, die ich für meine Versuche hier habe, das richtige ist (nein, leider nichts notiert notiert und meine Namensvergabe ist etwas inkonsistent). Während bei funktionierenden VM in den Massenspeichern-Einstellungen der Name der .VHD-Datei eingetragen ist, steht bei den nicht funktionierenden VM lediglich eine (natürlich nicht passende) UUID. Die jedenfalls mir nicht weiterhilft.
Aber da die Fehlermeldung besagt, daß der Eintrag in der snapshot-Datei nicht der freundlicherweise zugleich genannten UUID
"of its parent medium stored in the media registry ('C:\Users\DrK\.VirtualBox\VirtualBox.xml')"
entspreche, habe ich bei einer der nicht gelöschten älteren Problemfälle einfach frech die in der Fehlermeldung freundlicherweise angegebene UUID des parent-mediums verwendet und in die shapshot-Datei geschrieben.
Allerdings paßt diese UUID NICHT zu der UUID, die in der Datei VirtualBox.xml zu dieser VM eingetragen ist. Die dort eingetragene UUID ist aber jedenfalls auch nicht richtig, denn versuchsweise habe ich zunächst diese UUID ausprobiert - damit funktionierte es nicht.

Aber wie gesagt habe ich danach die parent-UUID aus der Fehlermeldung verwendet und siehe da, damit ließ sich die VM ohne Fehlermeldung starten. Zwar läuft diese VM nicht durch, das Win7 hängt sich während des Bootens auf, auch im abgesicherten Modus, aber das kann durchaus auch schon bei der letzten Benutzung vor ein paar Tagen der Fall gewesen sein (alle aktuell mit dem falsche-UUID-Fehler nicht mehr startende VM habe ich leider schon gelöscht und kann diese Rettungsmethode daher nicht an im übrigen definitiv einwandfrei laufenden VM ausprobieren).
Nach dieser Änderung wird in den Einstellungen auch wieder der Dateiname der .VHD-Datei angezeigt und, welch Wunder ;-), die verwendete UUI (aus der Fehlermeldungen) ist deren.

Es bleibt zum einen die Frage, ob nicht auch der Eintrag in der Datei VirtualBox.xml entsprechend korrigiert werden muß. Ich vermute nicht, denn bei einer anderen funktionierenden VM paßt deren UUID nicht zu dem entsprechenden Eintrag in der Datei VirtualBox.xml .

Und zum anderen stellt sich dabei die Frage nach dem Warum - was ist die Ursache für diese falschen Einträge, wie lassen sie sich vermeiden? Zufälligerweise (oder auch nicht) hat sich das eben wiederholt, als sich beim Ausprobieren der VM nach der Korrektur diese beim Booten auch im abgesicherten Modus aufgehängt hat ("Bitte warten" erschien unten und das war´s), und das läßt sich definitiv reproduzieren:

Ich beendete die VM mit "Datei/Schließen/die VM ausschalten "und/mit der Option "Zurückkehren auf Sicherungspunkt" -und peng, danach war der parent-UUID-Eintrag in der - allerdings nunmehr eine andere Bezeichnung tragenden -snapshot-Datei erneut falsch. Das kann ich jederzeit - mit dieser VM und diesem snapshot - wiederholen.
Das gleiche passiert, wenn ich einfach ausschalte oder den aktuellen Zustand der VM speichere und dann vom VB-Manager aus den Sicherungspunkt wiederherstelle. Sobald man das macht wird die {UUID}.vhd-snapshot-Datei neu geschrieben, erhält eine neue UUID-Dateibezeichnung und der interne Verweis auf die UUID der parent-VM-Datei wird gelöscht. Ersetze ich nun vor dem Start diesen Null-Wert durch die richtige parent-UUID läßt sich die VM zu diesem Sicherungspunkt ohne Fehlermeldung starten.

Da dies aber nicht bei jeder Sicherung auftritt kann man nur raten, was die eigentliche Ursache ist. Denn anscheinend hängt das mit der snapshot-Datei zusammen, vielleicht den Umständen deren Erzeugung. Keine Ahnung. Vielleicht ist das bei der aktuellen Version behoben; ich muß, da mein PC kein VT kann, die ältere Version 6.0.24 verwenden.

Nachtrag: Habe eben gesehen, daß es in dem schon älteren Fred viewtopic.php?f=5&t=101014 wohl um die gleiche Problematik geht. Allerdings verstehe ich die dort gefundene Lösung nicht.
VM-F4n
Posts: 181
Joined: 25. Oct 2015, 12:53
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win7 64-Bit

Re: parent UUID of the medium does not match

Post by VM-F4n »

MarkFalk wrote: Da dies aber nicht bei jeder Sicherung auftritt kann man nur raten, was die eigentliche Ursache ist. Denn anscheinend hängt das mit der snapshot-Datei zusammen, vielleicht den Umständen deren Erzeugung. Keine Ahnung. Vielleicht ist das bei der aktuellen Version behoben; ich muß, da mein PC kein VT kann, die ältere Version 6.0.24 verwenden.
Bei mir trat das Problem auf weil sich der PC aufgehängt hat (Platte hat defekte Sektoren; wusste ich vorher nicht) und den Schreibvorgang somit nicht beenden konnte!
Seit dem warte ich immer 60 Sekunden nachdem ich die VM beendet habe, damit er auch wirklich alles auf die Platte schreiben kann, bevor ich den PC herunterfahre.
Das "Problem" ist bei keiner VirtualBox Version behoben (und wird es voraussichtlich nicht, da es ja kein "Problem" ist; er braucht eben so lange zum Schreiben der Datei/en)!
Das hatte ich damals schon einmal - glaube mit v4 - und eben jetzt mit v6 wieder einmal.
Für mich sind Snapshots - ab sofort - Geschichte.
Lieber verwende ich das CloneVDI, anstelle von Snapshots.

Auch werde ich bei Gelegenheit doch einmal Proxmox ausprobieren.
MarkFalk
Posts: 29
Joined: 11. Mar 2021, 19:16

Re: parent UUID of the medium does not match

Post by MarkFalk »

VM-F4n wrote: Bei mir trat das Problem auf weil sich der PC aufgehängt hat (Platte hat defekte Sektoren; wusste ich vorher nicht) und den Schreibvorgang somit nicht beenden konnte!
Seit dem warte ich immer 60 Sekunden nachdem ich die VM beendet habe, damit er auch wirklich alles auf die Platte schreiben kann, bevor ich den PC herunterfahre.
Das "Problem" ist bei keiner VirtualBox Version behoben (und wird es voraussichtlich nicht, da es ja kein "Problem" ist; er braucht eben so lange zum Schreiben der Datei/en)!
Was hat das eine mit dem anderen - dem falschen Eintrag in der snapshot-Datei - zu tun?
Bei mir gab es keinerlei Plattenprobleme, kein Absturz des Hosts, also kein irreguläres Beenden von VB an sich. Das einzige, was mehrfach auftrat, war, daß ich die VM selbst "kalt" beenden mußte, also nicht über Datei/schließen die VM "regulär" beenden konnte (bedingt dadurch, daß ich einen bestehende Win7-Installation in eine VM überführen wollte und dies zunächst in vielen Fällen dazu führt, daß das Win7 in der VM abstürzte). Allerdings weiß ich heute nicht mehr, ob dies bei der betreffenden VM zu diesem Problem führte. Definitiv aber aber bei einigen der Problemfälle kein "irreguläres" Beenden der VM erforderlich.
Für mich sind Snapshots - ab sofort - Geschichte.
Lieber verwende ich das CloneVDI, anstelle von Snapshots.
Wie schon geschrieben bin ich völliger Neuling hinsichtlich VB, ich will also nicht klugscheißen - aber Snapshots haben doch eine andere Funktion und Bedeutung als ein Klon. Ein Klon ist eine Art Sicherungskopie, die aber zusätzlich, parallel zum Original verwendet werden kann.
Und welchen Vorteil hat dieses CloneVDI gegenüber der vom VB -Manager zur Verfügung gestellten Klon-Funktion? Clone-VDI kopiert nur die parent-Datei ohne Berücksichtigung des aktuellen Stands, wie er sich aus evtl. snapshots ergibt (wenn ich die Beschreibung der Funktion/Wirkung der snapshots richtig verstanden habe), die Klone-Funktion des VB-Managers kopiert hingegen die gesamte VM-Installation und bindet sie zugleich ein.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: parent UUID of the medium does not match

Post by scottgus1 »

MarkFalk wrote:what advantage does this CloneVDI have over the clone function provided by the VB Manager?
CloneVDI was provided by Mpack when the Virtualbox manager only had command-line commands that did not cover all the features CloneVDI has. CloneVDI was a tremendous leap over the Virtualbox provisions of the time.

CloneVDI also never changes the original files, whereas Virtualbox does change the originals, with the possibility of a host or Virtualbox glitch damaging the original, with resulting data loss.

CloneVDI does not require the zero-fill sdelete step to compact a disk file.
MarkFalk wrote:Clone-VDI only copies the parent file without taking into account the current status, as it results from possible snapshots (if I have understood the description of the function / effect of the snapshots correctly)
CloneVDI does not account for the VM hardware changes per snapshot that snapshots also handle. But CloneVDI does combine all data contained in a complete snapshot chain into a new clone disk that can be used in a new VM.

Snapshots do serve a purpose, but can also make a VM more delicate.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: parent UUID of the medium does not match

Post by scottgus1 »

Mark, your posts are long and detailed, and it is difficult for me, personally, to follow the problem. Can you please condense the problem to two or three sentences and an error message?
MarkFalk
Posts: 29
Joined: 11. Mar 2021, 19:16

Re: parent UUID of the medium does not match

Post by MarkFalk »

scottgus1 wrote:Mark, your posts are long and detailed, and it is difficult for me, personally, to follow the problem. Can you please condense the problem to two or three sentences and an error message?
Description of the problem incl. error message: See post viewtopic.php?f=5&t=102155

Problem: Suddenly VMs with snapshots (Win7-32, Win98-32, WinXP-32) can not be opened because the "Parent UUID {00000000-0000-0000-0000-000000000000} of the" snapshot-medium don´t match the UUID "of its parent medium stored in the media registry ('C:\Users\DrK\.VirtualBox\VirtualBox.xml')".

I don´t know and can´t see a reason for this sudden corruption of the snapshot-file. Neither the harddisk has problems nor the host-system was shutdown irregular. Maybe - I don´t remember - sometimes I had to kill the VM via the host´s taskmanager due to internal problems of the guest (I wanted to convert existing old Win7/Win98-systems into VMs and original - installed - driver caused problems while booting the VM), but in the majority the VM was ended regular and w/o problems. I am not 100% sure because I did not check this every time after closing a VM but I have received the impression that after closing the VM the files are o.k. but get corrupted later w/o opening the VM or touching the files manually.

The ad-hoc-solution I found after reading viewtopic.php?f=6&t=79896 is as described above simply using the command:

vboxmanage internalcommands sethdparentuuid "(path to corrupted snapshot-file)" {(UUID of parent)}

and using the parent´s UUID which is shown in the error message. This works until now in every case (ca. 10 x) this problem occured.

But this does not solve the cause of problem. There must be a reason for this and until knowing this cause and how to avoid the in general advantgeous usage of snapshots is very risky.
MarkFalk
Posts: 29
Joined: 11. Mar 2021, 19:16

Re: parent UUID of the medium does not match

Post by MarkFalk »

scottgus1 wrote:CloneVDI also never changes the original files, whereas Virtualbox does change the originals, with the possibility of a host or Virtualbox glitch damaging the original, with resulting data loss.
Do you are sure? I have checked this with cloning a VM and the original .VHD-file seems to be unchanged, the timestamp is not changed.
CloneVDI does not require the zero-fill sdelete step to compact a disk file.
There are existing 2 programms called CloneVDI:
https://www.freeware.de/download/clonevdi/
and
viewtopic.php?t=22422
I assume we are talking about the second one.
CloneVDI does not account for the VM hardware changes per snapshot that snapshots also handle.
Sorry, I don´t understand. When the complete snapshot-cain is combined into a new VM-file - how can this exclude certain changes of snapshort files?
But CloneVDI does combine all data contained in a complete snapshot chain into a new clone disk that can be used in a new VM.
My mistake. When looking for CloneVDI at first I found the first one (by Ottoturm) - and also did not test complete. Now I realize that the "real" CloneVDI does not copy the original VM-file only and after reading the manual (v.4.01) I also know how to perform the complete clone. But it clones .VDI only - means: It accepts as input also .vhd, but it generates .vdi only, doesn´t matter the given extension.
But the first CloneVDI (by Ottosturm) does a full clone, too, when choosing the newest snapshot-file; the original VM-file is selected automatically, whereever it is (not limited to the parent-directory as with the second CloneVDI ). And it clones and generates .VHD-files. The main difference to the second CloneCDI is, that it is "only" a GUI-frontend of VB´s vboxmanage.exe.
Snapshots do serve a purpose, but can also make a VM more delicate.
As said I am a newbie in VB but when I realized that using the snapshot-feature results in "splitting" the VM in an endless chain of files which depend on each previous file I doubt that this is the perfect solution. And the problems that occur as discussed here confirm this doubts. On the other hand - when a files get damaged it doesn´t matter if it is one single VM-file or one of a dozend files of a VM.
VM-F4n
Posts: 181
Joined: 25. Oct 2015, 12:53
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win7 64-Bit

Re: parent UUID of the medium does not match

Post by VM-F4n »

VM-F4n wrote:So, habe nun eine HDD und darauf Win 10 als Host installiert.
Nun bekomme ich an diesem PC die VM aber garnicht zum Laufen, auch nicht mit dem obigen "Trick". :(
...
Im Moment nutze ich also wieder den 4 Kerner, da ich da wenigstens die VM starten kann... würde aber gerne wieder auf meinen schnelleren 6 Kerner wechseln. :?
Ich bekomme es einfach nicht hin :x , dass ich die VM, welche ich z.Zt. auf dem 4 Kerner nutze auf dem 6 Kerne zum Laufen bekomme. :(
Egal ob ich 2 Minuten warte, dass die externne SSD, auf welcher die VM's liegen, nicht mehr blinkt, ich kann die VM einfach nicht starten!
Martin wrote:Wenn beteiligten Basis- und Snapshot-VDIs nicht identisch in der Media Registry der VirtualBox.xml auf den beiden PCs registriert sind, wirst Du beim Wechsel zwischen den PCs immer Probleme haben.
Eventuell könnte es helfen, die VM auf beiden PCs zu deregistrien, alle beteiligten VDIs aus der Media Registry zu entfernen (nicht löschen) und danach auf beiden PCs die VM mit der aktuellen .vbox Datei wieder zu registrieren.
Wenn Du einen neuen Snapshot erstellst, oder einen löschst, ist wahrscheinlich die gleiche Aktion wieder nötig, um die Registrierung wieder synchron zu bekommen.
Wenn das nur so einfach wäre. :roll:
Sobald ich die VM aus VirtualBox entferne, dann sieht man auch nichts mehr davon in der Media Registry. :shock:
Irgendwie ja logisch, denn was nicht vorhanden und nicht benutzt wird, darauf kann auch nicht zugegriffen werden.
Bleibt jetzt nur ein Vergleich der VirtualBox.xml auf beiden Rechnern.

Macht es eigentlich etwas, dass auf dem 4 Kerner v6.1.16 und auf dem 6 Kerner v6.1.18 installiert ist? :?:
Dürfte doch egal sein?!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: parent UUID of the medium does not match

Post by scottgus1 »

Thanks, Mark, for the summary! It helps me understand things better.
MarkFalk wrote:There are existing 2 programms called CloneVDI:
https://www.freeware.de/download/clonevdi/
and
viewtopic.php?t=22422
I assume we are talking about the second one.
Correct. I have no idea about the first one. The second one, Mpack's CloneVDI, is the one we recommend on the forum.
MarkFalk wrote:
scottgus1 wrote:CloneVDI also never changes the original files, whereas Virtualbox does change the originals
Do you are sure?
I could be wrong. I had read this, but the process may have been changed.
MarkFalk wrote:When the complete snapshot-chain is combined into a new VM-file - how can this exclude certain changes of snapshot files?
A snapshot consists of a disk file and a block of XML in the VM's .vbox file. Mpack's CloneVDI was written to only clone the chain of disk files for the purpose of making a new VM, not for using the clone in the original VM. This CloneVDI does not read the .vbox xml.
MarkFalk wrote:Suddenly VMs with snapshots (Win7-32, Win98-32, WinXP-32) can not be opened because the "Parent UUID {00000000-0000-0000-0000-000000000000} of the" snapshot-medium don´t match the UUID "of its parent medium stored in the media registry ('C:\Users\DrK\.VirtualBox\VirtualBox.xml')".
This does not sound like a failure in the snapshot disk, but rather in the VM's .vbox file or the Virtualbox.xml file. Both of these files get re-written at various times during the running of Virtualbox and the VM, and a host glitch or a bug in Virtualbox might interfere with the re-write. The existing files get renamed to a '-prev' version, so it may be possible to recover the failed VM by deleting the bad file and renaming the -prev file back. But you'd have to do this right away, so the bad file doesn't get renamed to -prev too and replace the former good file. I doubt that changing the VM's disk files is necessary.

I have not had this error happen to me, because I don't use snapshots. The next time it happens to you, please don't do anything to fix it. Instead, please zip and post Virtualbox.xml, the VM's .vbox file, and a directory listing of the VM's folder and subfolders. Also please post a 'vboxmanage showmediuminfo' for each disk file found in the VM's folder and subfolders. We might be able to find the proble,.
MarkFalk
Posts: 29
Joined: 11. Mar 2021, 19:16

Re: parent UUID of the medium does not match

Post by MarkFalk »

scottgus1 wrote:Thanks, Mark, for the summary! It helps me understand things better.
.

You´re welcome. It´s me who is asking for help.
I doubt that changing the VM's disk files is necessary.
When the command

vboxmanage internalcommands sethdparentuuid "(path to corrupted snapshot-file)" {(UUID of parent)}

in fact touches the VM-files only then this is the only way to solve the problem. And it is a fact that the error-message are "true". I have checked the UUID: In the snapshot-file the UUID of the parent is missing (zero-values) and after performing the command the UUID is corrected to the parent UUID and the VM is working.
Last edited by MarkFalk on 27. Mar 2021, 16:56, edited 1 time in total.
Post Reply