Home

Advertisement

Customize

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-26870d8b053b</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

Tags: , , ,

Comments

December 2009

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

Tags

Powered by LiveJournal.com

Advertisement

Customize