search

Showing posts with label virtualbox. Show all posts
Showing posts with label virtualbox. Show all posts

Friday, October 28, 2016

How to set custom time and date on virtual machine

If your virtual machine is managed by VirtualBox, there are 2 services which synchronize date and time. The first step is to stop them from restoring the time:
sudo service systemd-timesyncd stop
sudo service vboxadd-service stop
After that you can set time with date command, for example:
sudo date +%T -s "00:12:00"
or
date -s "27 OCT 2016 00:12:00"
or
date +%Y%m%d -s "20161027"

Monday, October 10, 2016

fedora: Install latest VirtualBox

The latest virtualbox can be installed from the Oracle repository. First of all we need to install oracle repository:
cd /etc/yum.repos.d/
sudo wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
Install dependencies:
sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms
Install virtualbox. Note: pointing 5.1 is important as at the moment that is how it is called in the oracle's repository:
sudo dnf install VirtualBox-5.1
You might need to rebuild kernel modules with command:
sudo /usr/lib/virtualbox/vboxdrv.sh setup
And add current user to the xboxusers group:
sudo usermod -a -G vboxusers user_name
I had a problem reconfiguring kernel modules on my laptop. The error wasn't indicating anything specific. The problem was in the BIOS settings. Secure Boot should be disabled to allow module reconfiguration.