Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Moving from one Hyper-V host to another

Hi all

I tried to restore use a hyper-v vhdk file on a hyper-v host originally was running on another hyper-v machine. The system starts up as normal, but it's not communicating. I can get access to the shell but not on the webadmin interface.

When using the ifconfig command logged in as root, it only shows me the loopback adapter. using ifconfig -a i was able to bring up the nic assigned in hyper-v config, but what steps i need to do to gain access using webadmin? How to tell the webserver listening on the new interface?

Many thanks in advance!

Liceo


This thread was automatically locked due to age.
  • Hi, Liceo, and welcome to the User BB!

    I wonder if the problem isn't a change of MAC address...

    When you change machines, there's a trick that allows you to do the switchover without clearing the ARP caches in directly connected routers and switches. On the 'Hardware' tab of 'Interfaces & Routing >> Interfaces', edit each NIC and set the 'Virtual MAC Address' to be the same as the 'MAC Address'.

    After this is done on the old machine, backup the old machine and restore to the new one.

    Any luck with that?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Thanks for the warm welcome! Unfortunately, it doesn't work. I did the following:

    [LIST=1]
    • Shut down original vm
    • Copy virtual disk to new host
    • Create new VM, including 2 nic's
    • Attach copied disk and startup vm
    [/LIST]

    The vm is starting on new host without any issues, but the original nics are gone (check screenshots, one from orig. vm and one from the migrated one)
  • Since you just moved the VHD over then all the hardware the UTM is detecting is new hardware and is likely getting assigned as such.  This is likely screwing up your configuration as well.  You can try these two options (back up your configuration first) using the virtual MAC trick mentioned above:

    1)  Instead of just moving the VHD over, shut the virtual machine down and export it from the first Hyper-V host and import it to the second host.  There are certain rules when importing and exporting such as the directory the virtual disk is on when importing, so be aware.  This "may" configure the network adapters with the same perimeter's (i.e. virtual NIC id's, MAC addresses, etc) and the UTM will detect it as such.

    2)  From the shell, remove the old NICs and re-map the current ones to be eth0, eth1 and eth2.  Verify they show up in the GUI as such and then import your configuration backup.
  • Ok, this time i did use the export/import feature but how to remap the current nics to eth0, eth1 etc?
  • You can check on console which nic is your management nic where you could reach webadmin through
    Change for this nic eg eth1 manually the IP adresss in console with
    ifconfig eth1 192.168.1.1 mask 255.255.255.0
    Then you can open up webadmin for this set ip and change the nics to desired ones

    Please mind it could happen that some nics cannot be changed due webadmin is active on them
    But do trial and error and you will bet where you want
  • I found the root cause:

    According to a Microsoft whitepaper, it's recommended for Linux VMs to set a static mac address in Hyper-V VM config. After this, the adapters comes up as normal after migration.

    Thanks anyway

    Liceo