KVM Bridge nmcli 修改网卡等等

之前刚研究 KVM 时,记录的一些笔记

删除不要的 Bridge: br1

# ifconfig br1 down
# brctl delbr br1
# brctl show
$ virt-sysprep --list-operations
$ virt-clone -o centos-02 -n centos-03 -f /opt/kvm_disk/centos-03.qcow2
 
# cloud-init clean
# systemctl restart cloud-init-local.service
# netplan apply

# virsh qemu-agent-command <guest-name> '{"execute":"guest-info"}'

linuxtechi@kvm-ubuntu18-04:~$ sudo apt install cpu-checker
linuxtechi@kvm-ubuntu18-04:~$ sudo kvm-ok

virsh net-update add-last ip-dhcp-host \
   --file "<host mac='00:11:22:33:44:55' ip='192.168.122.45'/>" \
   --live --config

$ virsh dumpxml centos-03|grep 'mac address'
# yum provides avahi-resolve --disablerepo=epel

error: Unsafe migration: Migration may lead to data corruption if disks use cache != none or cache != directsync

# nmcli con show
# nmcli con delete uuid
# nmcli con add type ethernet ifname eth0 con-name eth0 \
  autoconnect yes ip4 192.168.1.10 gw4 192.168.1.1
# nmcli con mod eth0 ipv4.method manual 
# nmcli con mod eth0 ipv4.dns "8.8.8.8 8.8.4.4"
# nmcli con down eth0 && nmcli con up eth0

作者: 甬洁网络

--移动互联网&物联网技术提供商