none
vm (copied to new host) has no network connectivity RRS feed

  • Question

  • The problem:

    Yesterday we had a power outage.

    Fried the system disk (c:) on the host machine.

    I had configured all the virtual drives and virtual machines on a second, data disk (d:); thankfully this survived.

    Everything was working fine prior to the incident.

    I popped in a new c: drive, and re-installed server 2012 r2, and added hyper-v.

    created a new machine, using the old drives, and hooray, the vm booted with all the software intact.

    *however!* the vm doesn't have internet access, nor can it be pinged.

    Salient Details

    Once again everything was working prior to the power outage.

    I have two physical nics (nic1 nic2) in the box.  Nic1 is dedicated to the host, and it's ip is statically allocated (192.168.1.25). Nic2 is supposed to be dedicated to the vm, and I didn't bother assigning an IP to it. Both are connected to the network.

    When I first added the Hyper-V role though Server Manager, I noticed that the server name/ip it came up with was ServerName/[dynamically allocated IP of nic2]; that is, hyper-V seemed to be wanting to configure the server with nic2, rather than nic1.  Is this right?  There was no option to select 'ServerName/[nic1 IP]

    In HyperV after the reboot, I created a virtual switch with nic 2.  Then I created a new VM, but used the vhx file which was on the surviving physical D: drive.  I attached the virtual switch tp the new VM.

    The VM booted.  All the files were there.  However, the network icon in the system tray always indicates 'Unidentified network/limited' under 'Connections'

    What I've Tried:

    I found i had to reset the ipv4 static ip on the new virtual machine, as well as the dns host specification.

    I tried removing the HyperV role, disabling nic2, and re-adding the HyperV role.  This time the server it came up with was ServerName/[NIC1 IP].  Then re-enabled nic2, used it to create a virtual switch, and attached that to yet another created VM.

    My next try, as a diagnostic, is to create a completely new VM with a new install of the OS.  I'm doing this as a diagnostic, but forsaking the old disks has pretty unpleasant implications.

    It's got to be something simple!  Any help would be truly appreciated.

    thanks in advance



    dmc_lat47

    Tuesday, September 10, 2019 5:03 PM

All replies

  • Hi ,

    Did you mean that attaching all the VHD file in D drive will occur the same problem? 

    Did you try to export VM from other host and then import to the problematical machine to do a test? Check if this VM could have internet access.

    If possible, you could add an extra physical network adapter to the Hyper-V computer, create an External Virtual Network, connect the VMs to it to see whether you get the same issue.

    Best Regards,

    Candy



    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Wednesday, September 11, 2019 6:41 AM
  • "created a new machine, using the old drives, and hooray, the vm booted with all the software intact."

    You need to configure the virtual switches on the new host in the same manner they were configured on the failed host.  Then you need to assign the virtual NIC(s) in the VM to the proper virtual switches.  When you create a new VM, even though you are using the same VHDX as a running VM, that new VM has no idea of the NIC configuration.


    tim

    Wednesday, September 11, 2019 2:02 PM
  • Hi ,

    Just want to confirm the current situations.

    Please feel free to let us know if you need further assistance.                   

    Best Regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Monday, September 16, 2019 2:10 AM
  • Hi ,

    Did you have any updates on this issue?

    Best Regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   

    Monday, September 23, 2019 1:43 AM
  • there is an additional physical network adapter now, but i can't seem to use it.



    dmc_lat47

    Monday, September 23, 2019 4:46 AM
  • is there a way to figure out how the virtual switches were configured before?  the only thing i have is the vhd's from the previous virtual machines.

    dmc_lat47

    Monday, September 23, 2019 4:47 AM
  • I can't export the old virtual machine, as the system drive on the machine was fried.

    luckily, all the vhd files were on a separate physical data drive (d:)

    So, the only thing i have is the virtual hard drive files (a virtual c: and a virtual d:)

    I was kind of hoping that the only thing i had to do was to spin up a new instance, and then just specify using the two vhd files for the machine.


    dmc_lat47

    Monday, September 23, 2019 4:50 AM
  • Maybe I'm just confused.

    The on-board nic is marked Ethernet 2, and the additional nic is Ethernet.

    ETH2 was assigned a static IP of 192.168.1.25, and ETH was dynamically assigned 192.168.1.91.

    It doesn't seem that .25 wants to be used... I don't know why this is.  When you have two nics in a machine, I was under the impression it just worked.  It did before the disk failure... was there something I was supposed to set when re-installing?

    In fact, I spun up an entirely new VM as a diagnostic and was having a very difficult time getting the NICs right there as well; the only thing that worked was when I created a virtual switch using ETH, and allowing the host to share the NIC.  

    The static ip assigned to the VM was 192.168.1.28.

    Allow Host To Share nic:

    • Ping to .91: yes
    • Ping to .25: yes
    • Ping to .28: yes
    • RDP to .91: yes
    • RDP to .25: no
    • RDP to .28: yes

    Don't allow host to share nic

    • Ping to .91: Destination host unreachable
    • Ping to .25: yes
    • Ping to .28: Request timed out
    • RDP to .91: no
    • RDP to .25: no
    • RDP to .28: yes

    Is there anything further i can twiddle with to help diagnose?

    thanks

    dmc_lat47

    • Edited by dmc_lat47 Monday, September 23, 2019 5:21 AM
    Monday, September 23, 2019 5:11 AM
  • Generally you should have documented the configuration just for reasons like this.

    Without any machine configuration documentation, it is going to take some hit-and-miss.  You can look at what the virtual machine network configuration is in the sense of how many virtual NICs are defined by looking at the VM configuration.  Maybe some appropriate names were assigned to the virtual NICs that would give you an idea about which physical network to connect to.  Then you would ensure that the new host has connections and virtual switches defined on those same networks. 

    Just remember, it is really no different than a physical machine.  If you haven't defined the connections for a physical machine and you move it to a new network, you end up with the same issue.


    tim

    Monday, September 23, 2019 1:47 PM
  • "I was kind of hoping that the only thing i had to do was to spin up a new instance, and then just specify using the two vhd files for the machine."

    You should be able to.  You just have to have the same virtual network configuration on the new host that you had on the old host.  At the Hyper-V level, define the same virtual switches on the physical NICs, just like you have defined on the old Hyper-V host.  Ensure that the physical NICs on which you have defined the virtual switches are connected to the proper physical networks in your environment.  You may have to disconnect and reconnect the virtual NICs in the VM to the virtual switches, but that should be all that is needed.  (I am assuming that the new Hyper-V host has access to the same networking infrastructure, e.g. DNS, DHCP, etc., as the old Hyper-V host.


    tim

    Monday, September 23, 2019 1:52 PM