When I am going through the Ubuntu installer on my VM, I am able to reach the part where I create an account and then it begins installing everything. After several minutes, the installation gets an "Error installing linux-image-5.15.0-52-generic" window near the end. It says that the package post-installation script subprocess returned an error exit status 1. When I click ok, a larger window says that an error occurred and that "E:Sub-process /usr/bin/dpkg returned an error code (1)" but installation will try to continue anyway. When I click ok on that one, the installer prompts me to restart and after the VM restarts, it just gets stuck on a black screen with "Hyper-V" in the center.
My host system runs on Windows 11, hypervisor is Hyper-V Manager. I got the .iso from Canonical's website for Ubuntu Desktop. During installation, I did a custom partition setup on a 85.9 GB virtual disk that includes: 1 MB free space, 98 MB ext4 mounted at /boot, 10000 MB ext4 mounted at /, 1024 MB swap, 599 MB efi, and 74175 MB remaining free space.
Most instances of the /usr/bin/dpkg error code (1) that I have seen online seem to happen to people when they install new software after the initial installation, and solutions to those involve the command prompt, which I can't fully access yet. I remember successfully running an Ubuntu VM on my computer earlier in the year, though that was when it was still on Windows 10, but still not sure what could be causing this or how to fix it.