Solved

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

Posted on 2011-09-23
5
725 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 118
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

If we need to check who deleted a Virtual Machine from our vCenter. Looking this task in logs can be painful and spend lot of time, so the best way to check this is in the vCenter DB. Just connect to vCenter DB(default DB should be VCDB and using…
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now