Installing existing VM's in new installation after crash???

Discussions related to using VirtualBox on Windows hosts.
Post Reply
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Installing existing VM's in new installation after crash???

Post by markanderson »

I recently experienced critical error with VirtualBox: "Failed to acquire the VirtualBox COM object. The application will now terminate."

In an attempt to fix problem I reinstalled VirtualBox and experienced the same issue. After a bit of Googling I deleted two files in the .VirtualBox directory: VirtualBox.xml-prev and VirtualBox.xml which fixed the problem and is what I should probably have done before reinstalling s/ware.

My problem now is that I am not sure about how to access the existing virtual machines that I had created before the crash and reinstallation of software. In my C:\Users\XXXXXXXX\VirtualBox VMs directory I have three previosuly created virtual machines..... a full windows installation and two linked clones. Can anyone guide me as to how I should go about loading these machines into the new installation of VirtualBox??? Any help much apppreciated.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing existing VM's in new installation after crash???

Post by socratis »

markanderson wrote:I deleted two files in the .VirtualBox directory: VirtualBox.xml-prev and VirtualBox.xml which fixed the problem
... and it created a new one by un-registering all your VMs. And you've lost your VirtualBox preferences as well, but not your VM settings...

You need to use the menu "Machine" » "Add..." and navigate to each of your VMs' folders and choose the corresponding .vbox file for each VM. Start first with your main VM, and then add the clones, because they're depending on the main one being registered appropriately.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

I have tried what was suggested and get the following error when attempting to load the primary VM:

Failed to open a session for the virtual machine win-10-refz.

Could not open the medium 'C:\Users\XXXXXXX\VirtualBox VMs\win-10-refz\win-10-refz-disk1.vmdk'.

VD: error VERR_FILE_NOT_FOUND opening image file 'C:\Users\XXXXXXX\VirtualBox VMs\win-10-refz\win-10-refz-disk1.vmdk' (VERR_FILE_NOT_FOUND).

Result Code: E_FAIL (0x80004005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}


Any suggestions as to where I go from here???

Thanks
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing existing VM's in new installation after crash???

Post by socratis »

markanderson wrote:Any suggestions as to where I go from here???
Yes. Read the error message again, don't just simply copy/paste it in the forums. The message says that your .vmdk file is not where it's supposed to be. So, the question is, where's that file?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

Sorry for cut and pasting.... I thought that would be useful and the obvious thing to do???

There is three .vmdk files residing in the Virtual Box VMs\Snapshots directory of the Primary VM (I assume these are the files for the Primary VM and two linked clones?). There is other .vmdk files resideing in the Snapshots directory of the other two linked clones. All .vmdk files have meaningless (corrupt?) names, eg: {fcbf5749-5736-4a08-a4af-baf5be14b98e}. Just wondering if the situation is salvageable???

Sorry if I am asking dumb questions, but I'm really not familiar with the workings of VirtualBox.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing existing VM's in new installation after crash???

Post by socratis »

markanderson wrote:Sorry for cut and pasting.... I thought that would be useful and the obvious thing to do???
Well, I didn't mean that it was wrong to copy/paste the error message; au contraire. What I meant was that you didn't read carefully the message that was warning you about the absence of the .vmdk.
markanderson wrote:There is other .vmdk files residing in the Snapshots directory of the other two linked clones.
I need you to open a Command Prompt, navigate to the directory where your VMs are, and generate a listing of that directory and its sub-directories. Copy/Paste the whole output, and if you can enclose it in the

Code: Select all

 tag. And please, do NOT obfuscate the answer! So, in summary:
[list][pre][color=#A000A0]cd "C:\Users\XXXXXXX\VirtualBox VMs\win-10-refz"
dir /s[/color][/pre][/list]
Also, there should be a ".vbox" file in the "C:\Users\XXXXXXX\VirtualBox VMs\win-10-refz" directory. [color=#A00000][b][u]ZIP it[/u][/b][/color] and attach it (see the "Upload attachment" tab below the reply form).

BTW, you didn't mention your host, guest or VirtualBox version. Use the complete version numbers (including the build numbers) to identify your software:
[list]
[*][i]"OSX"[/i] isn't enough, [i]"OSX 10.9.5 build 13f1911"[/i] is much better.
[*][i]"Win10"[/i] isn't enough, [i]"Win10 1607, build 14393.969"[/i] is much better.
[*][i]"Ubuntu"[/i] isn't enough, [i]"Ubuntu 16.04, 4.4.0-59-generic #80-Ubuntu SMP"[/i] is much better.
[*][i]"The latest VirtualBox"[/i] isn't enough, [i]"VirtualBox 5.1.22 r115126"[/i] is much better.[/list]
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

Host OS: Windows 10 Pro ver 1709 (OS Build 16299.125)
Virtual Box Version 5.2.2 r119230 (Qt5.6.2)
Guest OS: Windows 10 Pro (ver ?)

Here's a listing of of VirtualBox VMs directory:

Code: Select all

 Volume in drive C has no label.
 Volume Serial Number is 8A70-8835

 Directory of C:\Users\David Barratt\VirtualBox VMs

15/12/17  21:59    <DIR>          .
15/12/17  21:59    <DIR>          ..
12/12/17  08:19    <DIR>          clone-test
15/12/17  21:59                 0 file1.txt
15/12/17  02:21    <DIR>          win-10-refz
11/12/17  17:02    <DIR>          Win-10-work-01
               1 File(s)              0 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\clone-test

12/12/17  08:19    <DIR>          .
12/12/17  08:19    <DIR>          ..
12/12/17  08:19                 0 clone-test.vbox
12/12/17  01:21             4,636 clone-test.vbox-prev
12/12/17  08:16    <DIR>          Logs
11/09/16  18:39    <DIR>          Snapshots
               2 File(s)          4,636 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\clone-test\Logs

12/12/17  08:16    <DIR>          .
12/12/17  08:16    <DIR>          ..
12/12/17  08:19            81,916 VBox.log
12/12/17  08:16            81,920 VBox.log.1
12/12/17  01:21           112,613 VBox.log.2
12/12/17  00:53           115,385 VBox.log.3
12/12/17  08:19           363,707 VBoxHardening.log
               5 File(s)        755,541 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\clone-test\Snapshots

11/09/16  18:39    <DIR>          .
11/09/16  18:39    <DIR>          ..
12/12/17  08:17    80,211,476,480 {3e6796ef-154a-4af8-a43b-147cf556f58f}.vmdk
               1 File(s) 80,211,476,480 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\win-10-refz

15/12/17  02:21    <DIR>          .
15/12/17  02:21    <DIR>          ..
15/12/17  02:21    <DIR>          Logs
15/12/17  01:49            15,533 old-win-10-refz.vbox
15/12/17  01:49            15,533 old-win-10-refz.vbox-prev
23/12/16  16:10    <DIR>          Snapshots
15/12/17  02:15            15,533 win-10-refz.vbox
15/12/17  02:15            15,533 win-10-refz.vbox-prev
               4 File(s)         62,132 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\win-10-refz\Logs

15/12/17  02:21    <DIR>          .
15/12/17  02:21    <DIR>          ..
15/12/17  02:15             1,469 VBox.log
15/12/17  02:14             1,469 VBox.log.1
15/12/17  01:49             1,469 VBox.log.2
14/12/17  22:29             1,470 VBox.log.3
15/12/17  02:15           253,976 VBoxHardening.log
               5 File(s)        259,853 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\win-10-refz\Snapshots

23/12/16  16:10    <DIR>          .
23/12/16  16:10    <DIR>          ..
15/09/16  14:19     3,442,822,690 2016-09-15T14-19-06-773562700Z.sav
16/10/17  23:32    33,317,912,576 {0e8dbad3-f6a9-4751-9731-2b65a7e947fc}.vmdk
15/09/16  14:19    14,712,176,640 {1bf623ae-f3cc-496b-9032-2cb3635a3cc7}.vmdk
23/12/16  15:59    30,406,213,632 {f337a90d-4342-48d9-8f51-644a4d4f3868}.vmdk
               4 File(s) 81,879,125,538 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\Win-10-work-01

11/12/17  17:02    <DIR>          .
11/12/17  17:02    <DIR>          ..
11/12/17  16:41    <DIR>          Logs
06/11/17  19:37    <DIR>          Snapshots
11/12/17  17:02            42,156 Win-10-work-01.vbox
11/12/17  16:41            42,156 Win-10-work-01.vbox-prev
10/08/17  00:33         2,553,935 Win-10-work-01.webm
               3 File(s)      2,638,247 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\Win-10-work-01\Logs

11/12/17  16:41    <DIR>          .
11/12/17  16:41    <DIR>          ..
11/12/17  17:02           112,157 VBox.log
11/12/17  16:41           121,745 VBox.log.1
08/12/17  17:20           122,085 VBox.log.2
08/12/17  06:01           122,028 VBox.log.3
11/12/17  17:02           366,413 VBoxHardening.log
               5 File(s)        844,428 bytes

 Directory of C:\Users\David Barratt\VirtualBox VMs\Win-10-work-01\Snapshots

06/11/17  19:37    <DIR>          .
06/11/17  19:37    <DIR>          ..
09/09/16  22:53       106,430,464 {027b59d7-e7ee-40b5-b892-1332f9f74784}.vmdk
11/12/17  17:02    61,863,428,096 {079e37d4-fde1-46cc-a942-0cb8579ffb88}.vmdk
10/09/16  22:45     1,165,230,080 {2fb6fe56-7ae8-4e0e-8653-6c741b6abc1e}.vmdk
06/11/17  19:34   111,225,864,192 {573d078f-6250-48f0-b8d3-436485fd3eee}.vmdk
27/08/16  22:21        15,794,176 {7f330239-0d85-499f-bf7e-9fe94e991647}.vmdk
27/08/16  22:19    64,091,979,776 {e58c7d96-85f1-40ca-b4ae-74e8222b77cf}.vmdk
28/08/16  23:10        15,794,176 {eb3be3ab-2e99-4697-ac83-1007c177fdd6}.vmdk
24/05/17  22:06   119,134,158,848 {efb658e8-6244-4f07-b7f2-e88adac7e3ae}.vmdk
09/09/16  22:46    16,792,027,136 {fcbf5749-5736-4a08-a4af-baf5be14b98e}.vmdk
               9 File(s) 374,410,706,944 bytes

     Total Files Listed:
              39 File(s) 536,505,873,799 bytes
              29 Dir(s)  39,173,976,064 bytes free
Thanks
Attachments
win-10-refz.zip
.vbox file
(6.05 KiB) Downloaded 5 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing existing VM's in new installation after crash???

Post by socratis »

I'm sorry, but you don't only have linked clones, you have a lot of snapshots with linked clones! That's quite a different beast to handle. Even if that VM was a standalone VM, the amount of snapshots that you have makes it so fragile that it's like asking for trouble. And trouble found you...

The main problem is that there is no base disk. The error message was pinpoint accurate. As you can see from your directory listing, there is no "win-10-refz-disk1.vmdk", it's gone. So, there is not that much that you can do at this point, unless you have a backup between 2017-04 and today.

And since everything (your main VM and the clones), depend on that single file, then you're out of luck. You can't do anything with a standalone differencing disk (or several) I'm afraid, it's useless...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

ok.. thanks for that. Fortunately there was nothing that important on any of the machines, it's just going to be a bit inconvenient creating them.

For future reference (and I will get into the habit of making regular backups), how can I avoid such catastrophes in the future... I'm not sure where all the snapshots have come from and don't know how the "win-10-refz-disk1.vmdk" disk disappeared??
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Installing existing VM's in new installation after crash???

Post by BillG »

Clones and snapshots do not create themselves (and virtual disks do not delete themselves). I have no clones, no snapshots, and I have never "lost" a virtual disk in all the years I have been using VirtualBox. I also do not have and .vmdk files.

Where did this virtual machine come from? Who originally set it up in this odd way?

How to avoid similar problems in the future? Do not use clones, do not use snapshots, do not use .vmdk files, regularly back up the contents of the VirtualBoxVMs folder.
Bill
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

You obviously know your way around VirtualBox, but unfortunately I don't and you have lost me a bit.

What is wrong with creating clones?

I originally set up the virtual machines.... what's odd about it? What have I done wrong??

So you do not have .vmdk files? What is the significance of that comment?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing existing VM's in new installation after crash???

Post by mpack »

There is nothing wrong with creating clones, provided they are stand alone - not linked clones, as linked clones are really a kind of snapshot.

Snapshots have inherent problems that have already been discussed to death. Google "snapshot problem site:forums.virtualbox.org".

VMDK is not the VirtualBox default format. Functionality in VirtualBox is limited compared to the native format, and if you suffer disk corruption problems then you're on your own.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

Another dumb question... what is the native VirtualBox default format.... I had intentions of configuring the machines otherwise??
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing existing VM's in new installation after crash???

Post by mpack »

VDI is the VirtualBox native disk image format. Executive summary: always use VDI. If you ever needed it in another format then you can always make a converted clone.
markanderson
Posts: 15
Joined: 13. Dec 2017, 23:32

Re: Installing existing VM's in new installation after crash???

Post by markanderson »

okey dokey.... of course what I meant was that I had "NO" intentions of configuring the machines otherwise.

Right, I shall start again and have learned a lesson... backups of even VM's is a good idea!!

Thanks for your help.
Post Reply