Step 1: Configure VirtualBox VM Network Settings
- Stop your VirtualBox guest VM.
- Open the Settings for the VM.
- Navigate to the Network section.
- In Adapter 1 (or an unused adapter tab), ensure the Enable Network Adapter checkbox is selected.
- Change the Attached to: dropdown to Bridged Adapter.
- In the Name dropdown, select your host machine’s physical network interface (e.g.,
enp0s3,eth0, or the name of your physical Wi-Fi/Ethernet adapter) that is connected to your local network/router. - Set Promiscuous Mode to Allow VMs or Allow All.
- Click OK to save the settings and start the VM.
- Create a new Netplan configuration file (e.g.,
99-lxd-bridge.yaml) in/etc/netplan/. - Edit the file, replacing
enp0s3with your actual guest physical interface name (found usingip addrorifconfig):
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: no
bridges:
br0:
dhcp4: yes
interfaces:
- enp3s0
parameters:
stp: falseApply the Netplan configuration with sudo netplan apply (this will briefly disconnect you if using SSH).
Update the Profiles: “LXD UI > Profiles > default” “yaml” file as below.
name: default
description: Default LXD profile
devices:
eth0:
name: eth0
nictype: bridged
parent: br0
type: nic
root:
path: /
pool: default
type: disk
config: {}
access_entitlements:
- can_delete
- can_edit
project: default