fix(run-on-macos): override interface setting instead of disable network

To avoid cannot connect to vm after reboot.
This commit is contained in:
mzz 2023-04-19 22:46:57 +08:00 committed by GitHub
parent a2926f361e
commit 1869d5cc67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,18 +77,14 @@ limactl start dae
# Enter the dae VM.
limactl shell dae
# Disable to auto configure network.
echo "network: {config: disabled}" | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
# Manually configure network.
cat << 'EOF' | sudo tee /etc/netplan/50-cloud-init.yaml
cat << 'EOF' | sudo tee /etc/netplan/99-override.yaml
network:
ethernets:
eth0:
dhcp4: true
dhcp4-overrides:
route-metric: 200
use-dns: false
lima0:
dhcp4: true
dhcp6: true