3

I'm currently trying to set up a debian virtual machine on HyperV (the final goal is running this machine in azure, which uses a HyperV virtualization under the hood), but I can't get the network up.

The Machine was originally created in VirtualBox and exported as a VHD image, and then re-imported in a hyperV Server. Any VirtualBox guest additions have been removed and the hyperV linux integration tools have been installed.

The server is configured to provide an external virtual network for one of the network adapters of the host, and I've added a natwork adapter for this virtual network to my VM.

However, when I run lspci on the guest, I see:

root@debian:-# lspci 
00:00.0 Host bridge: Intel Corporation 44013X/2X/DX - 824438X/2X/DX Host bridge ( AGP disabled) (rev 03) 
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01) 
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) 
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02) 
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA 

I've read here that the emulated network device sits on 1011:0009, but lspci -d 1011:0009 shows nothing.

I don't really know where to go from here, any help will be appreciated :)

-Andy

Andreas Grapentin
  • 5,499
  • 4
  • 39
  • 57

4 Answers4

3

While adding the Network Adapter you must use a Legacy Network Adapter and then set it to connect.

There is a tutorial about HyperV and Debian at Running Debian in Windows Server's Hyper-V

roq
  • 528
  • 2
  • 9
  • Thanks for your suggestion. However, I can't use the Legacy Adapters, because the final goal is bringing the VM up on azure, and there are no Legacy Adapter available there. – Andreas Grapentin Jan 29 '13 at 16:17
  • You can reach FranklinPiat (he worte the tutorial) at http://wiki.debian.org/FranklinPiat and ask him directly, maybe he can help you. – roq Jan 29 '13 at 19:19
  • Please note that I don't really like accepting your answer, because it does, in fact, not answer my question completely. However, I feel like there should be an accepted answer before the bounty ends, And since you pointed me to a very good source of information, I feel like you did earn the bounty :) Thanks again. – Andreas Grapentin Feb 04 '13 at 07:01
  • Thank you, @AndreasGrapentin. I hope you solve your problem as soon as possible. – roq Feb 04 '13 at 12:52
3

There is no line shown for the (non-legacy) network adapter. Just load the kernel module (hv_netvsc) and use ifconfig -a to see, if the interface is there...

To build this kernel module take a look at http://dietrichschroff.blogspot.de/2013/03/hyper-v-compile-linux-kernel-with.html

Alireza Savand
  • 3,462
  • 3
  • 26
  • 36
1

I've been able to use the Hyper-V network adapter (non-legacy) by defining the mac address both in /etc/sysconfig/network-scripts/ifcfg-eth0 and in the vm hardware configuration in Virtual Machine Manager 2012.

Jason
  • 11
  • 1
0

It seems you are already using some of the Hyper-v modules (Microsoft Corporation Hyper-V virtual VGA), you can lsmod | grep hv and see the Hyper-V modules loaded (hv_vmbus, hv_netvsc, hv_blkvsc, hv_storvsc) Also you can see the actual interfaces by running ip link show. I suggest instead of compiling a new kernel just do a distro upgrade:

If you are running Debian 6 (Squeeze), you can upgrade to 7 (Wheezy), it’s so simple: just answer Y every time.

apt-get update  
apt-get upgrade  
nano /etc/apt/sources.list replace every squeeze with wheezy, ctrl+x, Y,enter.  
apt-get update  
apt-get upgrade  
apt-get dist-upgrade  
reboot  

Your new kernel will be selected, login, then you can lsmod | grep hv and see the Hyper-V modules loaded (hv_vmbus, hv_netvsc, hv_blkvsc, hv_storvsc), connect your non-legacy network adapter and do ip link show then you’ll see it (you can be sure by checking the MAC).
But why stay there? Now you can go to Debian 8.2 (jessie) by following the same instructions but this time use “jessie” on your sourcelist.
I wasn’t able to go directly from 6 to 8.
If you have trouble with “public key is not available” then follow instructions from here.

Enjoy.

Community
  • 1
  • 1
Alon Or
  • 798
  • 7
  • 7