Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is getting fairly annoying now, i can't understand what it could be!

I have a Hyper-v Server with a complete fresh install of Ubuntu Server 64bit. When setting up the Virtual Server i chose a legacy network adapter. Once Ubuntu has ran through the install (including dragging some updates from the internet) i log in. Try to do a sudo apt-get update.

All i get is Err's and Failed to fetch error messages. The virtual network card in Ubuntu is set to DHCP, it has the correct lease from the DHCP server.

Pinging the router fails too, although this is fine from a windows pc (with a lease from the same DHCP server). We haven't any proxy server here either.

Does anyone know what it could be?

share|improve this question
    
Sounds more like a network issue than a hyper-v issue. –  ErnieTheGeek Oct 12 '11 at 14:04
    
You may want to review your dhcp settings on the dhcp server. Possibly try setting static addresses? –  ErnieTheGeek Oct 12 '11 at 14:04
    
It's a simple network, The DHCP is fine as the other PC's are using it. I've also set the ip and dns statically in ubuntu. Still nothing. –  Nathan Oct 12 '11 at 14:07
    
What kind of virtual network do you have setup in hyper-v? –  ErnieTheGeek Oct 12 '11 at 14:10
    
Just a simple Physical network card shared to two virtual servers. –  Nathan Oct 12 '11 at 14:12
show 2 more comments

3 Answers

Make sure your network adapter is properly "mapped"

If you issue ifconfig is the adapter name the same as in your /etc/network/interfaces?

If not, you might want to look at /etc/udev/rules.d/70-persistent-net.rules.

What could happen is that Hyper-V will issue a different MAC address for your NIC and therefore Ubuntu will consider it a different NIC. So after a reboot, your interface will switch from eth0 to eth1.

I've seen this happen regularly in VM environement, especially when "moving" VM's form an hypervisor to another one.

share|improve this answer
add comment

Try setting the IP address manually (and don't use an address within a range assigned by DHCP!). DHCP may be assigning IP settings that are completely inappropriate for your virtualised server.

share|improve this answer
    
The DHCP is working fine for the other workstations, So i guess it should be fine for this Virtual server. I've tried a static IP etc too. –  Nathan Oct 12 '11 at 14:10
1  
Give some more specifics - just because DHCP works for some PCs over there, doesn't mean the settings it assigns will work on a server over here. Use Static addressing until you have figured out how to make it work, then if DHCP assigned address is still broken, you can look at what is assigned and see if there is a problem with it. –  dunxd Oct 12 '11 at 14:19
    
@Nathan: You guess it's working for the ubuntu VM, or you confirmed it's working for the VM? –  Bart Silverstrim Oct 12 '11 at 14:23
    
I have already tried a static IP and it's the same. –  Nathan Oct 12 '11 at 14:23
    
@BartSilverstrim Not sure what you mean as i confirmed in the original question that i could get a DHCP lease when the ubuntu VM is set to recieve a DHCP. At the moment it's set to Static. –  Nathan Oct 12 '11 at 14:26
show 1 more comment

If your other VM on that server works fine with it's network settings, and you have similar settings for your Ubuntu VM, you might verify that you don't have any firewall (iptables) entries getting in the way.

share|improve this answer
    
I can confirm i have another VM on this server (Server 2008 R2), It's static ip info is the same as this Ubuntu VM (other than the actual IP) regarding iptables, are they installed by default with natty? –  Nathan Oct 12 '11 at 15:10
    
I've just checked the rules of ibtables using iptables -L -n and it's empty. No rules at all. –  Nathan Oct 12 '11 at 15:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.