2

I have Ubuntu Server installed (quantal, 12.10, 32-bit), as a VM guest using Hyper-V with Windows 8.

Note I am using this on my laptop. When I re-open my laptop, the time is no longer synchronised with the VM.

How often does the time synchronisation process take? Is it possible to enforce it somehow?

I can see the following modules installed on Ubuntu: * hv_storvsc * hv_netvsc * hv_utils * hv_vmbus

I have time sync checked under "Synchronistaion services" in Hyper-V.

Note I don't want my VM to require internet access, so unfortunately using an Internet date sync server will not work.

Thanks

3 Answers 3

1

Install Microsoft's Linux Integration Services on the VM you are having issues with.

  • Downloading the Linux Integration Components v2.1
  • Mount the ISO in the VM
  • Run these commands as root under the VM:

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
mkdir /linuxic
cp –R /mnt/cdrom/* /linuxic
cd /linuxic/
make
make install
  • Reboot the VM
  • Run this command under the VM as root to verify it worked

    /sbin/lsmod | grep vsc

Source: Installing Linux Integration Services v2.1 Hyper-V R2 On CentOS 5 (courtesy of the Internet archive's Wayback Machine).

1

According to Installing and Activating Hyper-V Linux Integration Services, Ubuntu has included Ubuntu Hyper-V Integration Services since 12.04. The article lists the steps to activate these services:

  1. The first step is to edit the "modules" file located in /etc/initramfs-tools using this command:

    sudo vi /etc/initramfs-tools/modules
    
  2. In vi Editor, navigate to the last line in the file and use the insert (I) command to append and enter the following lines:

    hv_vmbus
    hv_storvsc
    hv_blkvsc
    hv_netvsc
    
  3. Save the file by hitting the Esc key and then issuing the ":x" command

  4. Next, run the following command to re-initialize the "modules" file:

    sudo update-initramfs –u
    
  5. Finally, reboot the virtual machine by executing the below command in Shell:

    sudo shutdown -r now
    

    Once the guest virtual machine is rebooted, the LIS drivers and services will be registered in the system.

2
  • I just realized that my answer doesn't really answer the original question. I mistakenly read the first answer and assumed that it fully answered the question. Next time, I'll read the question more carefully. Commented Mar 23, 2017 at 14:44
  • Why do you say your answer doesn't really answer the original (my) question? Seems like you attempt to provide a relevant answer here. I am still struggling with stalling datetime on the guest, all the modules you have mentioned are loaded (hv_*). NTP is uninstalled, per Microsofts recommendation. Keep in mind this is Debian, not Ubuntu (which I understand is a Debian derivative). Commented Apr 9, 2018 at 16:19
0

I think Time Synchronization in Hyper-V may answer your questions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .