Fix PXE interface detection, add br-pxe bridge to test VM, network upload import
- Playbook: detect interface already configured with 10.9.100.1 before falling back to non-default-gateway heuristic (fixes dnsmasq binding to wrong NIC when multiple interfaces exist) - test-vm.sh: auto-attach br-pxe bridge NIC if available on host - Webapp: add network upload import via SMB share with shared driver deduplication and symlinks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
13
test-vm.sh
13
test-vm.sh
@@ -138,9 +138,15 @@ echo " Extracted vmlinuz and initrd from casper/"
|
||||
echo ""
|
||||
echo "[4/4] Launching VM ($VM_NAME)..."
|
||||
|
||||
# Use the default libvirt network (NAT, 192.168.122.0/24)
|
||||
# The VM gets a DHCP address initially for install access.
|
||||
# The Ansible playbook will later configure 10.9.100.1/24 for production use.
|
||||
# Use the default libvirt network (NAT, 192.168.122.0/24) for install access.
|
||||
# If br-pxe bridge exists, add a second NIC for the isolated PXE switch.
|
||||
# The Ansible playbook will configure 10.9.100.1/24 on the PXE interface.
|
||||
PXE_BRIDGE_ARGS=""
|
||||
if ip link show br-pxe &>/dev/null; then
|
||||
PXE_BRIDGE_ARGS="--network bridge=br-pxe,model=virtio"
|
||||
echo " Found br-pxe bridge, adding isolated switch NIC"
|
||||
fi
|
||||
|
||||
virt-install \
|
||||
--name "$VM_NAME" \
|
||||
--memory "$VM_RAM" \
|
||||
@@ -149,6 +155,7 @@ virt-install \
|
||||
--disk path="$UBUNTU_ISO",device=cdrom,readonly=on \
|
||||
--disk path="$CIDATA_ISO",device=cdrom \
|
||||
--network network=default \
|
||||
$PXE_BRIDGE_ARGS \
|
||||
--os-variant ubuntu24.04 \
|
||||
--graphics none \
|
||||
--console pty,target_type=serial \
|
||||
|
||||
Reference in New Issue
Block a user