These days when I’m writing userspace code in C and need to parse strings for structured data, I use libjansson and just require JSON. It’s MIT-licensed and API is simple. Very fast to push out boiler-plate code (that’s how I wrote up the JSON input / output for nfs4-xdr-tools).
FWIW, it’s used by the samba project for their JSON support.
*blink-blink* whoa?! That’s the bug I needed to work on! lol It’s like you just knew! …I was actually just toying with a “language independent tokenizer thing” (obviously not a full parser or anything so we’re not talking about arrays or anything) but I was playing around with parsing (tokenizing) the different styles (no spaces, 15 spaces, equal sign / colon separator, terminator, etc.) and JSON was giving me the most trouble at the moment. Awesome response!
My code will probably never see the light of day (why would my stuff be good enough for anything but being playing with), but I will defiantly check it out. Have you looked at the libucl library?
for others, note the physical type must be specified to avoid a validation error, while this is assumed on incus command line if no type is specified, not so in the UI (this seems fair)
the gpu name (2080ti) is an arbitrary name
if one messes up adding a gpu it can be removed as follows
here is how it looks, adding the .0 device resulted in all adjacent devices like the usb-c controller also being added - which seems correct (first time ever using incus so YMMV)
Has anyone successfully migrated a 24.10 VM to 25.04-beta? I’ve got 3 I’m trying to bring over and none seem to be working. I’m trying to get a new Debian VM built and everything seems to be throwing a fit except for the linuxcontainer images, but I can’t login to those.
Editing YAML for a custom app, the Apps Web UI doesn’t ‘reload’ the edited YAML, so if you go back to Edit without refreshing first, it’ll show the pre-edited YAML. Made me think I was losing my mind at first.
Disk temps no longer show up under Storage. CPU temps no longer show on the Dashboard. It doesn’t look like CPU utilization is updating properly, either.
Enabling GPU passthrough on my custom Plex docker did not seem to have correct permissions set. I had to add apps/568 to the ‘video’ group on the host. Not sure if I did something in the past to cause this.
Incus’ dnsmasq binds to 53, which was preventing me from deploying a docker image that needs port 53. Manually changed Incus dnsmasq to another port.
Looking forward to the future with only one TrueNAS variant to maintain!
Specifically I can’t get any virtual console/VNC output from anything but the images downloaded automatically from linuxcontainers.org. The ISOs I’ve downloaded directly from Debian and Fedora don’t seem to work. I can’t tell if I’m just not getting video out, or if they’re not booting at all.
Hmm weird, I had problems with VMs too but those were different. Never used the linuxcontainers.org images either. Have you tried connecting to the VNC via a dedicated VNC viewer like Remmina? That is how I was able to connect to my debian VM. Otherwise you can generally check if the VM is running by using incus list in the shell.
Anyone know how to passthru a NIC with the new Incus? I have lovely check boxes for a GPU or a USB device, but any other devices appear to have been ignored. I have a network monitoring VM that I need to passthru a physical NIC that collects SPAN traffic.
That seems right. I don’t think a macvlan would work to gather the hardware level data you’re looking for.
Were you able to passthrough this NIC to a VM using the 24.10 Virtualization and if so how did you have that set up? Is it an onboard NIC or an expansion card? Is it in use by the host or a secondary NIC that isn’t being used for anything else?
Yes, I did this in 24.10 and the way I set it up was after the VM had been created I would click “Devices” under that VM and then click “Add” and select “PCI Passthrough Device” for the type and find the NIC I wanted in the drop down.
I’ve done this with both onboard NICs and expansion cards. YMMV with onboard NICs as they don’t always have the reset capabilities and IOMMU group separation you want to make this work.
The NIC you passthrough can not be in use by the host and once you boot the VM it will be removed from the host Network config screen as an available NIC. It seems to sort of transfer ownership of the NIC from the host to the guest. If you did a ‘cat /proc/interrupts’ before it would show up as a enpXXXX whatever and after it would be IOMMUxxxx or something like that.
Ok so it looks like PCI passthrough wasn’t available yet in BETA, but is in RC.1, which is expected to release in about two weeks. The implementation for that as far as I understand it should be the same as in 24.10, so hopefully this will “just work” after you update to the RC. If not, I’d suggest filing a bug ticket that explains the lost functionality.
Thanks for looking into that, I look forward to RC1.
Now to nail down this IPv6 gateway issue I’m having with my network bridge. Somehow my bridge is getting a public IPv6 subnet from the router, but not assigning the IPv6 gateway. Worked fine before 25.04-beta1, but I want to try a few more things before I submit that bugreport.