Fedora 36 KVM安装和设置

回复
admin
网站管理员
帖子: 306
注册时间: 周四 3月 15, 2018 3:56 pm
来自: 广东深圳
联系:

Fedora 36 KVM安装和设置

帖子 admin »

安装KVM
# dnf -y install qemu-kvm libvirt virt-install
# systemctl enable --now libvirtd
# systemctl start libvirtd

设置桥接网卡br0

# add bridge [br0]
# nmcli connection add type bridge autoconnect yes con-name br0 ifname br0

# set IP address for [br0]
# nmcli connection modify br0 ipv4.addresses 10.0.0.30/24 ipv4.method manual

# set Gateway for [br0]
# nmcli connection modify br0 ipv4.gateway 10.0.0.1

# set DNS for [br0]
# nmcli connection modify br0 ipv4.dns 10.0.0.10

# set DNS search base for [br0]
# nmcli connection modify br0 ipv4.dns-search srv.world

# remove the current interface
# nmcli connection del enp1s0

# add the removed interface again as a member of [br0]
# nmcli connection add type bridge-slave autoconnect yes con-name enp1s0 ifname enp1s0 master br0

# restart
# reboot
回复