Debian Guest Fails to start after power outage

Discussions about using Linux guests in VirtualBox.
Post Reply
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Debian Guest Fails to start after power outage

Post by Jonners59 »

Hope someone can assist me, as so far using google has made things worse.

I have a PC that I store family data on. I also use it in a VM to host a Debian OS to run a 3CX IPBX. It has worked great for many years, first on a Windows guest and the past few years on Debian/Linux.

Whilst I was away for a number of weeks there was a power outage. When I returned the guest would not start. It would fall back to an emergency window saying a certain drive would not load/could not be found. "/media/Documents". From experience, that means that /etc/fstab needs that line ~ so that it can boot and be fixed. However, this is a VM and Guest and access isn't as simple. A Google search and I found a way in, following the instructions, until it came to editing the fstab. During this, all entries were lost. The instructions didn't account for this, nor a way out, such as undo, exit without saving, or even exit. No keys worked. As I hadn't saved anything I hoped that sending the shutdown message would close it without saving. Instead, it's not booting now. It starts to boot and then the guest window disappears with a message in red on the image in VB "Aborted"

Log attached.

I am making things worse.
Attachments
Debian-2022-09-22-17-10-29.log
(83.41 KiB) Downloaded 5 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Debian Guest Fails to start after power outage

Post by mpack »

Before I say anything else I should point out that even if a VM doesn't boot you can usually recover files by creating a new VM and attaching a clone of the VDI to it. Being a cloned VDI ensures that you don't try to register the same media in two VMs at the same time, which VirtualBox doesn't allow. Cloning also lets you merge snapshots into a single VDI, if snapshots are involved - and it preserves the original VDI contents.

Looking at your log I see a rather complicated structure. Instead of a single VM folder containing VM files, which is what I expect, I see a VDI in "/home/administration/VirtualBox/Debian/Debian-disk002.vdi" (and that VDI is strangely named, implying that the VM was not created in a normal way), I see that the VM folder seems to be "/media/Backup/VirtualMachineBackup/Debian/Snapshots". I assume that the latter is what the VM is complaining about. I see no media being loaded from that folder.

I also see a GAs ISO being loaded from "/usr/share/virtualbox/VBoxGuestAdditions.iso". I'm not a Linux user so I have to ask - is "/usr/share/virtualbox" the default installation folder?

I would create a new VM folder, copy the .vbox and .vdi files into that folder, and remove any absolute paths from the .vbox file. Back it all up first. You would need to unregister the old VM before you could register this manual copy.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Debian Guest Fails to start after power outage

Post by Jonners59 »

Thank you. I'll take a look tomorrow morning.

The structure may have something to do with me trying to fix things.... hence the link to the backup folder.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Debian Guest Fails to start after power outage

Post by fth0 »

mpack wrote:I also see a GAs ISO being loaded from "/usr/share/virtualbox/VBoxGuestAdditions.iso". I'm not a Linux user so I have to ask - is "/usr/share/virtualbox" the default installation folder?
Yes. On a Debian/Ubuntu host, the Oracle-provided package virtualbox-6.1 and the Ubuntu-provided package vitualbox-guest-additions-iso both put VBoxGuestAdditions.iso into /usr/share/virtualbox/.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Debian Guest Fails to start after power outage

Post by fth0 »

VirtualBox 6.1.36 and 6.1.38 have a regression regarding USB 3.0 Mass Storage Devices (MSD), leading to hanging VMs when a USB3 MSD is being captured by VirtualBox while starting a VM.

In the Debian-2022-09-22-17-10-29.log file, the VM hangs when the virtual USB 3.0 controller is being initialized, which is the expected behavior in case of the regression. I don't know if it plays a role that you're additionally using a USB Storage Controller.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Debian Guest Fails to start after power outage

Post by Jonners59 »

fth0 wrote:VirtualBox 6.1.36 and 6.1.38 have a regression regarding USB 3.0 Mass Storage Devices (MSD), leading to hanging VMs when a USB3 MSD is being captured by VirtualBox while starting a VM.

In the Debian-2022-09-22-17-10-29.log file, the VM hangs when the virtual USB 3.0 controller is being initialized, which is the expected behavior in case of the regression. I don't know if it plays a role that you're additionally using a USB Storage Controller.
OOOHH Thanks for that. Shall look at it.

The previous post/log was misleading as it contained all the things I had tried and failed. I deleted them all and Guest and started over, but using the image. Had the same results, but all the "odd" directories disappeared.

Found these in the log file. The only errors.

Code: Select all

522  00:00:02.118367 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37

1533  00:00:05.068459 ERROR [COM]: aRC=NS_ERROR_UNEXPECTED (0x8000ffff) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Screenshot is not available at this time}, preserve=false aResultDetail=-52
I'll now shut down the Guest and change USB3, and try again. Thank you.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Debian Guest Fails to start after power outage

Post by Jonners59 »

OK, so the error that prevails is that fstab is incorrect. It seems for whatever reason one of the directories does not appear as it used to so I need to remove the entry in fstab, reboot and then fix. The question is HOW in a VM?

Seems to be, assuming root (/) is SDA1.

Code: Select all

mount -n -o remount,rw / 

Code: Select all

vi /etc/fstab
make changes, though I couldn't add anything so I deleted the offending line

Code: Select all

Documents  /media/Documents  etc.....

Code: Select all

shift+z
to save

Code: Select all

reboot
to restart

AND IT WORKS!!!!!!!!!!!!!!!!!!

Thank you.
Jonners59
Posts: 45
Joined: 21. Jan 2011, 20:09
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows 7 32-bit Home Prem

Re: Debian Guest Fails to start after power outage

Post by Jonners59 »

OK, so slightly off subject, but still to do with the restore:

I get a message
VBoxClient: Failed to register support, rc=VERR_INVALID_FUNCTION
What is this and how do I either correct it or remove it, please?

Also, in getting this working again, I created a new guest with a new name and then imported the old image. I then tried to tidy up by deleting the old image, but then the new one refused to boot. Checking the logs it has used a file in the old image folder. I restored the folder and it works. The file is

Code: Select all

Debian-disk002.vdi
I would also like to rename the new Guest (Debian3CX) to the same as the old as I have a shutdown script that I use and don't want to have to change it... Can I do this?

Any assistance, please?
Post Reply