Re: Restoring VirtualBox VM

Eric Beversluis via Any discussion of rdiff-backup <[email protected]> Mon, 24 Feb 2025 13:23:13 -0500
Newsgroups gmane.comp.sysutils.backup.rdiff-backup.general
Message-ID <[email protected]>
Thanks, Rudy.

I tried that, using first
     /VirtualBox VMs/Windows 10 VM, then
     /VirtualBox VMs/Windows 10 VM/Windows 10 VM.vbox
and then, that same command after renaming Windows 10 VM.vbox-prev to 
Windows 10VM.vbox.

This is what I got back from the command:

eric@fedora:~$ vboxmanage registervm '/home/eric/VirtualBox VMs'
VBoxManage: error: Document is empty.
VBoxManage: error: Location: '/home/eric/VirtualBox VMs', line 1 (0), 
column 1.
VBoxManage: error: 
/home/vbox/tinderbox/build-VBox-7.1/svn/src/VBox/Main/src-server/MachineImpl.cpp[691] 
(nsresult Machine::initFromSettings(VirtualBox*, const com::Utf8Str&, 
const com::Guid*, const com::Utf8Str&))
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), 
component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "OpenMachine(Bstr(a->argv[0]).raw(), 
Bstr(strPassword).raw(), machine.asOutParam()))" at line 159 of file 
VBoxManageMisc.cpp

eric@fedora:~$ vboxmanage registervm '/home/eric/VirtualBox VMs/Windows 
10 VM.vbox'
VBoxManage: error: Runtime error opening '/home/eric/VirtualBox 
VMs/Windows 10 VM.vbox' for reading VERR_FILE_NOT_FOUND (File not found.).
VBoxManage: error: 
/home/vbox/tinderbox/build-VBox-7.1/svn/src/VBox/Main/src-server/MachineImpl.cpp[691] 
(nsresult Machine::initFromSettings(VirtualBox*, const com::Utf8Str&, 
const com::Guid*, const com::Utf8Str&))
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), 
component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "OpenMachine(Bstr(a->argv[0]).raw(), 
Bstr(strPassword).raw(), machine.asOutParam()))" at line 159 of file 
VBoxManageMisc.cpp

eric@fedora:~$ vboxmanage registervm '/home/eric/VirtualBox VMs/Windows 
10 VM.vbox'
VBoxManage: error: Runtime error opening '/home/eric/VirtualBox 
VMs/Windows 10 VM.vbox' for reading VERR_FILE_NOT_FOUND (File not found.).
VBoxManage: error: 
/home/vbox/tinderbox/build-VBox-7.1/svn/src/VBox/Main/src-server/MachineImpl.cpp[691] 
(nsresult Machine::initFromSettings(VirtualBox*, const com::Utf8Str&, 
const com::Guid*, const com::Utf8Str&))
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), 
component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "OpenMachine(Bstr(a->argv[0]).raw(), 
Bstr(strPassword).raw(), machine.asOutParam()))" at line 159 of file 
VBoxManageMisc.cpp

I don't know if this means anything to you. I'll also post these results 
on my threat at VirtualBox.

I always have the VMs shut down when I run rdiff-backup.

Thanks.

Eric Beversluis
www.ericbeversluis.com
2x Honorable Mention--Writer's Digest Contest


On 2/24/25 12:05 PM, Rudy Zijlstra wrote:
> Eric,
>
>
> When restoring from a file backup, you may need to re-register the VM. 
> That is fully delete it, put the files in place from backup, and then 
> vboxmanage registervm <abs path to vbox file>
>
>
> This is on the assumption the external backup was made while the VM 
> was NOT running. If it was running during the copy, there is no 
> guarantee the backup file is consistent. It might still work, but the 
> key word there is "might"
>
>
> Cheers
>
>
> Rudy
>
>
> On 23-02-2025 20:43, Eric Beversluis via Any discussion of 
> rdiff-backup wrote:
>> Eric, sorry about not addressing the list. I don't know what made me 
>> think you had replied off-list.
>>
>> Thanks for digging into this for me. I'll study the VB forum links 
>> you found and return to the qq I've posted there. Hopefully I'll get 
>> some love there.
>>
>>
>> Eric Beversluis
>> www.ericbeversluis.com
>> 2x Honorable Mention--Writer's Digest Contest
>>
>>
>> On 2/23/25 12:36 PM, EricZolf wrote:
>>> Hi,
>>>
>>> please keep the discussion on the mailing list (and don't address me 
>>> directly), you never know who might be able to help, or who might 
>>> need the solution.
>>>
>>> On 23/02/2025 13:07, Eric Beversluis wrote:
>>>> Hi Eric,
>>>>
>>>> When I tried to reproduce the original VM by clicking on the .vbox 
>>>> file, I got this error message:
>>>>
>>>> Failed to open virtual machines located in .../VirtualBox 
>>>> VMs/Windows10 VM/Windows 10 VM.vbox. Callee RC: 
>>>> NX_ERROR_INVALID_ARG (0X80070057)
>>>
>>> You are probably better off asking in a VirtualBox forum. Reading 
>>> through https://forums.virtualbox.org/viewtopic.php?t=110774 I get 
>>> the impression that the issue is some expectations on the devices 
>>> (there the ISO) being available on the host, which are most probably 
>>> not part of the backup.
>>> See especially the comment 
>>> https://forums.virtualbox.org/viewtopic.php?p=544847&sid=1dd533b8b7d03facbea8b6d9e371a3c3#p544847
>>>
>>>> Nearly as I can tell from searching, that's a kind of generic error 
>>>> message that doesn't help much.
>>>
>>> You are possibly right, I wouldn't know, I haven't used VirtualBox 
>>> for decades.
>>>
>>>> I think I should also be able to create a new VM by importing the 
>>>> old .vdi image. But when I try that approach, VirtualBox can't find 
>>>> the .vdi image, even though it's in the 'VirtualBox VMs' directory.
>>>>
>>>> Somewhere in my vague memory, from years ago when I was more active 
>>>> with this stuff, there's the idea that copying an image as image is 
>>>> different from copying the files in an image. Could that be 
>>>> relevant here? I definitely would have run rdiff-backup with the VM 
>>>> shut down.
>>>
>>> Well, you can do backup from within the VM, at the OS level, or from 
>>> outside at the VM image level, but apparently here you've done it 
>>> from outside.
>>>
>>> Sorry I can't help more but it sounds more like a VirtualBox than an 
>>> rdiff-backup issue.
>>>
>>> KR, Eric
>>>
>>>> Thanks.
>>>>
>>>> Eric Beversluis
>>>> www.ericbeversluis.com
>>>> 2x Honorable Mention--Writer's Digest Contest
>>>>
>>>>
>>>> On 2/23/25 2:46 AM, EricZolf wrote:
>>>>> Hi,
>>>>> I have no clue of virtual box but which error message do you get?
>>>>> Did you backup the image while the VM was switched off? Else it 
>>>>> could get inconsistent...
>>>>> KR, Eric
>>>>>
>>>>> On February 23, 2025 4:48:18 AM UTC, Eric Beversluis via Any 
>>>>> discussion of rdiff-backup <[email protected]> wrote:
>>>>>> I've been backing up my VirtualBox VM as part of my rdiff-backiup 
>>>>>> of my Home directory (Fedora 40).
>>>>>>
>>>>>> My Window 10 VM got destroyed, and I'm trying to recreate it, but 
>>>>>> VirtualBox does not seem to be able to recognize or deal with my 
>>>>>> restored rdiff-backup files of the VM. Everything seems to be 
>>>>>> there, but VB doesn't seem to recognize the .vdi file at all and 
>>>>>> I get an error when I click on the .vbox file, which is 
>>>>>> supposedly what retriggers the new VM.
>>>>>>
>>>>>> Does anyone know why I can't restore from my rdiff-backup of the 
>>>>>> virtual machine? I thought I was being very prudent with backing 
>>>>>> up the VM.
>>>>
>>>
>>>
>>
>>
>