hyper-v Virtualization: HyperV ifconfig output throws error then setting to autoselect

Error seen in 13.0 and 13.1:
Code:
root@share-bare13:~ # ifconfig hn0 media autoselect
ifconfig: SIOCSIFMEDIA (media): Operation not supported
root@share-bare13:~

This issue was not seen in BSD 10.4:
Code:
bsd-10.4# ifconfig hn0 media autoselect
bsd-10.4#

I have raised a bug for this issue: PR 264253

I understand hn is synthetic driver that is used in FreeBSD on hyperV and Azure.
What is the expected behavior of the hn driver in FreeBSD OS when we changing the speed link?
 
Thank you for the info.

This issue is seen in freebsd 12.0 as well.
Code:
$ uname -a
FreeBSD pshiva-bare-12-0 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  amd64
$ ifconfig hn0 media autoselect
ifconfig: SIOCSIFMEDIA (media): Operation not permitted
$
 
Hello & Welcome to this FreeBSD community!

Unless I missed a memo, Microsoft does not (officially) support FreeBSD guests >= 12.1: https://docs.microsoft.com/en-us/wi...supported-freebsd-virtual-machines-on-hyper-v
Not saying it won't work - but probably worth keeping in mind.
Well Microsoft also keeps a best practices document around for running FreeBSD as Hyper-V Guest:
 
Here is the original import of ifmedia support in the original hv_netvsc_drv_freebsd.c before it was renamed to if_hn.c


In some point during the development it was set to ignore the input and return0 so i don't know which driver version you are using in your 10.4 build.

Also note that this revision never was approved it was abandoned to D4852

hn_ifmedia_upd(struct ifnet *ifp)
{
/* Ignore. */
return (0);
}


#define EOPNOTSUPP 45 /* Operation not supported */
1656059562318.png
 
Back
Top