Size: 142
Comment:
|
Size: 3321
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
== Create a Switch == | == Create a vSwitch == |
Line 5: | Line 5: |
{{{#!bash | {{{#!highlight bash ovs-vsctl add-br ovs-iso |
Line 8: | Line 9: |
{{{#!bash | == Integration into libvirt == {{{#!highlight bash <network connections='1'> <name>ovs-iso</name> <forward mode='bridge'/> <bridge name='ovs-iso'/> <virtualport type='openvswitch'/> </network> |
Line 10: | Line 20: |
{{{#!bash | === temporary creation === {{{#!highlight bash root@infinitas ~ # virsh net-create net_ovs-iso.xml Network ovs-iso created from net_ovs-iso.xml root@infinitas ~ # virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes ovs-iso active no no |
Line 12: | Line 39: |
{{{#!bash | === persistent creation === {{{#!highlight bash root@infinitas ~ # virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes virsh # net-define /root/net_ovs-iso.xml Network ovs-iso defined from /root/net_ovs-iso.xml virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes ovs-iso inactive no yes virsh # net-autostart ovs-iso Network ovs-iso marked as autostarted virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes ovs-iso inactive yes yes virsh # net-start ovs-iso Network ovs-iso started virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes ovs-iso active yes yes virsh # |
Line 14: | Line 83: |
{{{#!bash | === deleting a network === * if persistent first undefine then destroy the network {{{#!highlight bash virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes ovs-iso inactive yes yes virsh # net-start ovs-iso Network ovs-iso started virsh # net-undefine ovs-iso Network ovs-iso has been undefined virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes ovs-iso active no no virsh # net-destroy ovs-iso Network ovs-iso destroyed virsh # net-list --all Name State Autostart Persistent ---------------------------------------------------------- default inactive no yes virsh # |
Line 16: | Line 117: |
{{{#!bash | {{{#!highlight bash |
Line 18: | Line 122: |
{{{#!highlight bash }}} |
openvswitch
Create a vSwitch
1 ovs-vsctl add-br ovs-iso
Integration into libvirt
temporary creation
1 root@infinitas ~ # virsh net-create net_ovs-iso.xml
2 Network ovs-iso created from net_ovs-iso.xml
3 root@infinitas ~ # virsh
4 Welcome to virsh, the virtualization interactive terminal.
5
6 Type: 'help' for help with commands
7 'quit' to quit
8
9 virsh # net-list --all
10 Name State Autostart Persistent
11 ----------------------------------------------------------
12 default inactive no yes
13 ovs-iso active no no
persistent creation
1 root@infinitas ~ # virsh
2 Welcome to virsh, the virtualization interactive terminal.
3
4 Type: 'help' for help with commands
5 'quit' to quit
6
7 virsh # net-list --all
8 Name State Autostart Persistent
9 ----------------------------------------------------------
10 default inactive no yes
11
12 virsh # net-define /root/net_ovs-iso.xml
13 Network ovs-iso defined from /root/net_ovs-iso.xml
14
15 virsh # net-list --all
16 Name State Autostart Persistent
17 ----------------------------------------------------------
18 default inactive no yes
19 ovs-iso inactive no yes
20
21 virsh # net-autostart ovs-iso
22 Network ovs-iso marked as autostarted
23
24 virsh # net-list --all
25 Name State Autostart Persistent
26 ----------------------------------------------------------
27 default inactive no yes
28 ovs-iso inactive yes yes
29
30 virsh # net-start ovs-iso
31 Network ovs-iso started
32
33 virsh # net-list --all
34 Name State Autostart Persistent
35 ----------------------------------------------------------
36 default inactive no yes
37 ovs-iso active yes yes
38
39 virsh #
40
deleting a network
- if persistent first undefine then destroy the network
1 virsh # net-list --all
2 Name State Autostart Persistent
3 ----------------------------------------------------------
4 default inactive no yes
5 ovs-iso inactive yes yes
6
7 virsh # net-start ovs-iso
8 Network ovs-iso started
9
10 virsh # net-undefine ovs-iso
11 Network ovs-iso has been undefined
12
13 virsh # net-list --all
14 Name State Autostart Persistent
15 ----------------------------------------------------------
16 default inactive no yes
17 ovs-iso active no no
18
19 virsh # net-destroy ovs-iso
20 Network ovs-iso destroyed
21
22 virsh # net-list --all
23 Name State Autostart Persistent
24 ----------------------------------------------------------
25 default inactive no yes
26
27 virsh #
28