I'm only a casual Ubuntu user and I'm new to managing my own virtual machine, so I'm hoping I'm missing something obvious. I use Hyper-V on Windows 10 to run an Ubuntu 20.04 VM, which I only need in order to run some models for work. Everything has worked fine over several months of regular use.
Today on the VM I had to kill a model process that had been set up wrong and was running too long and filling the virtual hard drive. Maybe importantly, while this process was still running, I had canceled a 'system program problem detected' popup (then promptly forgot about it, of course).
After killing the problematic process, the session seemed fine. I used top
to make sure the right process had been killed. Then I meant to shut down the VM from the terminal, but I accidentally rebooted it instead - wrong muscle memory, probably not important.
However, since the VM restarted, I haven't been able to connect to it. From the Hyper-V manager, I can shut down and start the VM (successfully, according to Hyper-V), and when I try to connect, I get the xrdp login screen. But after entering my username and password, the connection hangs on the blue screen, then eventually pops up this error:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait...
login successful for display 10
started connecting
connection problem, giving up
some problem
I see that others have had similar blue-screen problems (e.g. Error/problem connecting (Windows 10 RDP into XRDP)) and solutions generally suggest issues with xrdp. Or the problem may relate to the 'system program problem detected' error, which unfortunately I didn't look closely at when I had the chance.
However, herein lies my problem: even exploring these issues(s) presumably requires access to a terminal on the Ubuntu VM - but I can't connect to the Ubuntu VM - so it seems like I can't get access to a terminal to even try to fix things.
So - can anyone give me pointers on using Moba or some other approach to access a terminal on the VM? Or is the VM just toast? Thoughts on what might have gone wrong to begin with? Any suggestions appreciated.
(For the record, the main reason I care is some scripts and other files saved on the virtual hard drive that I'd hate to have to recreate. So if there is a way to just access the files on the VHDX, that would be an acceptable workaround.)
Other things I've tried, in case they shed more light:
- Restarting the Windows 10 host machine, because I'd feel especially dumb if this fixed it and I hadn't tried. No effect.
- Disabling enhanced session mode in the Hyper-V settings: in this case, after 'Connecting' and starting the VM, the Hyper-V/Ubuntu splash screen appears, then a lot of text runs by too fast to see (startup info, I assume), and then there's an eternal blinking cursor on a black screen.
- Copying the VHDX using the 'convert' option in the Hyper-V 'Edit disk' utility, then expanding the size of this copy and attaching it to the VM (in case the problem was the full disk from the killed process). This had no effect - same hang on the blue screen as the original problem.
- Accessing the running VM using its ip address via mobaxterm. The connection was refused, although my understanding of ssh, ports, etc. is minimal and I may have set it up wrong.
- Hoping to just get access to the VHD files, I built a new Hyper-V VM attached to the copy of the VHDX I created above. However, this new VM fails to find a boot image and can't load the OS - I didn't pursue this further because it's above my pay grade and seemed like a long shot anyway.
Thanks again for any insight.