Hyper-V machines always take host IP

Scott S 1 Reputation point
2021-04-05T15:12:47.517+00:00

Without setting a local static IP in each machine, the machine will first take the host IP. Even though, I have a) set a static IP in host adapter and in router admin.

My issue with this is that with one particular machine, I cannot set the IP within its adapter (hass.io for Home Assistant). I can only assign such in the router admin. Still, when it starts, it takes my host IP.

How can I stop this from occurring?

System Center Virtual Machine Manager
0 comments No comments
{count} votes

7 answers

Sort by: Most helpful
  1. AlexZhu-MSFT 5,551 Reputation points Microsoft Vendor
    2021-04-06T07:57:19.347+00:00

    Hi,

    To avoid any misunderstanding, could you share more details about the problem? For example, what's the environment? SCVMM or pure Hyper-V? If Hyper-V, how did we create the virtual switch? And how did we configure the IP address of the host?
    84831-hyper-v-virtual-switch.png

    when we convert a physical adapter to a virtual switch, the IP configuration will move to the virtual switch.
    84812-hyper-v-virtual-switch-02.png

    And for the physical adapter, only Hyper-V Extensible Virtual Switch is left.
    84823-hyper-v-virtual-switch-01.png

    Besides, what is the guest OS? Linux or Windows? And what does it takes host IP mean? The guest OS occupies the host IP and host IP is lost?

    Regards,

    Alex
    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. Scott S 1 Reputation point
    2021-04-06T17:28:16.773+00:00

    Thanks @AlexZhu-MSFT for the reply. Setup is pure Hyper-V (as I did no other type of setup or configuration). Pardon, I did initially add a screenshot of my virtual adapter, but didn't save. Please see below.

    Host OS: Windows Pro x64 2004
    Guest OS: Home Assistant hass.io running in a docker... no access to adapter

    When the hassio guest VM runs, it takes the host IP. The host remains connected with the same/entered IP, but I cannot reach the hassio guest.

    Hyper-V Adapter Setup:
    84974-hyperv-adapter.jpg

    Host network panel:
    84992-win-network-panel.jpg

    Host adapter:
    84984-adapter-host.jpg

    Virtual adapter:
    85001-adapter-1.jpg

    Bridge (MAC Bridge, LLDP Protocol, Hyper-V Extensible VS checked)
    85002-bridge.jpg

    0 comments No comments

  3. Dave Patrick 426.1K Reputation points MVP
    2021-04-06T21:23:18.613+00:00

    Please post an unedited ipconfig /all of both.

    0 comments No comments

  4. Scott S 1 Reputation point
    2021-04-06T21:35:49.273+00:00

    Interestingly enough, I've started my hassio VM multiple times and it now is using the correct IP. I don't get it.

    Below is a screenshot of both. Note, for hassio, the screen you see is the only screen I have showing the IP.

    Host:
    85031-host-ip.jpg

    HASSIO VM:
    85041-ha-vm.jpg

    0 comments No comments

  5. Dave Patrick 426.1K Reputation points MVP
    2021-04-06T21:40:22.277+00:00

    Ok, this must be some problem or anomaly with the operating system (home assistant) This would never happen with a windows guest. Either avoid the issue by setting a static address or I'd try asking for assistance on this one in their forums located here.
    https://community.home-assistant.io/

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments