No IP after importing a Linux VM into XCP-NG (SOLVED)

27th May 2025

make sure no vmware tools are installed:
sudo apt remove open-vm-tools

Mount the vmtools CD/ISO:
mount /dev/cdrom /mnt (may need to reboot to get this to take; shutdown -r)
bash /mnt/Linux/install.sh
umount /dev/cdrom
shutdown -r
(eject the CD ISO)

Ubuntu + Netplan naming problems:
note the name of the network adapter is eth0 after importing into XCP. confirm with below
ip a

Netplan still thinks it’s the old name:
sudo nano /etc/netplan/00-installer-config.yaml
#this is the network config written by subsomething
network:
ethernets:
ens160:
dhcp:true

your network adapter may be called something different than ens160, change that to eth0 or whatever it was called in the ip a listing above. THIS IS CASE SENSITIVE enx0 and enX0 are different.

reset the networking with:
sudo netplan apply

you should be able to ping 8.8.8.8 now.
i rebooted as some demons were not running, likely dependent on networking.

More info here https://xcp-ng.org/forum/topic/8790/import-of-ubuntu/14