ubuntu:kvm:install_and_configure_kvm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:kvm:install_and_configure_kvm [2020/08/10 23:17] – 192.168.1.1 | ubuntu:kvm:install_and_configure_kvm [2020/08/10 23:33] (current) – 192.168.1.1 | ||
---|---|---|---|
Line 307: | Line 307: | ||
dhcp6: no | dhcp6: no | ||
</ | </ | ||
+ | |||
+ | After modifying the network config file, save and close it. | ||
+ | |||
+ | Apply the changes by running the following command: | ||
+ | |||
+ | <code bash> | ||
+ | sudo netplan --debug | ||
+ | </ | ||
+ | |||
+ | Now check if the IP address has been assigned to the bridge interface: | ||
+ | |||
+ | <code bash> | ||
+ | ip a | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | 1: lo: < | ||
+ | link/ | ||
+ | inet 127.0.0.1/8 scope host lo | ||
+ | | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: enp4s0: < | ||
+ | link/ether b4: | ||
+ | 3: enp3s0: < | ||
+ | link/ether b4: | ||
+ | 4: br0: < | ||
+ | link/ether b4: | ||
+ | inet 192.168.1.69/ | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | 5: wlp5s0: < | ||
+ | link/ether d0: | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Show the Bridge Status ===== | ||
+ | |||
+ | <code bash> | ||
+ | brctl show br0 | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | bridge name bridge id STP enabled interfaces | ||
+ | br0 8000.b42e993ee522 yes enp3s0 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Configure KVM to use the bridge ===== | ||
+ | |||
+ | Create a an XML file called **bridge.xml**. | ||
+ | |||
+ | Add the following lines: | ||
+ | |||
+ | <file bash bridge.xml> | ||
+ | < | ||
+ | < | ||
+ | <forward mode=" | ||
+ | <bridge name=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | Start the newly created bridge and make it as default bridge for VMs. | ||
+ | |||
+ | <code bash> | ||
+ | virsh net-define bridge.xml | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | Network br0 defined from bridge.xml | ||
+ | </ | ||
+ | |||
+ | |||
+ | Start the bridge. | ||
+ | |||
+ | <code bash> | ||
+ | virsh net-start br0 | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | Network br0 started | ||
+ | </ | ||
+ | |||
+ | Configure the bridge to autostart each time the system reboots. | ||
+ | |||
+ | < | ||
+ | virsh net-autostart br0 | ||
+ | </ | ||
+ | |||
+ | returns | ||
+ | |||
+ | <code bash> | ||
+ | Network br0 marked as autostarted | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Verify that the bridge is active and started ===== | ||
+ | |||
+ | <code bash> | ||
+ | virsh net-list --all | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | | ||
+ | ----------------------------------------- | ||
+ | | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
ubuntu/kvm/install_and_configure_kvm.1597101467.txt.gz · Last modified: 2020/08/10 23:17 by 192.168.1.1