XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Change nic name when importing Ubuntu vm from VMware

    Scheduled Pinned Locked Moved Management
    8 Posts 2 Posters 701 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • johandrJ Offline
      johandr
      last edited by

      I noticed that when I import a vm from VMware running Ubuntu 22.04, I have to change the name of the nic from

      ens33
      

      to

      eth0
      

      If I don't do this, XO reports

      no IPV4 record found
      

      Although easy to do, it is a painful process if you have a large number of vm's to import.

      Is there a way around this renaming step when import vm's?

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        DustinB @johandr
        last edited by

        @johandr said in Change nic name when importing Ubuntu vm from VMware:

        I noticed that when I import a vm from VMware running Ubuntu 22.04, I have to change the name of the nic from

        ens33
        

        to

        eth0
        

        If I don't do this, XO reports

        no IPV4 record found
        

        Although easy to do, it is a painful process if you have a large number of vm's to import.

        Is there a way around this renaming step when import vm's?

        How are you importing the VM?

        johandrJ 1 Reply Last reply Reply Quote 0
        • johandrJ Offline
          johandr @DustinB
          last edited by johandr

          @DustinB

          I use the Import from VMware option in XO to connect to VMware host to import

          This is what the Netplan config file looks like before change:

          Screenshot 2024-02-27 at 21.13.08.png

          D 1 Reply Last reply Reply Quote 0
          • D Offline
            DustinB @johandr
            last edited by

            @johandr yeah I'm not sure if the configuration within the VM matters for the device name, as it's getting passed the hardware from XCP-ng.

            Are you trying to import a powered on or off VM from ESXi? I'll test here to check.

            also are you using XOA or the source edition and are you updated to the latest version?

            johandrJ 1 Reply Last reply Reply Quote 0
            • johandrJ Offline
              johandr @DustinB
              last edited by

              @DustinB

              I have tried XOA and the latest community edition (build it today).

              I imported the the vm's powered on and when switched off.

              Once in XO, I install guest-tools and change the nic name. I tried installing guest-tools and rebooting the vm, but there is still no IP record. I have to change the name before it works.

              I first suspected that it was just an XO problem not reporting the IP record with the old ens33 name, but you also can't ping the vm, so it definitely does not have a valid ip.

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                DustinB @johandr
                last edited by

                @johandr Dumb question, but is the network attached to the same VLAN from XCP-ng and ESXi?

                IE: Can your VM actually pull DHCP if it were built brand new on XCP-ng using the same network adapter?

                johandrJ 1 Reply Last reply Reply Quote 0
                • johandrJ Offline
                  johandr @DustinB
                  last edited by

                  @DustinB

                  Let me try that ...

                  johandrJ 1 Reply Last reply Reply Quote 0
                  • johandrJ Offline
                    johandr @johandr
                    last edited by johandr

                    @DustinB

                    I built a new vm from the Ubuntu 22.04.4 template and it picked up an ip address from the DHCP server after boot.

                    Interesting though, the name of the nic in the Netplan config file is now

                    eth0
                    

                    I noticed that VMware use a virtual nic named

                    VMXNET 3
                    

                    Maybe Ubuntu then maps that virtual nic to the ens33 nic name

                    I see this issue was identified previously: https://xcp-ng.org/forum/post/68891

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post