Bug 187006 - [hyper-v] dynamic address (dhcp) obtaining doesn't work on HYPER-V OS 2012 R2
Summary: [hyper-v] dynamic address (dhcp) obtaining doesn't work on HYPER-V OS 2012 R2
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-virtualization mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2014-02-24 13:40 UTC by Alexander
Modified: 2018-05-23 10:27 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2014-02-24 13:40:01 UTC
when there is 
"ifconfig_hn0="DHCP""
in rc.conf
then
"waiting 30s for the default route interface....."
and hn0 interface has no ip

this behaviour lasts from 9.0 i guess, and only hyper-v but from 2008 r2!
Now i have it on 10.0 running on hyper-v os 2012 r2

Fix: 

ifconfig hn0 down
ifconfig hn0 up
dhclient hn0
but i don't think it is a fix.
How-To-Repeat: Put
"ifconfig_hn0="DHCP""
in rc.conf
and reboot
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-03-09 15:43:15 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-emulation

reclassify.
Comment 2 Peter Thoenen 2015-04-08 21:51:57 UTC
Been over a year since last comment but same problem on with 10.1 on Hyper-V 2012 R2:

root@abc:/root # uname -a
FreeBSD abc 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0: Tue Apr  7 15:37:20 HST 2015     root@abc:/usr/obj/usr/src/sys/GENERIC  amd6

From dmesg:

Apr  6 17:43:33 abc kernel: hyperv-utils0 on vmbus0
Apr  6 17:43:33 abc kernel: hyperv-utils0: Hyper-V Service attaching: Hyper-V Heartbeat Service
Apr  6 17:43:33 abc kernel:
Apr  6 17:43:33 abc kernel: hyperv-utils1 on vmbus0
Apr  6 17:43:33 abc kernel: hyperv-utils1: Hyper-V Service attaching: Hyper-V KVP Service
Apr  6 17:43:33 abc kernel:
Apr  6 17:43:33 abc kernel: hyperv-utils2 on vmbus0
Apr  6 17:43:33 abc kernel: hyperv-utils2: Hyper-V Service attaching: Hyper-V Shutdown Service
Apr  6 17:43:33 abc kernel:
Apr  6 17:43:33 abc kernel: hyperv-utils3 on vmbus0
Apr  6 17:43:33 abc kernel: hyperv-utils3: Hyper-V Service attaching: Hyper-V Time Synch Service
Apr  6 17:43:33 abc kernel:
Apr  6 17:43:33 abc kernel: storvsc1 on vmbus0
Apr  6 17:43:33 abc kernel: hn0: <Synthetic Network Interface> on vmbus0
Apr  6 17:43:33 abc kernel: hn0: Ethernet address: 00:15:5d:29:50:1f
{and then it does the waiting 30s for the default route interface....." game.

As with original comment same fix.
Comment 3 Alexandr Krivulya 2015-04-09 07:20:09 UTC
Can you try ifconfig_hn0="SYNCDHCP"?
It works for me on 10.1 and CURRENT
Comment 4 Peter Thoenen 2015-04-10 19:12:31 UTC
Works for me based on Comment #3.  Could we note that somewhere as there is no man hn that I can tell.
Comment 5 Dexuan Cui 2015-12-22 12:44:44 UTC
(In reply to Peter Thoenen from comment #4)

The bug can be fixed by adding the support of SIOCGIFMEDIA:
https://reviews.freebsd.org/D4611

With the above patch, ifconfig_hn0="SYNCDHCP" isn't a must and we can use the usual 
ifconfig_hn0="DHCP".

We're trying to make this fixed in 10.3.
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2016-05-20 07:43:33 UTC
Canonicalize assignment.
Comment 7 Dexuan Cui 2016-05-20 11:54:29 UTC
(In reply to Mark Linimon from comment #6)

The fix in Head is
https://github.com/freebsd/freebsd/commit/fa64dde96e6db540e75874fd06f000187af0924d

The fix has been also MFC-ed to releng/10.3:
https://github.com/freebsd/freebsd/commit/427bb5d10fd29ef038c6a4f6df3160e9c77f1b24

I don't think we want to make errata for 10.1 and 10.2.

So I think we can close the bug now.
Comment 8 Eitan Adler freebsd_committer freebsd_triage 2018-05-23 10:27:44 UTC
batch change of PRs untouched in 2018 marked "in progress" back to open.