To configure a new NAT network and connect a KVM instance to it, run the following:
- List all available networks:
root@kvm:~# virsh net-list --all Name State Autostart Persistent---------------------------------------------------------- default active yes yesroot@kvm:~#
- Dump the configuration of the default network:
root@kvm:~# virsh net-dumpxml default<network connections='1'> <name>default</name> <uuid>2ab5d22c-5928-4304-920e-bc43b8731bcf</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr0' stp='on' delay='0'/> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254'/> </dhcp> </ip></network>root@kvm:~#
- Compare ...