Actions:
1. save the config file of eth0
# cp /etc/sysconfig/network-scritps/ifcfg-eth0 /tmp
2. save the output of "iface-edit eth0" as eth0.xml
3. undefine eth0
# virsh iface-undefine eth0
4. check if the config file of eth0 exist.
# ls -l /etc/sysconfig/network-scripts/ifcfg-eth0
5. check if eth0 has IP address via ifconfig
# /sbin/ifconfig
6. check if eth0 is still defined
# virsh iface-list --all
7. check if the network if good
# ping google.com
# ping 10.66.70.?
8. restore eth0, using the xml file we saved at step 1.
# virsh iface-define eth0.xml
9. check if the config file of eth0 exist.
# ls -l /etc/sysconfig/network-scripts/ifcfg-eth0
10. check if eth0 is still defined
# virsh iface-list --all
11. if step 10 passed, start eth0
# virsh iface-start eth0
12. check if eth0 has IP address via ifconfig
# /sbin/ifconfig
13. check if the network is good
# ping google.com
# ping 10.66.70.?
14. loop upper steps with passing MAC address but not interface name to "iface-define", and "iface-undefine".
15. loop upper steps on all other physical network interaces. step 7 and step 13 should be skipped on loopback device.
Expected Results:
Step 4:
not exist
Step 5:
no IP address
Step 6:
not defined
Step 7:
not good
Step 8:
successfully restored.
Step 9:
exist
Step 10:
is defined
Step 11:
successfully started
Step 12:
has IP address
Step 13:
good