LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2019, 11:06 AM   #1
Christopher Wylie
LQ Newbie
 
Registered: Mar 2018
Posts: 14

Rep: Reputation: 22
VM`s in VirtualBox show wrong time after some time


Hello!

I have some VM on VirtualBox. They recently do not show the right date or time, I think it is the time from the last time the VM was running.
I searched some on the Internet, but I find only Guest Addition is required.
Is it possible to fix time without Guest Addition?
I have 10 different VM.

I think this is new, was not happening before.

Thank You.
 
Old 02-09-2019, 12:07 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,018
Blog Entries: 5

Rep: Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872Reputation: 2872
What is your host operating system and what are your guest operating systems?

Does the issue replicate itself across all guests?

Which version of VirtualBox are you using?

Why don't you want to install Guest Additions?
 
Old 02-09-2019, 02:48 PM   #3
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 987

Rep: Reputation: 260Reputation: 260Reputation: 260
I run my VMs in VMWare, not sure if it's different from VBox
If you run this command: timedatectl, you should get something similar to the output below:
Code:
[jo@localhost ~]$ timedatectl
               Local time: Sat 2019-02-09 12:24:34 MST
           Universal time: Sat 2019-02-09 19:24:34 UTC
                 RTC time: Sat 2019-02-09 19:24:25
                Time zone: America/North Pole (MST, -0700)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
All my VMs have "System clock synchronized: yes", and "RTC in local TZ: no". But when I install directly to the HDD instead of in VMWare, it's the opposite for System clock synchronized, it will be "no", this changes the hardware clock to UTC which throws it off a few hours due to my timezone and the time displayed in all OSs including Windows is out by a few hours.
To rectify this in the Linux installed to the HDD, I change "RTC in local TZ" to "yes" with this command: timedatectl set-local-rtc 1.
Basically, they should be opposite where if System clock synchronized is set to "yes", RTC in local TZ should be set to "no", if System clock synchronized is set to "no", RTC in local TZ should be set to "yes", this appears to keep my hardware clock to correct local time and all OSs be it VMs or HDD installs display correct time.
You can learn more about this over here.

Last edited by Brains; 02-09-2019 at 02:50 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virtualbox or virtualbox ose manuleka Linux - Software 2 06-11-2009 03:56 PM
fuser /dev/dsp show nothing. but no way to play audio ... it happens after some time masakrator Linux - Desktop 2 01-15-2009 03:51 PM
Weird Problem with HLDS. Some IPs show, some don't. maidenseye Linux - Software 1 08-31-2005 10:13 AM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 01:46 AM
possible character encoding probelm - some characters show up wrong. ukultra Linux - Newbie 2 10-05-2003 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration