Enclosed network-restart state with if statement for kvm or vmware.