Recover your corrupt VirtualBox .vdi (Virtual Disk Image)

 

Hi guys

I have 3 Windows 10 Professional licenses (Yes, paid licenses). 2 of the licenses are used in two hardware devices & the 3rd one I am using with a VirtualBox VM machine.

My semi server class desktop computer at home has approximately 4.5T storage, consolidated from different disks. My Windows10 VM is frequently factory reset to try out different software (Mostly Oracle software at uncertified environments) & the particular partition on which I had the VM was running out of space & I planned to move the VM & the disks to a different partition with bigger free space.

Scenario: Move “Windows 10” VM from L: drive to M: drive

My nightmare started when the copy process stopped abruptly with Windows popping an error window stating there were read errors while copying disk1.vdi & I attempted again to realize that the disk1.vdi is has bad sectors or clusters.

I hurried to confirm that the VM is still accessible by restarting the VM couple of times & to my greatest pleasure the VM did start, did shutdown properly and I was able to access the Oracle database installation.

Fix:

A quick googling suggested that an attempt to repair the hard disks using “CHKDSK”, the old utility could fix the .vdi corruptions & without wasting more time I jumped in

At an elevated command prompt issued the command

> chkdsk L: /F

My partition is of 1TB & after 15-16 minutes the chkdsk completed with few messages like fixing some cluster information.

I tried to copy the disk1.vdi once again to M: drive, and this time the copy process managed almost 19GB out of 29.1GB and again presented me the read error.

Now, I was left with just one more option in front of me & it was to attempt recover the bad sectors, and there were chances that my virtual disk may get corrupt if the damages are more in numbers. knowing my VM is already Activated by Microsoft, I could try to reinstall Windows in a new virtual disk and retain the license as long as I am still using the other VM files as the id of the machine registered with Microsoft.

Please be informed, if you copy ONLY the vdi file, the activation will be nullified and you will be prompted to activate the copy of the Windows as soon as you start the new VM built using the copied VDI file!

So I proceeded to

>chkdsk L: /F /R

Windows suggested that it may take around 6 hrs for the repair process & I woke up next day morning to read multiple status messages about moving the corrupt sectors to new positions & some errors those could not be repaired.

I hurried to copy the disk once again & even though it seemed like forever, finally I was able to copy the disk1.vdi to M: drive!

 

So if you ever come across such a situation, give the above a try. If you are not cursed, most probably you will able to recover the virtual disk.

regards,

rajesh

RMAN vs Dump Export

Hi guys

Recently I spent pretty good amount of time trying out RMAN & was able to apply what I learned at multiple production environments those were purely depending upon export dumps over a decade. Once after committing many hours for recovery using RMAN to a standby instance, I started wondering whether such efforts are really worth for a database that was hardly couple of GBs after 10+ years of data collection. I read many articles from reputed Oracle related sites, including this one.

A majority of the small scale industries don’t invest on DBAs because, FOR them DBAs are found doing “nothing” at all throughout the salary periods & most of them have unmatched ego that don’t allow them to learn anything other than what they are “certified to”. I have some pretty bad experiences with bunch of DBAs who didn’t even have a clue about SGA, PGA setups for a 10g database because they were “Certified” for 11g

Throughout the years, we have many hardware crashes and always restored the database(s) from export dumps (.dmp). A clearly documented schema/tablespace details were all we needed as the data that was expected to be restored were always sized in few GBs.

An Oracle developer with moderate database skills could, within an hour time can go online with the database restored using the simple import, which may not be the case with RMAN. RMAN strongly depends upon many factors for backup, restore & and from my limited DBA skills, should be adapted to bigger database environments.

So, you have a very small database and want to restore it from a dump file after a hardware crash or while switching to better hardware, you are very happy to know that importing from a dump export is much easier than RMAN (as you don’t have a clue what it is). Is it a fail proof method? Well, depends. If you are dealing with a hardly documented environment, you can land in hot soup with import screaming about non-existing objects referred by the currently imported schema. An interesting discussion you may find here that is closed as answered once after I confirmed it.

Obviously, I started the topic explaining how easy it looks to use pure dump files for restoration purposes, however ending the topic by saying that if you have a supported database, please implement RMAN immediately, which is a beautiful piece of technology helping you to recover the entire database with moderate level of DBA skills.

regards,

rajesh

Windows 10 | CreatorsUpdate| Taskbar Volume Control

Hi guys

Microsoft started pushing Windows 10 Creators Update & one of the major bugs prevents taskbar volume control responding to mouse clicks. Ie, the user cannot control the volume using the taskbar icon.

After many attempts to re-install the drivers using Windows device manager, I had to download the Windows 8.x drivers from Dell support & the manual installation helped.

So if you are too eager to checkout the Creators Update, please be sure that many of the broken drivers could not be updated using the device manager, however using manufacturer provided driver packages. You can download the drivers for Windows 8.x & unzip the packages using 7-Zip and point to the extracted location incase if the package says it cannot install by normal terms.

Hope this helps few out there!

regards,

rajesh