Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Tutorials and FAQs
»
[Tutorial] Building OPNsense virtual machine images
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Tutorial] Building OPNsense virtual machine images (Read 4387 times)
Maurice
Hero Member
Posts: 1213
Karma: 158
[Tutorial] Building OPNsense virtual machine images
«
on:
August 11, 2023, 04:23:50 pm »
There are (at least) three ways to set up an OPNsense VM:
Install from scratch using an installer image,
use a preinstalled FreeBSD VM image and convert it to OPNsense using opnsense-bootstrap,
build a preinstalled VM image using the OPNsense tools.
I've always preferred the last method and recently streamlined and documented my workflow:
https://github.com/maurice-w/opnsense-vm-images/blob/master/README.md
Thanks a lot to Franco for patiently explaining some of the more obscure build steps!
Cheers
Maurice
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository
Commercial support & engineering available. PM for details (en / de).
Patrick M. Hausen
Hero Member
Posts: 6848
Karma: 575
Re: [Tutorial] Building OPNsense virtual machine images
«
Reply #1 on:
August 11, 2023, 04:37:04 pm »
Fourth way:
git clone ...
vagrant up
https://github.com/punktDe/vagrant-opnsense
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
Maurice
Hero Member
Posts: 1213
Karma: 158
Re: [Tutorial] Building OPNsense virtual machine images
«
Reply #2 on:
August 11, 2023, 05:03:50 pm »
Yep, appreciate all your work there! It has specific requirements though (VirtualBox, Vagrant, amd64, UFS only, ...) and is intended primarily for development. Correct me if I'm wrong.
My goal was to provide instructions which work for many (production) environments. I have OPNsense instances running on-prem on Hyper-V (amd64), in the cloud on QEMU (amd64 + aarch64) and I'm exploring other options as well.
Cheers
Maurice
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository
Commercial support & engineering available. PM for details (en / de).
Patrick M. Hausen
Hero Member
Posts: 6848
Karma: 575
Re: [Tutorial] Building OPNsense virtual machine images
«
Reply #3 on:
August 11, 2023, 10:17:38 pm »
For production I don't see a problem with performing a manual installation from distribution iso/img. OPNsense installs in less than five minutes. Depending on your infrastructure (e.g. vSphere) you can create a template from the finished installation with a couple of clicks.
Yes, my small project is not intended for production use, because it uses a desktop hypervisor.
Kind regards,
Patrick
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
Maurice
Hero Member
Posts: 1213
Karma: 158
Re: [Tutorial] Building OPNsense virtual machine images
«
Reply #4 on:
August 11, 2023, 11:01:24 pm »
5 minutes is optimistic, more like 10 in my experience. And 30 times 10 minutes is five hours.
I just prefer to have a collection of up-to-date VM images in the drawer which can be used to spin up a VM in literally seconds.
Also, an interactive installation can be a real pita in cloud environments, which sometimes don't even have a proper video and / or serial console. Yes, you can create templates from interactively installed VMs, but these have other disadvantages (like not automatically growing the root partition and file system after expanding the image).
For aarch64, I'm not even aware of an interactive installation method. opnsense-bootstrap isn't supported either.
I'm not trying to convince anyone that any particular method is best. I've used all three extensively over the past six years, and that's what works best for me. By far. Other methods might work better for others, absolutely.
Cheers
Maurice
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository
Commercial support & engineering available. PM for details (en / de).
Patrick M. Hausen
Hero Member
Posts: 6848
Karma: 575
Re: [Tutorial] Building OPNsense virtual machine images
«
Reply #5 on:
August 11, 2023, 11:21:00 pm »
Seriously, what's your use case for aarch64?
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
Maurice
Hero Member
Posts: 1213
Karma: 158
Re: [Tutorial] Building OPNsense virtual machine images
«
Reply #6 on:
August 11, 2023, 11:45:03 pm »
Good value for money cloud VMs. All the big players now offer very competitive ARM instances. I'm aware OPNsense-aarch64 is not yet officially supported, but it already works quite well.
Logged
OPNsense virtual machine images
OPNsense aarch64 firmware repository
Commercial support & engineering available. PM for details (en / de).
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Tutorials and FAQs
»
[Tutorial] Building OPNsense virtual machine images