From b626d40fcdedfc62141a0a25fd0e550225d04672 Mon Sep 17 00:00:00 2001 From: Willem Date: Tue, 28 Oct 2025 09:18:32 -0400 Subject: [PATCH] fix: pxe vm lab setup to work on ubuntu machine --- docs/pxe_test/pxe_vm_lab_setup.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/pxe_test/pxe_vm_lab_setup.sh b/docs/pxe_test/pxe_vm_lab_setup.sh index f53cea3..996b822 100755 --- a/docs/pxe_test/pxe_vm_lab_setup.sh +++ b/docs/pxe_test/pxe_vm_lab_setup.sh @@ -122,20 +122,21 @@ EOF fi echo "Creating OPNsense VM using serial image..." - virt-install \ - --connect "${CONNECT_URI}" \ - --name "${VM_OPN}" \ - --ram "${RAM_OPN}" \ - --vcpus "${VCPUS_OPN}" \ - --cpu host-passthrough \ - --os-variant "${OS_VARIANT_OPN}" \ - --graphics none \ - --noautoconsole \ - --disk path="${disk_opn}",device=disk,bus=virtio,boot.order=1 \ - --disk path="${OPN_IMG_PATH}",device=disk,bus=usb,readonly=on,boot.order=2 \ - --network network=default,model=virtio \ - --network network="${NET_HARMONYLAN}",model=virtio \ - --boot uefi,menu=on + virt-install \ + --connect "${CONNECT_URI}" \ + --name "${VM_OPN}" \ + --ram "${RAM_OPN}" \ + --vcpus "${VCPUS_OPN}" \ + --cpu host-passthrough \ + --os-variant "${OS_VARIANT_OPN}" \ + --graphics none \ + --noautoconsole \ + --import \ + --disk path="${disk_opn}",device=disk,bus=virtio,boot.order=2 \ + --disk path="${OPN_IMG_PATH}",device=disk,bus=usb,readonly=on,boot.order=1 \ + --network network=default,model=virtio \ + --network network="${NET_HARMONYLAN}",model=virtio \ + --boot uefi,menu=on echo "OPNsense VM created. Connect with: sudo virsh console ${VM_OPN}" echo "The VM will boot from the serial installation image."