Repeatedly Corrupt VDI?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Repeatedly Corrupt VDI?

Post by yupthatguy »

A couple of weeks of ago I made this post about what was eventually recognized as a corrupted VDI, so I made a new VDI, used DDRescue to backup my data and restore to new VDI.
viewtopic.php?f=7&t=104202

However, less than 3 weeks later, I am seemingly having the same exact problems slow terminal response, I/O errors, etc indicating that the VDI is again corrupted. So my questions are as follows:

1.) Can someone help verify that the new VDI is also corrupted, I haven't quite learned to read log properly yet?

2.) Can someone tell me what might be causing my VDI's to corrupt so quickly? I've been careful to shutdown from within the vm itself.. and any time I see a mistake or start getting sluggish response times, I boot from an ubuntu liveCD and repair the file system, which gets things moving at decent speeds again, but is ultimately a "band-aid" solution.

3.) I read the manual section about snapshots, can someone recommend a strategy / method by which I can better protect the data on VDI, in case of VDI failure?

Thanks
Attachments
VBox.zip
(37.56 KiB) Downloaded 2 times
Last edited by yupthatguy on 11. Nov 2021, 10:29, edited 1 time in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Repeatedly

Post by mpack »

Unfortunately the log shows a good boot from a live CD, which tells us nothing about the state of any uninvolved VDI you may have had lying around. Also, glancing at your other topic, I don't see clearly why there was a conclusion that the VDI was corrupted, nor what you did to fix it.

IF your vdi is being corrupted then it will either be a fault on the host drive (bad sectors and/or drive full), or some interaction with another app on the host, e.g. launching two apps at the same time which open the VDI file for writing. The latter shouldn't be possible in any modern OS, but I don't know enough about Linux to entirely exclude the possibility.
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: Repeatedly Corrupt VDI?

Post by fth0 »

yupthatguy wrote:I made this post about what was eventually recognized as a corrupted VDI, so I made a new VDI, used DDRescue to backup my data and restore to new VDI.
This procedure has a conceptual error IMO:

ddrescue creates a backup of the readable sectors of the original (virtual) disk, and either replaces the unreadable sectors with zeroed sectors or leaves them out. In any case, the result is not a repaired disk image, and I wouldn't assume that your final VDI file is without errors.

I suggested to start with a new VM and a new VDI file, and to attach the "rescued" VDI file as a secondary disk, with the intent to copy your personal data over to the new VDI file, as far as it still is intact.
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

@ fth0
I suggested to start with a new VM and a new VDI file, and to attach the "rescued" VDI file as a secondary disk, with the intent to copy your personal data over to the new VDI file, as far as it still is intact.


If the current VDI is corrupt, I will try this, I guess that I missed your suggestion the first time. If I remember correctly you mentioned that I needed a recovery tool that can handle interruptions due to potentially bad blocks/sectors, which is what I thought ddrescue was. Can you recommend a better tool than ddrescue? Also, I just don't how to attach a secondary VDI to new primary VDI? Is there a section of the manual I need to reference? Which tool would recommend for the copying portion of your suggestion? dd?

@mpack
Unfortunately the log shows a good boot from a live CD, which tells us nothing about the state of any uninvolved VDI you may have had lying around.
I was unaware that the log only showed previous boot. I attached a new copy of the log, that show the errors.
IF your vdi is being corrupted then it will either be a fault on the host drive (bad sectors and/or drive full), or some interaction with another app on the host, e.
I have been worried about this possibility, but every time I boot from Ubuntu Live CD and check / repair my system... it says everything is ok.
Attachments
VBox.zip
(37.62 KiB) Downloaded 2 times
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: Repeatedly Corrupt VDI?

Post by fth0 »

You seem to struggle a bit with some basic concepts/terminology, so let's address this first with a (simplified) analogy:

A physical PC usually consists of a housing containing a mainboard with CPU(s) and RAM, one or multiple hard disk and DVD drives, and more physical components. An OS is usually installed on the first hard disk and used to access the personal data on all hard disks.

A virtual machine/PC consists of the VM (window) containing a virtual mainboard with virtual CPU(s) and virtual RAM), one or multiple virtual hard disks and DVDs, and more virtual components. A guest OS is usually installed on the first virtual hard disk and used to access the personal data on all virtual hard disks.

Just like you can add a second hard disk drive to a physical PC using your screwdriver, you can add a second virtual hard disk to a VM by changing its configuration under Settings > Storage. In both cases, you have to change the configuration of the (guest) OS to let it access the second (virtual) hard disk. You can google about how to do this in your guest OS. Afterwards, you can use a file manager in your guest OS to move your personal data from one disk/folder to another.

Using ddrescue as a part of the procedure is ok, because it eliminates the read errors that can make the VM reject the virtual hard disk. But since the contents of the rescued virtual hard disk are not complete, the guest OS may reject parts of them.
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

you can add a second virtual hard disk to a VM by changing its configuration under Settings > Storage. In both cases, you have to change the configuration of the (guest) OS to let it access the second (virtual) hard disk.


Call it a case of teaching an old dog a new trick... all these years. I literally only adding iso disk to vm via storage, thought never crossed my mind to add another vm. Thanks for the tip. Can confirm that the current VDI is actually corrupted from my prior log post?
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: Repeatedly Corrupt VDI?

Post by fth0 »

yupthatguy wrote:Can confirm that the current VDI is actually corrupted from my prior log post?
No. But from the whole story there is no reason to assume that it is not corrupted.
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

Ok... I went through the long process of creating the new clean vdi, cloning it, and using gddrescue to backup/restore my data onto a new VDI...which gddrescue told me completed successfully, but in reality failed and hadn't copied anything when I booted the VDI.

So next, I decided to put on my "big boy pants" and read the clonezilla documentation and it has quickly become my new favorite tool. I am now ready to clone everything... (if I could use it to clone my gf, life would be grand).

In any case, after I completed the above process using clonezilla instead of gddrescue, everything seemed to work well. Except I noticed one odd thing that I want to ask you about. When I went to resume work on my WP sites, I noticed that the last seesion of work progress appears to have been erased / rolled back. Nothing major, however my concern is the possibility of system configs that I can't see be erased or undone. So far everything seems to be working fine.. but how concerned should I be?

Also, thanks for the patience with the old man. For years I have been using vbox as a very basic tool to backup my old system and test update and configs without breaking my baby. I haven't had need for any advance vbox tools until that I am running a test server out it. So despite it being directly in front of my face, the thought of networking machines hadn't even crossed my mind... old dog, new tricks learned.

I have attached the log from my last boot on the new machine. Anything worrisome?
Attachments
VBox.zip
(37.59 KiB) Downloaded 2 times
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: Repeatedly Corrupt VDI?

Post by fth0 »

I haven't noticed any obvious problems inside your latest VBox.log file.

Regarding backups in general, it's important to check that they also can be restored. If that's the case, you should not lose more than any work done after the last backup.
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

Well, here we go again... :-(

With brand new VDI... it has aborted twice and now has become so unresponsive and slow at the command line that #service apache2 restart results in a connection time out "Failed to get properties: Connection timed out"

Any tips on what I can do to get the VDI stable enough to do actual work with it?
Attachments
VBox.zip
(36.95 KiB) Downloaded 1 time
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

In particular vboxadd.service always fails at boot and causes lllllonngg boot times.
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

Sorry... disregard.. I think figured out what was happening.. My tab memory saver plugin was switched off. Therefore, as I opened more browser windows.. FF was was increasing competing with VB for memory and system resources.. with VB loosing the fight and aborting. I reactivated the browser plugin and things are going smoother...

Thanks for the help.
yupthatguy
Posts: 73
Joined: 4. Jul 2015, 07:48

Re: Repeatedly Corrupt VDI?

Post by yupthatguy »

I have beyond a shadow of a doubt pinpointed the source of the I/O errors after creating new VDI.... I probably didn't have to create this last disk, but its ok... I learned clonezilla in the process.

The core problem:
I use the internet radio gnome shell extension to listen to music when I work. When I don't use it... my VDI is rock solid. Fast, perfect boots, no lagging in terminal, and definitely no I/O errors that make believe that the disk might be corrupt.

https://extensions.gnome.org/extension/ ... net-radio/

I've been using my phone for tunes.. and have been getting --perfect-- vbox behavior for the past couple of weeks.
Post Reply