Virtual Machines

Recovery

If you have got your machine into an unbootable or un-networked state you can recover it from the "OOB Console". OOB stands for "out of band", meaning you can get to it even when your running VM is completely inaccessible.

The OOB console allows you to jump onto the serial console and to configure boot options. To access the serial console, connect to the OOB console and press 's'. You can break out of that back to the OOB menu by pressing ctrl + ].

By default your VM will boot using a copy of GRUB the same as a normal PC would. If you reboot while connected to the serial console, you will see grub pop up as part of the boot process. If however GRUB has become broken in some way, you can boot the VM from a kernel image file stored on the host.

To configure an alternative boot method, press 'b' on the OOB console to get to the boot loader menu. From here you can choose to start the VM with an alternative kernel file and specify the command line that you give to that kernel.

Useful kernel options:

  • single - Single user mode, a common troubleshooting mode.
  • init=/bin/bash - Bypass the usual init and get a prompt on the root filesystem. You will need to issue a mount -o remount,rw / to make any changes and don't forget to type sync a few times before you log out as the kernel panics when you do this.
  • biosdevname=0 net.ifnames=0 - Start the machine with old style ethX network device naming rather than the new ens style.

Once you have repaired the boot loader, don't forget to switch the VM back to its built in boot loader. The kernel version that it picks up from the host will vary and may be unpredictable in future, this feature exists only to repair the VM not to be a permanent running state.


All prices are exclusive of VAT.
Portfast Ltd :: Registered in England #6061075, 331 Millhouses Lane, Sheffield, S11 9HY