none
Hyper-V virtual network switch disconnects host machines network connection

    Question

  • When creating an external virtual switch for my Hyper-V machine, my hosts connection is lost immediately when applying the setting and is restored immediately after deleting the virtual switch.

    Am I doing something wrong? It seemed pretty straightforward and I've followed steps that others have outlined to create the virtual switch. 

    Friday, July 12, 2013 5:41 PM

Answers

  • Thank you for your help Brian. I got it working Friday, after creating the virtual switch my host connection never automatically reconnected for whatever reason.  I went into virtual switch's properties on my host machine and changed some adapter properties for the virtual switch, then changed them back to default and within seconds of hitting apply, my host machine connected again.

    I do appreciate your help in getting this going!

    Monday, July 15, 2013 8:16 PM

All replies

  • If you are using the GUI, there are messages in the wizard that describe that this is exactly what will happen if you use the "Allow management OS to share" option.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Friday, July 12, 2013 7:14 PM
  • I have tried it both ways, with "Allow Management OS to share this network adapter" check box and without it.

    The result is the same, no network connection on my host OS.  What settings am I supposed to use that will allow my host OS to keep network connection and allow my VM to get an internet connection?

    Friday, July 12, 2013 7:36 PM
  • If you only have one physical NIC, then you use "allow management OS to share"

    Which will, for a moment, disconnect the host OS, then reconnect it.

    This wedges a virtual switch between the installed OS and the physical NIC and connects the installed OS with a virtual NIC.

    It should then apply any manually applied IP address to this new virtual NIC and thus keep networking alive.  and any VM will depend on DHCP to get an IP.

    Or, all will require DHCP.

    And - at the physical layer, you cannot have any MAC limiting (so, one MAC can only have one IP talking on it).  I have not seen folks run into that in a long time.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Friday, July 12, 2013 7:59 PM
  • Thank you for explaining, I had an idea of how it worked but not a clear picture.

    Since my host OS disconnects and never reconnects, do you think after creating the virtual switch I need to reconfigure the new virtual NIC on the host OS?

    I am currently running DHCP with no static routes but I do have some IP reservations including the host OS machine.

    Thanks again for your assistance.

    • Proposed as answer by C_D363 Monday, September 18, 2017 10:43 AM
    Friday, July 12, 2013 9:11 PM
  • There was a known issue with 2012 and some DHCP servers that don't follow the DHCP standards properly.  Essentially the VMs would not get IP addresses.  That is mainly consumer class routers.

    In your case, the host ends up with a new MAC.  The physical NIC keeps its MAC, and that MAC is still on the network.  And each VM will get a MAC as well.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Friday, July 12, 2013 9:58 PM
  • Thank you for your help Brian. I got it working Friday, after creating the virtual switch my host connection never automatically reconnected for whatever reason.  I went into virtual switch's properties on my host machine and changed some adapter properties for the virtual switch, then changed them back to default and within seconds of hitting apply, my host machine connected again.

    I do appreciate your help in getting this going!

    Monday, July 15, 2013 8:16 PM
  • Had a very similar experience and my resolution was to right-click the virtual switch icon on the host machine and select "Disable", then repeat to "Enable" it again.  That brought my host back online.                           

    • Proposed as answer by maligang Saturday, September 22, 2018 9:56 AM
    Tuesday, August 13, 2013 6:10 PM
  • Hi Brian,

    I have this same issue but I am using 2 adapters. 1 adapter to the local network with no internet and the other adapter goes to the network that has internet. The first VM switch to the local network connects just fine but when I try to create another virtual switch using the adapter with internet the host no longer is able to use the adapter and the client is unable to access the internet but does get an IP address via DHCP.

    adapter 1 - 172.x.x.x (static) no gateway

    adapter 2 - 10.x.x.x (tried both static and DHCP) with gateway 10.x.x.254

    I have tried rebooting (host / vm) , resetting adapters to defaults, selecting / deselecting allow host to share ....but the same results.....

    Any Ideas?

    Regards

    clint

    Thursday, September 19, 2013 10:36 PM
  • Let me see if I can follow here.

    NIC1 - vSwitch "172.x"

    NIC2 - vSwitch "10.x"

    The VM should get an IP from your DHCP server on each subnet regardless of anything.  Any gateway or manual IP applied to the Hyper-V Server are specific to it, not any VM.

    So, lets be really simple and remove all host networking confusion.

    At the console of the Hyper-V Server, do not enable / uncheck "allow management OS.." on any virtual switches.  Therefore the Hyper-V server should not have an IP or NIC and not be on the network (you are at the console).

    Take a VM and connect it to vSwitch "172.x" - does it get an IP from the DHCP Server on this subnet?  Do you need to manually configure the IP in the OS of the VM?  Give the VM the gateway for this subnet.

    Take a different VM and connect it to vSwitch "10.x" - answer the same questions.

    Do the VMs route traffic as expected?

    Now, what subnet do you want your Hyper-V Server to have a management interface on? 

    For this subnet, open the settings of the corresponding vSwitch and check that "allow management OS" box.  The Hyper-V Server should now have a NIC and get an IP from the DHCP Server on that network.

    Stop here, check that packets are flowing.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Thursday, September 19, 2013 10:48 PM
  • In hyper-v, new virtual switch, for External network, I used my Ethernet adapter, and checked the box to "Allow management operating systems to share this network adapter", should I have also checked the box "Enable virtual LAN identification for management operating systems" ? And if so, what does the 2 represent in the box below it?
    Wednesday, April 29, 2015 5:01 AM
  • When I checked, "Allow management operating systems to share this network adapter", and checked "Enable virtual LAN identification for management operating systems" another SNAFU happened. I found in network connections, Ethernet properties, my "Internet protocol version 4 unchecked, and Hyper-V Extensible virtual switch checked, and I no longer had network access.  Again I had to remove my hyper-v external switch in hyper-v manager.  I guess I could try using my WIFI as the switch, but getting hyper-v Windows Server 2012 R2 has been a real problem.  

    I did the following steps:

    To install and configure a virtual machine, complete the following steps: 1. Start Hyper-V Manager by clicking Start, Administrative Tools, Hyper-V Manager. 2. In Hyper-V Manager, right-click the server node in the left pane, point to New, and then select Virtual Machine. This starts the New Virtual Machine Wizard. Click Next. 3. In the Name text box, enter a name for the virtual machine, such as AppServer02. 4. By default, the virtual machine data is stored on the system disk. To select a different location, select the Store The Virtual Machine In A Different Location check box, click Browse, and then use the Select Folder dialog box to select a save location. Click Next. 5. On the Assign Memory page, specify the amount of memory to allocate to the virtual machine. In most cases, you should reserve at least the minimum amount of memory recommended for the operating system you plan to install. Click Next. 6. On the Configure Networking page, use the Connection list to select a network adapter to use. Each new virtual machine includes a network adapter, and you can configure the adapter to use an available virtual network for communicating with other computers. Click Next. 7. On the Connect Virtual Hard Disk page, use the options provided to name and create a virtual hard disk for the virtual machine. Each virtual machine requires a virtual hard disk so that you can install an operating system and required applications. Click Next. 8. On the Installation Options page, select Install An Operating System From A Boot CD/DVD-ROM. If you have physical distribution media, insert the distribution media, and then specify the CD/DVD drive to use. If you want to install from an .iso image, select Image File, click Browse, and then use the Open dialog box to select the image file to use. 9. Click Next, and then click Finish. 10. In Hyper-V Manager, right-click the name of the virtual machine, and then click Connect. 11. In the Virtual Machine Connection window, click Start. After the virtual machine is initialized, the operating system installation should start automatically. Continue with the operating system installation as you normally would.

    It installed and booted, came up to a blue screen asking me to hit Ctrl-Alt-Del to logon, and when I did, it gave the selection to switch user, task manager, ect...  didn't complete the install could not logon - did not have access to the internet to logon with my Microsoft Account.

     
    Wednesday, April 29, 2015 5:50 AM
  • >should I have also checked the box "Enable virtual LAN identification for management operating systems" ?
     
    VLAN's are enterprise networking virtual LAN's, you should leave it
    disabled for any smaller installations. 
     
     

    Bob Comer
    Wednesday, April 29, 2015 12:38 PM
  • >When I checked, "Allow management operating systems to share this network adapter", and checked "Enable virtual LAN identification for management operating systems" another SNAFU happened. I found in network connections, Ethernet properties, my "Internet protocol version 4 unchecked, and Hyper-V Extensible virtual switch checked, and I no longer had network access.
     
    It's not normal for it lose connection, it's normal for IPV4 to be
    unchecked in your ethernet properties for the NIC.  The new adapter in your
    network connections called vEthernet is the one where the IPV4 is checked
    and where you set any special networking properties you want.  That's what
    happens when you create a new switch with a shared with OS network adapter.
     
    As for your virtual machine installation problem, what OS is it and what
    media are you using to install?
     
     
     
     

    Bob Comer
    Wednesday, April 29, 2015 12:44 PM
  • Ok, I removed and reinstalled hyper-v features, and then recreated the virtual switch in virtual switch manager, and it did as you said.  IPV4 has the Hyper-v Extensible Virtual Switch, and the vEthernet has the TCP/IPv4, and I have network connection.

    I am trying to install hyper-v Windows server 2012 from the Microsoft site below on to a Windows 8.1 Pro using Hyper-V Manager.  The Windows 2012 R2 ISO I downloaded from the link at the bottom of the screen.  I am downloading and copying this ISO to CD.  In hyper-v manager, right pane, I am clicking New, Virtual Machine, Next, Name (2012 R2), check the box “Store the virtual machine in a different location (F:\Windows 2012 R2), which is a partition that will used for all my hyper-v OSs.  Click Next, select Generation 2, Next, Startup memory 512 with box checked “Use Dynamic Memory for this virtual machine, Next, Configure Network connection (chose my virtual switch I setup in Virtual Switch Manager, Next.  For Connect Hard Disk, I chose “Create virtual hard disk, and went with the defaults. Clicked Next, and in Installation Options, I chose “Install an operating system from a bootable image file (media Image file (iso) – browsed to my DVD device and chose the saved iso), and then clicked Finish button.

    The virtual machine “2012 R2” appeared in the off state.  I double clicked it to open the virtual machine, and clicked the start button.  Received Boot Failed.  EFI SCSI Device.  PXE Network using IPv4 ……..

    PXE-E18: Server response Timeout.

    Boot Failed.  EFI Network

    Boot Failed.  EFI SCSI Device.

    No Operating System was Loaded.  Press a key to retry the boot sequence…..

     

    http://www.microsoftvirtualacademy.com/product-training/windows-server

    Wednesday, April 29, 2015 9:17 PM
  • I again tried to install hyper-v Windows server 2012. 

    I did the same process but changed select Generation 2 to Generation 1, and browsed to the ISO saved on my HDD rather than from a CD.  This time the Windows 2012 installed, but came up with a blue screen with the time showing in big numbers, and the words “Press Ctrl+Alt+Delete to sign in.  When I clicked Ctrl-Alt-Del:  the PC screen cleared and showed selections (Lock, Switch User, Sign Out, Task Manager).  I tried to switch user to my Microsoft Account, but it only redisplayed the previous blue screen with time ect…

    Wednesday, April 29, 2015 9:50 PM
  • According to my searching, I need to add server roles to get a GUI interface?  And for this I need to know powershell, or install and access Server Manager.  However, my computer is at home and does not belong to a domain, and sever manager seems to require that a computer be domain-joined to be seen.  This is the first time doing any of this, and the only work around was this article: http://nearlydeaf.com/?p=1149.  Do you recommend this, or do I need to do things differently?  All I get now is the server coming up and giving me a selection to alter network settings, remote connectivity, computer name, and so on.

    Thursday, April 30, 2015 5:53 AM
  • >According to my searching, I need to add server roles to get a GUI interface?
     
    If you're talking Hyper-V Server, it doesn't have a traditional GUI like a
    full version of Windows.
     
     
    I've only done it one time myself but that looks reasonable.
     
    Note that you wont be able to run any VM's in Hyper-V Server when running
    it in a Win8.1 Hyper-V VM, but if all you want to do is learn how to deal
    with Hyper-V Server itself it should be okay.
     
     

    Bob Comer
    Thursday, April 30, 2015 12:58 PM
  • Thanks Bob.  I was hoping to use hyper-v windows 2012 r2 to practice some of the server course work I am taking at Microsoft Virtual Academy.

    Note that you wont be able to run any VM's in Hyper-V Server when running
    it in a Win8.1 Hyper-V VM, but if all you want to do is learn how to deal

    with Hyper-V Server itself it should be okay.

    So there is no way to setup a virtual switch that is private, put the Windows 2012 on its own domain in the system config.cmd, open server manager, and since it is defined as being on a domain, it can be seen.  If so, give it the Remote Administrative tools, which has a hyper-v GUI management tool?

    Or is it possible to install windows 2012 R2 Core in Windows 8.1 pro hyper-v and give the 2012 Core the hyper-v role in server manager?  Or is all this nonsense, since I haven't a clue what I am doing?

    Friday, May 1, 2015 12:01 AM
  • Unfortunately you can't nest hypervisors like that with Hyper-V.  You can
    learn to manage them and have a domain, but you cannot run a VM inside a
    VM with Hyper-V on the host.
     
    If your hardware fits VMWare Workstation, you can run VM's inside a VM,
    but not on all types of hardware.  I think some other VMWare products can
    do it too, but I don't have experience with them.
     
    >So there is no way to setup a virtual switch that is private, put the Windows 2012 on its own domain in the system config.cmd, open server manager, and since it is defined as being on a domain, it can be seen.  If so, give it the Remote Administrative tools, which has a hyper-v GUI management tool?
     
    Sure, you can do all that, you just can't run a VM on it.
     

    Bob Comer
    Friday, May 1, 2015 2:36 AM
  • For anyone that comes across this question. How I fixed it for me was to uncheck  the "allow managmeent oprating system to share this adapter". Click apply. Click Yes on the popup. Then check it and press apply again. At which point, the vEthernet adapter went from 'network' to 'Domain Network', and I could access the network and internet again on the host system

    Tuesday, June 2, 2015 4:10 PM
  • Hyper-v 2012 and R2...I also see this behavior on statically assigned IP's on the V-nic's every now and then. Interestingly enough, I don't see the problem when I set the guest IP to DHCP.

    Have you heard of a fix for this 'Disable' then 'Enable' to bring guest back online?  Been sort of a nagging problem since it came out some 5 years ago.

    Thanks.

    Ryan

    Wednesday, April 12, 2017 6:36 PM