VirtualBox on a MacBook running Ubuntu 18.04

VirtualBox on a MacBook running Ubuntu 18.04

Most annoying feature here is that Ubuntu 18.04 Desktop does not come with sshd running as standard. Yeah, I know I should have gone for the server install and I will get to that soonish, but I am using wireless connection on MacBook and Ubuntu server does not come with wireless network components installed. I know right, already turning into a nightmare! Add to this I opted for an osboxes.org vmi image compounded my issues as the VM appeared to hang on startup.

Issue 1 then, I try to do an apt upgrade and get the following error:

Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

The Ubuntu VM was doing automated (daily) unaccompanied updates. CPU was maxing out at 100%. Web searches indicated if this daily process was found then let it finish. 34 minutes later and I had enough of that. Toggle auto updates off, and then shutdown -r now to restart the box.

osboxes@osboxes:~$ sudo vi /etc/apt/apt.conf.d/20auto-upgrades
[sudo] password for osboxes:
osboxes@osboxes:~$ sudo cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
osboxes@osboxes:~$ shutdown -r now

Okay, update the VM manually and discover there is a compatibility issue with VirtualBox Guest Additions.

osboxes@osboxes:~$ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox-guest-dkms-hwe : Conflicts: virtualbox-guest-dkms
E: Broken packages

This is probably why the automated updates was getting all in a tizzy. No obvious solution found so I just uninstalled the offending package. 5 mins later I have an updated VM and I can repeatedly stop/start and run apt upgrade on it.

Next task, need ssh. Back to apt then and install ssh server.

sudo apt install openssh-server

Finally I have a VM and I can run that 4 line playbook on it.

Comments are closed.