Solved

Clock-related (!) disk-errors in Linux/Ubuntu running on a VMWare VM

Posted on 2011-09-23
5
731 Views
Last Modified: 2012-05-12
I have a very unusual date-related problem that has arisen on one of our Linux VMs.

We're using a VMWare VM as a desktop appliance in developing countries where there is no internet access - ie our master VM is copied onto each computer as an appliance, and after starting up the VM, users simply click a button to launch a browser with the application.

In one installation, however, the computer's clock was accidentally set to 2012 prior to installation of the VM.  Once the error was noticed, the clock was corrected, but the VM then stopped working, giving the following error:
"Errors were found while checking the disk drive for /
F to attempt to fix the errors, I to ignore, S to skip mounting, or M for manual..."

If 'F' is chosen, the VM launches, but the error then reappears next time the VM is started.  When the clock is changed back to 2012, this error disappears and the VM launches fine, but when the clock is returned to 2011, the VM returns the error message again!

I can't figure out how a clock setting could be affecting the VM's virtual hard disk integrity...  Has anybody come across this bug before, or (even more importantly) figured out how to resolve it?  (Our team had to drive out for half a day to install a new VM and migrate their data - we want to avoid that next time!)

Cheers, Sam.
0
Comment
Question by:samueldjohnson
5 Comments
 
LVL 88

Expert Comment

by:rindi
ID: 36585980
Did you just change the clock on the Host and not inside the Guest? I'd expect the issue you had if you changed the time on the host but not inside the guest. Normally Linux distro's are set to run a file-system check on their file-system after a certain number of mounts, and if the time is changed or not correct I'd expect it to check that file-system. You can turn off this automatic checking within fstab, see the link below:

http://www.debianhelp.co.uk/fstab.htm

For example:

# <device> <mountpoint> <filesystemtype><options> <dump> <fsckorder>

/dev/hdb2        /home                  ext2               defaults       1             2
/dev/hda1     /mnt/dos/c              msdos              defaults        0             0

The "2" in the fsckorder section for hdb2 means that the system will check that partition, while if there is a "0" like for hda1 it won't be checked.

0
 
LVL 119
ID: 36586044
Have you got VMware Tools installed, and Checked it's The VM is Syncing with the Host?
0
 
LVL 3

Expert Comment

by:RitBit
ID: 36592923
For all time/clock related issues see this VMware knowledge base :

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427

It comes down to this: make sure your Host runs on NTP and the vm's absolutely do NOT use ntp but use the time-sync via vmware tools. On some linux kernels you need an extra line like "clocksource=pit" but all those details are in the knowledgebase i pointed you to.

Good luck.
0
 
LVL 3

Accepted Solution

by:
RitBit earned 500 total points
ID: 36592950
Oh, forgot to explain why time issues mess up your system:

Since a virtual machine is scheduled by the hypervisor the internal clock of a VM is untrustfull as it has to skip steps based on how much time it got from the hypervisor-scheduler. As most processes within a OS are dependent on correct timing it's important to correct the clock within the VM with the exact time as kept within the hypervisor. The only way to do so is to use the vmware-tools timesync option.

As the file-system administration is depending on a correct clock it makes sense your file system got messed up. For databases this is much worse and a vm-clock that does not skip correctly can destroy your whole database.

Please take good care of the clock-source settings as mentioned in the knowlegdebase article to prevent such issues.
0
 

Author Comment

by:samueldjohnson
ID: 36594875
Many thanks for all of your input - it definitely sounds like the file system has become confused by this clock setting.  I'll have a remote look at this VM tomorrow (Monday), and feed back how it went.

We're actually in the process of developing a new application that will also run on a VM, and to get around these potential time errors (particularly with database time-stamping!), we're asking the user to input the current data and time before they even enter the application - if this differs by more than 10 mins from the VM clock, then the application will shut down...

Many thanks,

Sam.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
backup strategy concern 5 79
ESXi VM of Server 2003 Saving Slow. 7 60
Use case from Vsphere Tagging 4 36
Do hyper-v and VMware clash 4 59
HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question