43 lines
2.2 KiB
Markdown
43 lines
2.2 KiB
Markdown
---
|
|
title: FreeBSD Virtual Machine
|
|
description: Tips and tricks for running a FreeBSD guest under KVM
|
|
published: true
|
|
date: 2022-04-30T20:10:29.996Z
|
|
tags: kvm, virt-manager, freebsd, virtualization
|
|
editor: markdown
|
|
dateCreated: 2022-04-30T19:57:51.313Z
|
|
---
|
|
|
|
Linux's KVM (Kernel Virtual Machine) is great.
|
|
|
|
The FreeBSD operating system is also great.
|
|
|
|
You know what's great? running FreeBSD as a KVM guest!
|
|
|
|
Here are some insights into the process.
|
|
|
|
|
|
# VM image or .ISO installation?
|
|
|
|
FreeBSD offers both premade virtual machine disks (in particular, we care about the `.qcow2` image) and installation ISO's - a netinstall, a minimal install and a full installation.
|
|
|
|
Both have their uses:
|
|
|
|
The VM image is:
|
|
- Far quicker to set up - it expands to a disk and is ready to go.
|
|
- Kind of bothersome to expand - it's about 5GB and `virt-manager` does not offer a nice GUI for expanding the disk. Not impossible, but not friendly. (see [resizing qcow2 article](https://linuxconfig.org/how-to-resize-a-qcow2-disk-image-on-linux) - maybe GParted can do this?)
|
|
- Uses UFS - great for simple stuff without the overhead of ZFS, not great if you want the bling and oomph of ZFS
|
|
|
|
The ISO's are:
|
|
- More similar to a physical install. If you need to do this for bare metal at some point, it's pretty much the same.
|
|
- Much more configurable - you can set the filesystem, swap, encryption, and hardening in the nice sysinstall TUI instead of manually later
|
|
- Slower to set up, obviously
|
|
- If using network setup (you should), you need to be absolutely certain the VM has network access (see [Setting up a network bridge](/KVM_Network_Bridge)) or you're going to waste a lot of time.
|
|
|
|
# Post install - system hangs at boot time
|
|
So appearantly, if you select the FreeBSD profile in virt-manager when installing the VM, KVM adds a serial device - which is both useless and throws BSD into a loop. This won't hamper the installatin - but you won't get to the login prompt afterwards.
|
|
|
|
If everything look OK but you're not getting to the login screen, remove the serial device from the VM's hardware.
|
|
|
|
> Source: [FreeBSD forums thread](https://forums.freebsd.org/threads/freebsd13-wont-boot-in-qemu-kvm-host.80818/)
|
|
{.is-info} |