"The reasonable man adapts himself to the world; the unreasonable man persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw
11 Aug 2015 | virtualbox, virtualmachine, archlinux, linux, development, bash, script
Some recurring issues I’ve had with VirtualBox and Arch Linux and their solutions. This bash script implements all these solutions.
Quite often when the Arch Linux VM is started from a previously saved machine state or the VM resumes after the Windows host machine wakes-up from sleep, the VM’s time doesn’t synchronize with the current host time. I tried setting the timesync threshold as follows but that didn’t help.
VBoxManage guestproperty set {VM name} /VirtualBox/GuestAdd/VBoxService/timesync-set-threshold {threshold}
I didn’t invest too much time into investigating the root cause of this problem and the easiest solution I found was to use ntpd (Network Time Protocol daemon).
sudo pacman -S ntp
sudo ntpd -qg
to manually synchronize time and date with the networksudo hwclock --systohc
will set the VM’s hardware clock to the system clock set by ntpdSometimes, when you change your Wi-Fi connection (e.g. work Wi-Fi to home Wi-Fi), the network/internet doesn’t work.
The following seems to fix this:
$ sudo systemctl restart systemd-networkd # Restart the network daemon $ sudo resolvconf -u # Regenerate DNS configuration & inform all subscribers
The Window Manager (OpenBox in my case) resizes and the panel moves to the bottom of the screen but it looks like the wallpaper doesn’t resize, where infact, it is the LXQT desktop module that hasn’t resized. This failure happens in spite of the following:
vboxvideo
and vboxguest
already loadedVBoxClient-all
runningRestarting the LXQT desktop module fixes this. You can do this from the ‘LXQT settings -> Session Settings’ window but I prefer the command line version:
$ sudo pcmanfm-qt --desktop-off --profile lxqt # Turn off the desktop manager $ sudo pcmanfm-qt --desktop --profile lxqt # Turn off the desktop manager