fix: works to install on virtual disk

This commit is contained in:
2025-10-30 11:47:25 -04:00
parent b626d40fcd
commit 3f7c2cd46d

View File

@@ -122,21 +122,22 @@ EOF
fi fi
echo "Creating OPNsense VM using serial image..." echo "Creating OPNsense VM using serial image..."
virt-install \
--connect "${CONNECT_URI}" \ virt-install \
--name "${VM_OPN}" \ --connect "${CONNECT_URI}" \
--ram "${RAM_OPN}" \ --name "${VM_OPN}" \
--vcpus "${VCPUS_OPN}" \ --ram "${RAM_OPN}" \
--cpu host-passthrough \ --vcpus "${VCPUS_OPN}" \
--os-variant "${OS_VARIANT_OPN}" \ --cpu host-passthrough \
--graphics none \ --os-variant "${OS_VARIANT_OPN}" \
--noautoconsole \ --graphics none \
--import \ --noautoconsole \
--disk path="${disk_opn}",device=disk,bus=virtio,boot.order=2 \ --import \
--disk path="${OPN_IMG_PATH}",device=disk,bus=usb,readonly=on,boot.order=1 \ --disk path="${OPN_IMG_PATH}",device=disk,bus=sata,boot.order=1 \
--network network=default,model=virtio \ --disk path="${disk_opn}",device=disk,bus=virtio,boot.order=2 \
--network network="${NET_HARMONYLAN}",model=virtio \ --network network=default,model=virtio \
--boot uefi,menu=on --network network="${NET_HARMONYLAN}",model=virtio \
--boot hd,menu=on
echo "OPNsense VM created. Connect with: sudo virsh console ${VM_OPN}" echo "OPNsense VM created. Connect with: sudo virsh console ${VM_OPN}"
echo "The VM will boot from the serial installation image." echo "The VM will boot from the serial installation image."