Reinstalling OS with VMM

WARNING: Reinstalling the operating system may delete all files on the disk you install it on (and on any other disks you edit). Make sure to backup any critical system files.

Your virtual machine is a guest which lives inside the host. Normally, you can administer the guest virtual machine by logging in directly to its IP address. However, to reinstall the virtual machine, we must login in to the host, which runs the hypervisor. The hostname may be of the form host.example.com. Check your email or contact your network admin if you are uncertain.

  1. NOTE: The host machine (host.example.com) is NOT the '''

guest virtual machine (username.host.example.com). You have root access inside your '' 'guest machine, but not the host machine.

  1. NOTE: The host is not your personal virtual machine (VM). Your personal VM is a guest inside the host. Because the guest runs inside the host, to obtain serial console access to the guest, you must first log in to the host.

First, login to the host machine:

$ ssh username@host.example.com

Replace username and host.example.com.

Then, forcibly shut down the virtual machine:

$ vmctl stop username

If you would like to make a backup of the disk for the virtual machine, you can make a backup copy as follows:

$ cp username.qcow2 username.qcow2.bak

Replace username.qcow2 with the name of your qcow2 image file.

In case you need to restore the virtual machine disk, simply move username.qcow2.bak back to username.qcow2:

$ mv username.qcow2.bak username.qcow2

Deleting the qcow2 image

You will want to delete (or move) the qcow2 image of your virtual machine disk.

WARNING: Deleting the qcow2 image below will erase all of your data. Are you sure you want to do this? You may want to use dump to take a backup, or copy your qcow2 image first!

$ rm username.qcow2

Next, create a new disk for a virtual machine inside OpenBSD VMM:

$ vmctl create -s 20G username.qcow2

Replace 20G with the disk size you need, and replace username.qcow2. By convention, the disk name for the virtual machine will be the same as your username.

Finally, restart your virtual machine and log in to serial console:

$ vmctl start -c username

See the VMM Install guide for OpenBSD installation instructions.