I had one virtual machine that every time I tried to connect from the console I would get the following error

This one problem VM is Ubuntu 22.04 however all my other Linux VMs would connect fine

Turning off NUMA Spanning fixed the issue for me however I have a feeling this error can mean several different things for different scenerios

Here is what I did:

All virtual machines on the host must be shut down in order to change this setting

Open Hyper-V Manger and right click the server and go to Hyper-V Settings

Next select NUMA Spanning and UNCHECK the box and click OK

After that I was able to connect to my Ubuntu 22.04 VM with no issues

One thing worth mentioning maybe is this VM did have LVM encryption enabled on the virtual disk

 

Reference:

windows 8 – “Cannot connect to the virtual machine.” for new Hyper-V Virtual Machine – Super User