[Last Call] Learn how to a build a cloud-first strategyRegister Now


Cent-OS running on a Hyper-V server not getting IP address

Posted on 2012-08-20
Medium Priority
Last Modified: 2012-08-20

I'm trying to setup a Nagios server and have downloaded a pre-configured Hyper-V vhd from them that runs Cent-OS Linux.  I've got it all configured and can run it, but it's only showing the localhost network connection.  I can't get it to show an ethernet connection or get an IP address.  

I've currently got it set up with a legacy virtual network adapter, and have tried static and dynamic mac addresses.  

In linux i've got /etc/sysconfig/network-scripts/ifcfg-eth0 setup as follows

HWADDR=same mac address as set in the legacy network adapter in hyper-v settings for the vm
NAME="System eth0"

I'm a total linux noob here so be descriptive on any commands I need to run, please :)

I don't know if more information is needed or not, feel free to ask.

Thanks for help!!
Question by:Longshot9
  • 2
  • 2
LVL 18

Accepted Solution

Sanga Collins earned 2000 total points
ID: 38313578
from the centos command line, run the following command


then you should be able to go into the networks section and fix the ip addresses. I have similar issues all the time when moving VMs from one server to another where the NIC and MAC id change.

Setting it up from the setup tool usually fixes it.

Author Comment

ID: 38313767
thanks for the response.  I ran through that before and had set it to dhcp, so I re-did it for a static address.  ifconfig is now showing an eth0 adapter, though I don't know if it was from this or some other things I tried earlier.  Problem though now, is it's not showing the static ipv4 address, just a ipv6 address... no clue where it got that from.

Author Comment

ID: 38313884
I rebooted it and now it's showing the ipv4 address and I can get into the web interface for nagios.  thanks!
LVL 18

Expert Comment

by:Sanga Collins
ID: 38314188
Fantastic! It's a weird issue that I only experience with centos. Ubuntu and suse behave a little better but I still have to pay attention to make sure it doesn't catch me off guard.

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
In this article will go through how to backup a vPostgres DB from a broken vCenter Appliance and restore to a new vCenter Appliance.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question