Actions:
1. edit eth0's xml, don't do any other thing in this step
# virsh iface-edit eth0
2. dump the xml of eth0 via ncftool (if it doesn't exist, install netcf)
# ncftool
ncftool> dumpxml eth0
3. get the configuration of eth0 via augtool (if it doesn't exist, install augeas)
# augtool
augtool> print /files/etc/sysconfig/network-scripts/ifcfg-eth0
4. # cat /etc/sysconfig/network-scripts/ifcfg-eth0
5. compare the result of step 1, step 2, step 3, step 4, with each other. check if the informations are consistent. checkpoints:
1> if something is missed
2> if something's value if not consistent
6. save the config file of eth0
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /tmp/
7. change something via "virsh iface-edit", and save it. such as delete the "<dhcp/>"
8. restart the network
# service network restart
9. check whether the eth0 has IPv4 address
# /sbin/ifconfig
10. loop the upper steps with passing MAC address but not interface name to "iface-edit"
Breakdown:
1. restore the config file of eth0
# cp /tmp/ifcfg-eth0 /etc/sysconfig/network-scripts/
2. restart network
# service network restart
Expected Results:
Step 5:
checkpoints are passed
Step 6:
successfully changed
Step 8:
eth0 will not has IPv4 address