# Restarting network service for a local VM via SSH

During the training course of exercising changing my neighborhood VM from fixed IP to DHCP and also the other way around using system-config-network, I determined I really did not such as needing to access the VM is console via virt - supervisor and also rather determined to simply SSH right into it (unquestionably out of idleness from not intending to click to and fro in the gui).

I can connect using SSH simply great and also usage system - config - network to upgrade the setups, yet when I attempt to run service network restart it simply hangs for life with:

[[email protected] ~]# service network restart Shutting down interface eth0:

While awaiting it to spew some sort of mistake, I access the VM is console using virt - supervisor and also can see that the command ran efficiently, the new IP details is upgraded, and also all appears well from that angle ; nonetheless, it was my understanding that my SSH link should endure such a network reactivate, based on this inquiry:

My inquiry is: If this weren't a neighborhood VM and also I was attempting to take care of a real remote host, what would certainly be the most effective means to take care of such a network reactivate? Is my strategy to taking care of the VM is network 'from another location' illinformed?

The VM is set up making use of KVM and also runs Centos 6.3 ; bit 2.6.32 - 279. el6.x86 _ 64 ; linked networking. The physical host makes use of Centos 6.4 ; bit 2.6.32 - 358.18.1. el6.x86 _ 64

Update : upon examining/ var/log/messages on the physical host, I bumped into the adhering to access: ¢not giving name host1 to the DHCP lease of 192.168.122.221 because the name exists in /etc/hosts with address 192.168.122.220

My derp minute: Made me understand that SSH could not select back up due to the fact that i'm making use of ssh [email protected] due to the fact that I do not have actually hostname resolution set up yet. The IP address was transforming and also consequently could not be located. When I attempted reactivating the network without transforming the IP, it selected back up simply great.

2
2022-07-25 20:45:16
Source Share