# OpenBSD VMM Install Guide This is a quick OpenBSD install guide for VMM. **NOTE**: This guide is **no** substitute for reading the [OpenBSD FAQ](https://www.openbsd.org/faq/). In particular, you should read the [[Installation Guide](/https://www.openbsd.org/faq/faq4.html) **NOTE**: This guide is **no** substitute for reading the [OpenBSD FAQ](https://www.openbsd.org/faq/). In particular, you should read the [[Installation Guide](/https://www.openbsd.org/faq/faq4.html) # [VMM(4)](/https://man.openbsd.org/vmm) is a hypervisor, which allows us to run multiple virtual machines inside a single physical server (a dedicated server). Your virtual machine is a guest which lives inside the host. You will first need to connect to the host, which runs the hypervisor. For IRCNow, this host is host.ircnow.org. # For Linux/Mac, open up a terminal and run `$ ssh username@host.ircnow.org` -- note that the hostname is host.ircnow.org and **not** username.host.ircnow.org. # For Windows, you can use [PuTTY](/Shell/ShellPutty). For hostname, put `username@host.ircnow.org` -- note that the hostname is host.ircnow.org and **not** username.host.ircnow.org. # **NOTE**: The host is **not** your personal VM. Your personal VM is a guest inside the host, and will have the name username.host.ircnow.org, not host.ircnow.org. The guest lives inside the host, so in order to create the guest, you must first log in to the host. # Once inside the host (host.ircnow.org), type `vmctl console ` in order to open up the [serial console](/https://man.openbsd.org/cu). The serial console will allow you to see the virtual machine during bootup. Your VM name is most likely your username.\\ Attach:Openbsd.Vmminstall/vmminstall-1.png # At any time, if you want to escape the serial console, type `~.` (tilde followed by a period) or `~^d` (tilde followed by ctrl+d). **Note**: ^d is ctrl+d. Sometimes, you may need to press enter a few times before the `~.` or `~^d` combination works. On some keyboards, you may need to type `~~.` (two tildes followed by a period). # You can safely ignore the error message `Boot failed: not a bootable disk`. By default, your virtual machine will boot from the OpenBSD ISO image when there is no operating system installed. After the OS is installed, your virtual machine will automatically boot from hard disk instead of ISO image. There is no need to mount/unmount the ISO image.\\ Attach:Openbsd.Vmminstall/vmminstall-2.png # Once you see the bootup screen, follow the normal [install instructions](/openbsd/install71).\\ Attach:Openbsd.Vmminstall/vmminstall-5.png ## Upgrade/Reinstall # If you want to upgrade or reinstall the operating system, follow the [bsd.rd](/openbsd/bsdrd) install guide. In this case, you will want to type something immediately after you see the boot prompt to prevent the system from automatically booting. If the system automatically boots by accident, you will want to restart the system. You can log in and then run `$ doas shutdown -r now` to reboot. # If you want to delete your existing virtual machine and start from scratch, exit the serial console by typing `~.` or `~^d`. Then, shut down your virtual machine by typing `vmctl stop ` -- your VM name is most likely your username. Afterwards:\\ cd ~/ rm .qcow2 # The VM name is probably your username vmctl create -s 20G .qcow2 vmctl start vmctl console \\ Attach:Openbsd.Vmminstall/vmminstall-3.png # During [installation](openbsd/install71), here are the networking values you need for [[static networking](/openbsd/staticnet): # During [installation](openbsd/install71), here are the networking values you need for [[static networking](/openbsd/staticnet): # IPv4 address: 38.87.162.xxx, subnet mask 255.255.255.0 -- replace 38.87.162.xxx with your assigned IP address # IPv6 address: 2602:fccf:1:1xxx::, subnet /64 -- replace 2602:fccf:1:1xxx:: with your assigned subnet # Default IPv4 gateway/router: 38.87.162.1 # Default IPv6 gateway/router: 2602:fccf:1::1 Follow the installation guide: [[https://wiki.ircnow.org/index.php?n=Openbsd.Install69]] ## Bug fixes VMM appears to have a bug where VMs lose network connectivity after a few hours. Here is one workaround. Edit your crontab by typing `crontab -e` (**NOTE**: the default text editor is [vi](/openbsd/vi)). Type `G` (capital G) to scroll to the bottom, then type `o` (lowercase o) to add a new line at the bottom, then paste this line: @reboot /usr/bin/tmux new -d 'while true; do /sbin/ping -i5 38.87.162.1; done' \; Press `[Esc]`, then type `:wq` (colon, then w, then q) then press enter to save the file. Afterwards, to ensure it runs right away, execute this once: /usr/bin/tmux new -d 'while true; do /sbin/ping -i5 38.87.162.1; done' \; This helps ensure that a ping runs in the background to keep the network alive. ## See Also || [vmctl(8)](https://man.openbsd.org/vmctl) || [[VMM User Guide](/openbsd/vmmuser) || || [vmctl(8)](https://man.openbsd.org/vmctl) || [[VMM User Guide](/openbsd/vmmuser) ||