(:redirect Vmm.install:)
OpenBSD VMM Install Guide
This is a quick OpenBSD install guide for VMM.
NOTE: This guide is no substitute for reading the OpenBSD FAQ. In particular, you should read the [Installation Guide NOTE: This guide is no substitute for reading the OpenBSD FAQ. In particular, you should read the [Installation Guide
VMM(4) is a hypervisor, which allows us to run multiple virtual machines inside a single physical server (a dedicated server.md). 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 coconut.ircnow.org.
# For Linux/Mac, open up a terminal and run $ ssh username@coconut.ircnow.org
-- note that the hostname is coconut.ircnow.org and not username.coconut.ircnow.org.
# For Windows, you can use PuTTY. For hostname, put username@coconut.ircnow.org
-- note that the hostname is coconut.ircnow.org and not username.coconut.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.coconut.ircnow.org, not coconut.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 (coconut.ircnow.org), type vmctl console <VM name>
in order to open up the serial console. The serial console will allow you to see the virtual machine during bootup. Your VM name is most likely your username.\
Attach: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:vmminstall-2.png
Once you see the bootup screen, follow the normal install instructions.\
Attach:vmminstall-5.png
Upgrade/Reinstall
If you want to upgrade or reinstall the operating system, follow the bsd.rd 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, 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 <VM name>
-- your VM name is most likely your username. Afterwards:\
cd ~/
rm <VM name>.qcow2 # The VM name is probably your username
vmctl create -s 20G <VM name>.qcow2
vmctl start <VM name>
vmctl console <VM name>
\
Attach:vmminstall-3.png
During installation, here are the networking values you need for [static networking:
During installation, here are the networking values you need for [static networking:
# 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). Type G
(capital G) to scroll to the bottom, then type o
(lowercase o.md) 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) || [VMM User Guide || || vmctl(8) || [VMM User Guide ||