diff --git a/README.md b/README.md index 8533326..b267d03 100644 --- a/README.md +++ b/README.md @@ -443,6 +443,13 @@ In the example above: * Port 8123 on the host is forwarded to port 8123 on the guest. * Port 8888 on the host is forwarded to port 80 on the guest. +# Bridged networking + +Connect your virtual machine to a preconfigured network bridge. +Add an additional line to your virtual machine configuration + + * `bridge="br0"` + # USB redirection Quickemu supports USB redirection via SPICE pass-through and host pass-through. diff --git a/quickemu b/quickemu index 841ab2e..4bc0836 100755 --- a/quickemu +++ b/quickemu @@ -815,6 +815,9 @@ function vm_boot() { # See https://github.com/wimpysworld/quickemu/issues/115 if [ "${guest_os}" == "windows" ] && [ -n "${iso}" ]; then args+=(-nic none) + elif [ -n "${bridge}" ]; then + # Enable bridge mode networking + args+=(-nic bridge,br=${bridge},model=virtio-net-pci) else # shellcheck disable=SC2054,SC2206 args+=(-device ${NET_DEVICE},netdev=nic -netdev ${NET},id=nic) @@ -965,6 +968,7 @@ function usage() { # Lowercase variables are used in the VM config file only boot="efi" +bridge="" cpu_cores="" disk_img="" disk_size=""