Open main menu

CDOT Wiki β

Changes

Ipv6 on KVM guest

2,336 bytes added, 15:40, 22 May 2014
Created page with 'Category:rchan = KVM Guest = The default network on Fedora/CentOS/RHEL IPv4 by default. Even you create a new virtual network it still default to use IPv4. In order to switch…'
[[Category:rchan]]
= KVM Guest =
The default network on Fedora/CentOS/RHEL IPv4 by default. Even you create a new virtual network it still default to use IPv4.
In order to switch to IPv6 on a virtual network called "rchan", you need to use the virsh command to make the switch.

Network options in virsh:
<pre>
net-autostart autostart a network
net-create create a network from an XML file
net-define define (but don't start) a network from an XML file
net-destroy destroy (stop) a network
net-dumpxml network information in XML
net-edit edit XML configuration for a network
net-info network information
net-list list networks
net-name convert a network UUID to network name
net-start start a (previously defined) inactive network
net-undefine undefine an inactive network
net-update update parts of an existing network's configuration
net-uuid convert a network name to network UUID
</pre>

== Method 1 ==
By using the net-destroy and net-edit options:
* [http://ekuric.wordpress.com/2012/12/29/ipv6-configuration-for-kvm-guests/ ipv6 configuration for kvm guests]

* list all active virtual network <br /><code>virsh net-list --all</code>
<pre>
[root@newlm networks]# virsh net-list --all
Name State Autostart Persistent
--------------------------------------------------
default active yes yes
rchan active yes yes
</pre>

* Stop (Destroy) the virtual network "rchan" <br /><code>virsh net-destroy rchan</code>

* Edit the virtual network to support IPv6<br /><code>virsh net-edit rchan</code>
* Add the following line:<br /><code><ip family='ipv6' address='2000:1122:3344:1::1' prefix='64'></code>

Restart libvirtd and the virtual bridge interface on the host should get the IPv6 address assigned.
Reboot your virtual guests and they should get an IPv6 ip address.

== Method 2 =
You can also use the "virsh net-dumpxml rchan", edit the xml file with ipv6 support and use the "virsh net-define rchan" command to activate ipv6 support.
1,760
edits