libvirt bridge network configure

If you want to configure all the parameters of your virtual machine, you can issue the command like this:

virsh edit ubuntu22.04-test

In the GUI of NIC configuration, you can choose a configuration item from a drop box,such as “default”,‘bridged-network’ or ‘docker machines’.
You also can issue this command to query the network defined:

virsh net-list

you can also edit those configuratoin by issue the command below, like this:

virsh net-edit bridged-network

sometimes you want to define your own network configuration, you can edit a network configuration in bridged-network2.xml like this:
bridged-network2.xml
Then you issue these commands to define this network configuration:

virsh net-define bridged-network2.xml
virsh net-autostart bridged-network2
virsh net-start bridged-network2

Noted that you should create bridge br1 first:

brctl addbr br1

After this, you can select bridged-network2 option on the libvrit virtual machine configuration UI.

Reference:

  1. https://wiki.libvirt.org/Networking.html#bridged-networking-aka-shared-physical-device
  2. https://wiki.debian.org/BridgeNetworkConnections
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值