Ubuntu VM Service Won’t Restart Until Vagrant Reload

Hi, hoping someone may be familiar with this issue, though I'm not certain it is Vagrant. But any advice is helpful.

**Environment**: Ubuntu 20.04 > VirtualBox > Vagrant > Ubuntu 20.04
**TLDR**: Ubuntu VM service fails with "IndexError" - won't restart with reboot. Have to reload VM entirely.

I'm running a number of services on an Ubuntu 20.04 VM, running using Vagrant. I'm fairly certain there are multiple issues at play, but when the service fails it gives an error for the service when running ***journalctl -f -u*** as per below (clipped):

`'timestamp': np.fromfile(datafile, dtype='|S32', count=1)[0],`

`IndexError: index 0 is out of bounds for axis 0 with size 0`

Now, I realise that this indicates a code-related issue, and from what I've read it may be memory related. But..

**When I reboot the VM the service is still stuck in that state. It does not refresh.**

The only way to get the VM running again is to shut it down and then do a `vagrant reload`

And this is why I'm here. To me the fact that vagrant needs to reload the VM indicates maybe I could resolve this with a config change. Not sure.

Any thoughts would be wonderful!

Vagrantfile is as per below:

`Vagrant.configure("2") do |config|`
[`config.vm.box`](https://config.vm.box) `= "generic/ubuntu2004"`
[`config.vm.network`](https://config.vm.network) `"private_network", ip: "`[`192.168.33.10`](https://192.168.33.10)`"`
`config.vm.synced_folder "data", "/vagrant_data"`
`config.vm.provider "virtualbox" do |vb|`
`vb.memory = "4096"`
`vb.cpus = 2`
`end`
`end`

1 thought on “Ubuntu VM Service Won’t Restart Until Vagrant Reload”

  1. I have no idea how to do this either, I am trying to install Docker and microk8s and I am trying to avoid a reboot but it seems that I can’t, also I get some permissions errors when trying to start microk8s and have to create a run once script from a reloaded post install too

    Reply

Leave a Comment