Hello,
It sounds like you're experiencing DHCP-related issues with your Ubuntu 22.04 guest running on Hyper-V. When you manually assign an IP address, the guest functions as expected, but DHCP doesn't seem to work during the initial boot.
Here are a few troubleshooting steps you can consider:
Check DHCP Server Configuration: Ensure that the DHCP server on your Hyper-V virtual switch is properly configured and running. Verify the IP address range and subnet settings.
Hyper-V Virtual Switch Settings: Double-check the settings of your Hyper-V virtual switch. Make sure that the appropriate network adapter is selected, and review any VLAN settings if applicable.
Ubuntu Network Configuration: Inside the Ubuntu guest, confirm that the network adapter is set to obtain an IP address automatically via DHCP. You can check and modify this configuration in the /etc/netplan
directory.
1.