I deployed my vms using kvm on debian for testing. But anytime I modified the network interface,for example,change the virtual network the vm connect to, I can not see the eth0 when I use “ifconfig” in the vm.
It cost me almost a day to solve. Finally I got a solution from the internet which aims at another question.But it actually solved my problem.
- sudo vim /etc/udev/rules.d/70-persistent-net.rules
- delete the line contains the old MAC address (usually the first line with eth0), rename the line (usually the following one) with new MAC address to “eth0″, and restart the VM.
(Just modify the mac address in the line which “name=eth0″ to be your actually vm’s Mac address.)
Days later ,I will look into it to see what the file use for.