Linux - kvm - How to set up NAT?
shell> vi /etc/libvirt/qemu/networks/default.xml
Add mode="nat" to foward tag.
Example:
<name>default</name>
<uuid>cc58d5ab-742e-4160-a11d-26870d8b05 3b</uuid>
<bridge name="virbr0" />
<forward mode="nat"/>
<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>
/etc/init.d/libvirt restart
Add mode="nat" to foward tag.
Example:
<name>default</name>
<uuid>cc58d5ab-742e-4160-a11d-26870d8b05
<bridge name="virbr0" />
<forward mode="nat"/>
<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>
/etc/init.d/libvirt restart

Comments