
Sometimes… Even the best administrator did some mistakes. You know, a small firewall rule (opens new window), dropping all access on your server… Or maybe a kernel panic with a ddb prompt (opens new window) because you were playing with some strange ioctl. Okay, your server is dead, you need a prompt NOW. So how to restore it in its previous state if you don’t have access remotely (with SSH)?
OpenBSD Amsterdam gives you a beautiful way to that! Firstly, no graphical interfaces, no Webui, only good old SSH connection between my laptop and their OpenBSD Host. Last week I lose my connection with my server, due to a dynamic route issue (I’m not so good as netadmin) and I tweeted to OpenBSDAms (opens new window) to have an access to the console.
Nice service! Rapid answer! They gave me an access to the host where my VM runs. If you have already a server, they already have your ssh public key and your username. You can reuse them on this host! (sorry, I will not communicate the name, I don’t know if this is public or not, if you want it, contact them).
So we have now a shell over ssh, you can grab access to your Virtual
Machine by using [vmctl console](https://man.openbsd.org/vmctl#console) ${your_vm_name} where
${your_vm_name} is the name of your virtual machine running on this
server. Well, to have it, you can list all available VM on this host
by using [vmctl status](https://man.openbsd.org/vmctl#status)or [vm show](https://man.openbsd.org/vmctl#show)(its an alias).
[vmctl console](https://man.openbsd.org/vmctl#console)uses
[cu](https://man.openbsd.org/cu)(classic serial line), if you want
to shutdown your serial connection, you can type ~t shortcut on your
screen (if you are using ssh, and it will be probably the case, you
should type ~~t because ssh uses also ~ as escape
character (opens new window)).
You have a blank screen when you are using vmctl console ? Maybe
your VM is really dead at this time! If you want to reboot it, you can
use [vmctl stop](https://man.openbsd.org/vmctl#stop) ${your_vm_name}
and [vmctl start](https://man.openbsd.org/vmctl#start) ${your_vm_name}.
Cool features! Cool team! Thanks to OpenBSD Amsterdam! Next article? Updating our Virtual Machine? It seems they are working on it for the next OpenBSD release (opens new window)!
