opnsense 22.1 for VMware ESXi ARM Fling on raspberry pi4B 8gb

Started by sharezone, November 23, 2021, 04:34:38 PM

Previous topic - Next topic
Quote from: sharezone on December 05, 2021, 01:00:16 PM
thank .. great

today i execute a revert snapshot and now i hve this problem. i prupose insert in next vmdk image check FS auomatically

Unfortunately, I am not really sure about the cause of the issue. Looks like a limitation of running opnsense inside a virtual machine. I am no expert in this regards. Although, with the right configuration and hypervisor, you can almost reach bare metal performance – there is always some drawbacks (I could write a wiki article about it  ;D ).

Your best bet would be taking snapshots through ESXi instead of opnsense and revert to an older snapshot through ESXi.

Regarding the next (most likely final) image. I am not adding any configuration in particular that would break the boot. Keep in mind that the opnsense initialization is also adding configs. Technically speaking you shouldn't have boot issues with a sane "loader.conf" and "rc.conf" – for a VM you most likely want to delete a few things in those manually. One in particular which you also figured out would be deleting the line with "hw.uart.console" or just setting it to hw.uart.console=""

As I a said in the previous post, I will add the packages folder to the image. You can adjust the the repo file manually (I will write down the instructions once I create the image). You can of course also add the official FreeBSD repo, but I won't take any responsibility for any dependency hell :)

UPDATE: Here is the final image: https://we.tl/t-6zrzXJYDkM

To add the local repo, edit the /usr/local/etc/pkg/repos/OPNsense.conf file:


OPNsense: {
  url: "file:///usr/ports/packages/opnsense/FreeBSD:13:aarch64/21.7.6/latest",
  signature_type: "NONE",
  mirror_type: "NONE",
  priority: 11,
  enabled: yes
}



Perform a pkg update and you are set to go

@efetropy, I downloaded your vmdk image, converted it to qcow2 then I imported to my Raspberry Pi 4 with Proxmox and run it on my new VM, it stops on "Hit [Enter] to boot immediately, or any other key for command prompt". Any guess what could beeing happen ?

Quote from: quiOt on December 07, 2021, 01:40:03 PM
@efetropy, I downloaded your vmdk image, converted it to qcow2 then I imported to my Raspberry Pi 4 with Proxmox and run it on my new VM, it stops on "Hit [Enter] to boot immediately, or any other key for command prompt". Any guess what could beeing happen ?

Do you mean getting a black screen (no output) after you hit enter or does the VM completely crash? If it's a complete crash, let me create a qcow2 image for you directly and we can proceed from there. If there is simply not output I suspect something related to the vm configuration in proxmox. If you have a chance to share some logs, the proxmox vm config etc., I would appreciate it :)

What I did:

Downloaded: OPNsense-devel-202112061334-OpenSSL-vm-aarch64.vdmk.tar.xz
Uncompress with xz -d OPNsense-*-OpenSSL-*-aarch64*.*.xz
Extract vmdk file
Converted it to qcow2 with qemu-img convert -f vmdk -O qcow2 OPNsense-*-OpenSSL-vm-aarch64.vmdk OPNsense-out.qcow2
scp file to rpi proxmox server
Created a VM with OVMF bios
imported the qcow2 file to VM with qm importdisk <vm-id> OPNsense-out.qcow2 local
boot VM and lost console connection after this:

image hosting for website

Now I'm trying to set it up with EXSi ARM fling but when I'm creating the vm file with vmkfstools -i OPNsense-devel-202112061334-OpenSSL-vm-aarch64.vmdk -d thin target.vmdk it prints "Disk is unrepairable.". Now im running vmkfstools -x check.

Edit: after running vmsfstools -x check i got:

Disk needs repair.
Disk is unrepairable.
Disk has scary/unexplainable errors

Edit2: with your previous vmdk ( from November ) i can start the VM.

It's my first time using proxmox/esxi server and opnsense, i will be thankfull if you can give some help offcourse ;)

Thanks!






i think that this vmdk is corrupted because when i execute the command show this messages

[root@shrarm01:/vmfs/volumes/3679591e-7f04ccfd/Firewall/OPNsense] vmkfstools -i last_update.vmdk last_update_1.vmdk
DiskLib_Check() failed for source disk The file specified is not a virtual disk (15).
[root@shrarm01:/vmfs/volumes/3679591e-7f04ccfd/Firewall/OPNsense]

on the tree folder i see

GNUSparseFile.0

i suppose missing descriptor file or *-flat.vmdk file

Quote from: sharezone on December 10, 2021, 12:49:48 PM
you installed proxmox or esxi ARM fling ?

I tried both and i could only boot with esxi but didn't had network interfaces working even with manually configured interfaces.

Quote from: sharezone on December 10, 2021, 01:08:00 PM
i think that this vmdk is corrupted because when i execute the command show this messages

[root@shrarm01:/vmfs/volumes/3679591e-7f04ccfd/Firewall/OPNsense] vmkfstools -i last_update.vmdk last_update_1.vmdk
DiskLib_Check() failed for source disk The file specified is not a virtual disk (15).
[root@shrarm01:/vmfs/volumes/3679591e-7f04ccfd/Firewall/OPNsense]

on the tree folder i see

GNUSparseFile.0

i suppose missing descriptor file or *-flat.vmdk file

I reacreated the image: https://sendgb.com/5xMlT13Xcpq (VMDK, this time no other compression)

Quote from: quiOt on December 10, 2021, 05:38:28 PM
Quote from: sharezone on December 10, 2021, 12:49:48 PM
you installed proxmox or esxi ARM fling ?

I tried both and i could only boot with esxi but didn't had network interfaces working even with manually configured interfaces.

Which kind of network interface are you using?

this last image works without problem . i resubmit the test

i use vmxnet3 without problem

UPDATE

i have this entry on file

OPNsense: {
  fingerprints: "/usr/local/etc/pkg/fingerprints/OPNsense",
  url: "pkg+https://pkg.opnsense.org/${ABI}/22.1/latest",
  signature_type: "fingerprints",
  mirror_type: "srv",
  priority: 11,
  enabled: yes
}

i replace with

Code: [Select]
OPNsense: {
  url: "file:///usr/ports/packages/opnsense/FreeBSD:13:aarch64/21.7.6/latest",
  signature_type: "NONE",
  mirror_type: "NONE",
  priority: 11,
  enabled: yes
}

or add

Just replace it :-)
This repo
url: "pkg+https://pkg.opnsense.org/${ABI}/22.1/latest",
doesn't actually exist

i replaced

root@OPNsense:~ # cat /usr/local/etc/pkg/repos/OPNsense.conf
OPNsense: {
  url: "file:///usr/ports/packages/opnsense/FreeBSD:13:aarch64/21.7.6/latest",
  signature_type: "NONE",
  mirror_type: "NONE",
  priority: 11,
  enabled: yes
}
root@OPNsense:~ # pkg update
Updating OPNsense repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01
Fetching packagesite.txz: 100%  192 KiB 196.4kB/s    00:01
Processing entries: 100%
OPNsense repository update completed. 647 packages processed.
All repositories are up to date.
root@OPNsense:~ #

now why not see plugin ??


Quote from: sharezone on December 11, 2021, 02:07:56 PM
i replaced

root@OPNsense:~ # cat /usr/local/etc/pkg/repos/OPNsense.conf
OPNsense: {
  url: "file:///usr/ports/packages/opnsense/FreeBSD:13:aarch64/21.7.6/latest",
  signature_type: "NONE",
  mirror_type: "NONE",
  priority: 11,
  enabled: yes
}
root@OPNsense:~ # pkg update
Updating OPNsense repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01
Fetching packagesite.txz: 100%  192 KiB 196.4kB/s    00:01
Processing entries: 100%
OPNsense repository update completed. 647 packages processed.
All repositories are up to date.
root@OPNsense:~ #

now why not see plugin ??

I can see that the local repo is initialized. You should be able to install packages from the command line.

Why the plugins tab doesn't work in the GUI, is something I have no answer to. Can you see packages in the "packages" tab?
If yes, maybe I messed up something with the plugins (which I doubt). If the answer is no, maybe the core package does not support local repos in general. I haven't tested it, so can't tell. Someone else with experience might be able to help you better in that case.

There is one other thing you could try though. Just use a local webserver either within opnsense itself or since you are using ESXi, use a second VM (FreeBSD, Linux, or whatever you prefer). Make sure the webserver is reachable from opnsense. You already have the folder structure, so it should be easy. One you're set, just adjust the url of the repo config.

Btw., can you just change the url to
url: "pkg+file:///usr/ports/packages/opnsense/FreeBSD:13:aarch64/21.7.6/latest"
and see if it works?


Quote from: sharezone on December 13, 2021, 03:54:56 PM
on firmware >> packages i see packet

That's how it should be. Under packages you see the installed packages. That means no issues with the GUI.
Looks like the local repo is causing problems. As mentioned earlier, just try to setup a webserver and create your own repo.
Should work that way :-)

I have server web ,private and public  , but i don't know configure the repository. Can you help me ?
Thanks