Does A VirtualBox Quickstart Implementation Ever Get "Tired"?

Events happening in the community are now at Drupal community events on www.drupal.org.
jebbushell's picture

I think I'm noticing that after say 60-100 hours of heavy use, my Quickstart environments seem to develop disk errors even though I've never seen a (virtual) disk more than 25% full.

I know when this is starting when Ubuntu needs to be restarted in repair mode and the Fix option applied. This works for a bit, but as soon as Firefox or Chromium won't come up after a reboot, then I know I'm hosed. Same with any SQL error. They signal the end of the line very positively. I've tried all the repair options displayed by Ubuntu while booting but once the slide has started I know it's just a matter of time.

Comments

Hi, I've never experienced

MichaelCole's picture

Hi, I've never experienced this, but that doesn't mean it's not happening :-)

This sounds like a problem at the OS, virtual hardware level, or host hardware level. Check on the virtualbox forums for a similar issue. It sounds like the virtualbox disk may be getting corrupted.

If you're "saving" the image instead of doing a full shutdown, you might try doing the full shutdown.

Otherwise, you might try adjusting the "Use host I/O cache" setting in the Storage settings. Check on the vbox forums for more info about this.

You might try checking the host hardware for bad blocks, or the virtual hardware as well.
http://linuxpoison.blogspot.com/2008/01/howto-check-disk-drive-for-error...

Good luck!

How recreate an integer, new VMDK (in this context)?

Blooniverse's picture

Hey @yellowcake, @MichaelCole!

First of all a big load of thankfulness to you, @Michael. The concept & realisation of this virtual appliance is very, very useful.

Further: Yes, I've just come across the error you describe, @yellowcake, myself. Essentially, I am on my way to solve this issue as thoroughly as possible! So thoroughly, that I have even manually created an explicit/own SWAP partition (for the page file/swap file) on my Windows host (I depend on Windows for interoperable working purposes ;). Btw, Window's 'chkdsk' CLI command tells me, my host's physical hard disk drive (HDD) resp. hard disk with all its partitions (primary as well as logical) is completely intact/integer.

I've done a bit of research about the subject virtualisation — it is huge … and it can be interpreted in various ways. However, I didn't & don't really want to deal with this whole matter, that's why I want to pose certain elementary questions here:

  • Does anyone know if the export of an appliance (.ovf, .ova) from Virtualbox creates a new virtual disk (.vmdk)? If yes, then this might be an easy & quick (but also only temporary, maybe) way out of this error hell! And what about Virtualbox cloning method, in this context? Probably less likely, I guess, since it might just clone the error as well.
  • Why did you, @MichaelCole, choose VMware's virtual disk format .vmdk instead of .vdi from Oracle's Virtualbox? Fine, the vmdk format is widely spread, it is a de facto standard — but I am wondering whether there could have been another important reason for this decision.
  • What about this proposal of mine: Create a new & empty virtual machine (container only, without appliance) -- later install the appliance INTO this container rather than letting the Quickstart or any other appliance create its own, self defined virtual machine container!??? I haven't checked this out yet myself. Just an arbitrary idea at the moment.

However, the source of the data corruption needs to be found. My evaluation steps above might lead to a quick, temporary cure — but most probably not more.

---
PHILIPP-SCHAFFNER.COM {Text 3.0 & Web 3.0}

Quickstart idea

jebbushell's picture

I suspect that doing a guest shutdown while some edit software is open may be associated with the initial corruption. I'm now careful to clean up before I shutdown the guest. Saving the state seems to be safer than shutting down.

Firefox gets itself into endless loops sometimes and has to be killed and/or the guest terminated. For this reason, I now use Chromium for everything that can't be done by FF.

Allocating more than one host processor to the guest doesn't sit well with me.

Deleting the current state may seem attractive but does not work because, in VirtualBox-speak, delete means merge. In other words, the corruptions in your differences image are deleted but only after they have been merged into your latest snapshot. Way not to go.

After the latest bout of corruptions, I first went through the usual business of running Ubuntu in its repair modes, letting it fix everything it thought it could fix, and when that failed I took a clone of the latest snapshot. That worked.

Quick solution & differential/incremental

Blooniverse's picture

... seems like cloning might create a new virtual disk! That **would** be good.

A pitty that there is not more time to investigate further into the whole issue. Like that one never really gets to know the real cause. But that's life (superficial), as it seems. There are a lot of superficial assumptions and workarounds. And, due to a certain complexity of the matter, one needs to be happy if things work somehow.

Nonetheless, @yellowcake, you said that deleting the current state in Virtualbox merges this state with the latest snapshot — I guess, that must be wrong. You do have the option to discard your current state by choosing 'Close > Power off the machine' in combination with the restoration of a particular snapshot! Correct? Why not try this?

Another remark I am urged to leave here is:

  • Differential
  • Incremental

As much as I understood from seeing the visual display of the snapshots, Virtualbox creates incremental (based on the previous snapshot) ones, NOT differential (based on a/the initial foundation). Well, I don't know completely if I am using the correct terms in English, but I am sure my language is quite clear nevertheless.

BASE (incremental)
|-Snsh1
  |-Snsh2
    |-Snsh3

BASE (differential)
|-Snsh1
|-Snsh2
|-Snsh3

From a visual point of view the snapshot concept must be an incremental one. Or then the visual display is wrong/misleading, from my point of view!!!

Unfortunately, there is no hint in Virtualboxes manual. Strange, since this would be quite relevant to know, or not!?!

---
PHILIPP-SCHAFFNER.COM {Text 3.0 & Web 3.0}

What annoys me most about

jebbushell's picture

What annoys me most about VirtualBox, and I still use it all the time, is that there is no simple backup mechanism and the relevant part of manual is a forest of gobbledegook. I've done that manual and got the migraine. However I may have learned something that is useful and that I'm going to try out.

Here is what will be my new approach, in case anyone's interested:

  1. New install of Quickstart or clone.

  2. Take a snapshot (A) immediately, before you do anything else. You will be able to restore from this snapshot.

  3. Do a day's work and take a snapshot (B). Keep notes about what it contains. You'll be able to restore from this snapshot.

  4. Do another day's work, but this time you have some kind of unrecoverable event part way through. Take a snapshot (C). You're going to keep this to one side in case anything at all is recoverable.

  5. Restore from snapshot (B) and redo your lost work. Keep good notes or you'l get lost.

  6. Zip your snapshots and copy to a safe place every day.

  7. One day a week, clone your freshly taken snapshot. That eliminates the dependencies and gives you a fresh start. Make sure you snapshot your new clone before using it.

  8. In the event of a total disaster you should be able to recover from one of your weekly clones.

Now that is how simple it needs to be. No need for any dirty talk. And note that it backs up your database and all your sites in one go. Let's see if it works.

State & Snapshot

Blooniverse's picture

... something else, @yellowcake. If I am not completely out of my mind, then:

  • Cloning a particular snapshot surely makes use of merging too (how else would it get to the initial base, for instance)!
  • Current State (Saved State) != Snapshot.

Another thing: You said, 'saving the state' seemed to be safer than 'shutting down'! Doesn't that contradict to what @MichaelCole said in his first reply?

---
PHILIPP-SCHAFFNER.COM {Text 3.0 & Web 3.0}

Cloning a particular snapshot

jebbushell's picture

Cloning a particular snapshot surely makes use of merging too (how else would it get to the initial base, for instance)!

Agree.

Current State (Saved State) != Snapshot.

Agree.

'saving the state' seemed to be safer than 'shutting down'!

I speculate that saving state is done entirely by the host. I'm also guessing that the file and database corruptions that I am seeing are due to problems in integrating the guest I/O with the host I/O and that they may be exacerbated during shutdown. Reading between the lines in the manual you can see awareness of potential issues. But I could be talking complete rubbish.

Full shutdown each time and I have no problems

bvirtual's picture

The few times I have used hibernate, save state, and other means than a proper full shutdown has lead to corruption.

I reckon a full shutdown flushes all IO to disk, closes all open file handles, etc, etc, leaving the file system fully intact.

Peter

LA's Open Source User Group Advocate - Volunteer at DrupalCamp LA and SCALE

@all, what's your setup,

jebbushell's picture

@all, what's your setup, please?

Especially if you're NOT having problems.

My setup is Win7 64 with Quickstart 1.0 (Ubuntu 11.04), which is rather a lot of fresh meat already.

No problems here: Win7-64 qs1.0

jedihe's picture

Hi all,

I've been very curious for this, since I haven't had any kind of problems yet and I usually use the save state method to close the VM. These recent days I've been using the VM heavily on a couple projects, including Eclipse (which is quite heavy) and everything has been going fine; the only weirdness I had was that the screen got frozen at some point but the hard shutdown didn't damage the VM at all.

The only special thing I can recall about my VM is I like to increase the amount of RAM granted to it (3GiB), but the other settings should be the "factory" ones.

Thank God, I'm already using a shared folder to my host OS to drop backups (drush arb) of my sites as I develop on them, so I'm already being careful about this potential risk.

I have now increased my memory to 2GB

jebbushell's picture

I have now increased my memory to 2GB which is all I can without going into the red. Today I was forced to shutdown with stuff open and there was no file corruption. This was a first, so I think you may have nailed that issue. However, I also increased cores to 3 out of 4 and execution cap to 90% at the same time, so it's still not really clear what worked.

I also use drush sql-dump and drush archive-backup, but to Dropbox, not a share on the host.

My share on the host is

jedihe's picture

My share on the host is already a subfolder of my Dropbox folder ;)

Off topic, but my drush arb

jebbushell's picture

Off topic, but my drush arb failed to gather the sites/default/files directory, so no settings.php on restore. Had to retrieve from a partly damaged snapshot.

Quickstart Drupal Development Environment

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: