Ubuntu 24.04 LTS VBox VM does not boot anymore

Bug #2076520 reported by BertN45
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
virtualbox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I installed it the first time, while it was still in the development edition. After the April release the system often had boot issues, the first boot failed and the second boot succeeded. Two weeks ago all boots failed except the boots in the alternate mode.
So I decided to reinstall the system. I took a copy from the up-to-date working version of Ubuntu 22.04 LTS and after the upgrade the 24.04 system booted the first time. Afterwards the system always failed to boot. I tried the 6.5 kernel of Linux, still present from 22.04 and the first boot was fine, but here also all following boots failed.

I can only boot the system through recovery mode, thus in X11 mode (800x600) and I have to change the display settings manually. In Wayland it does not even reach the login screen.

Sometimes e.g Ubuntu Budgie also fail on the first boot, but is OK on the second. Other other versions of Ubuntu from 16.04 ESM till 22.04 LTS work fine and so do Linux Mint 22; Zorin 17; Fedora 40; Manjaro; Debian 12 and OpenSuse Leap 15.5. Also Windows XP, 10 and 11 work fine.

I tried to collect more info in recovery mode, but that fails to bring up a browser screen and so I assume that info is last, because the displayed http address did not exsist.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: xorg 1:7.7+23ubuntu3
ProcVersionSignature: Ubuntu 6.8.0-40.40-generic 6.8.12
Uname: Linux 6.8.0-40-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.1
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: unknown
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sat Aug 10 16:01:19 2024
DistUpgraded: 2024-08-10 14:51:35,265 DEBUG migrateToDeb822Sources()
DistroCodename: noble
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
GpuHangFrequency: Very infrequently
GraphicsCard:
 VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
   Subsystem: VMware SVGA II Adapter [15ad:0405]
InstallationDate: Installed on 2020-01-25 (1660 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200124)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Lsusb-t:
 /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/8p, 480M
 /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/6p, 5000M
MachineType: innotek GmbH VirtualBox
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-40-generic root=UUID=f9b05146-6063-461a-97c0-dc3d4d0f2aef ro recovery nomodeset dis_ucode_ldr
SourcePackage: xorg
Symptom: display
Title: Xorg freeze
UpgradeStatus: Upgraded to noble on 2024-08-10 (0 days ago)
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.board.name: VirtualBox
dmi.board.vendor: Oracle Corporation
dmi.board.version: 1.2
dmi.chassis.type: 1
dmi.chassis.vendor: Oracle Corporation
dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:sku:
dmi.product.family: Virtual Machine
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH
mtime.conffile..etc.init.d.apport: 2024-07-22T10:59:07
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.120-2build1
version.libgl1-mesa-dri: libgl1-mesa-dri 24.0.9-0ubuntu0.1
version.libgl1-mesa-glx: libgl1-mesa-glx N/A
version.xserver-xorg-core: xserver-xorg-core 2:21.1.12-1ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:22.0.0-1build1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20210115-1build1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1

Revision history for this message
BertN45 (lammert-nijhof) wrote :
affects: ubuntu → xorg (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

We will need to see a boot log that's not in recovery mode. Please reproduce the bug again, then reboot into recovery mode and run:

  journalctl -b-1 > prevboot.txt

And attach the resulting text file here.

affects: xorg (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
BertN45 (lammert-nijhof) wrote :

I had a problem, getting the system to run in recovery mode, so I copied the whole journalctl file, but I deleted manually all older boots. The first boot of "ago 12" is the one that went wrong and the one you requested. I let the VM run for 3 minutes and then I VBox-powered-off. My normal boot time is around 12 seconds.

The ones afterwards you can ignore, that is when I tried to enter recovery mode. In the last one, the VM just booted correctly for some reason and that is how I got the journalctl.

I now realize that entering the recovery mode had a problem, because the VM was in full screen mode 1920x1080. The shift key for the recovery mode was ignored, so the VM tried to boot normally and it succeeded once after many times.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There are several kernel crashes there. And separately vmwgfx seems to be failing, complaining "*ERROR* vmwgfx seems to be running on an unsupported hypervisor". So it's possible the fix here is to choose a different virtual graphics card in VirtualBox.

Revision history for this message
BertN45 (lammert-nijhof) wrote : Re: [Bug 2076520] Re: Ubuntu 24.04 LTS VBox VM does not boot anymore

There is only one graphics controller you can select for Linux: VMSVGA
and you can use it with or without 3D acceleration, but it has the same
result. And basically that is the first thing I try in case of any
potential display issue. All my other Linux and older Ubuntu VMs run
fine with this graphics driver.
I do not understand, why Virtualbox is considered an unsupported
hypervisor, since I already use Virtualbox since 2009 with Ubuntu and I
never knew, it was an unsupported hypervisor.

I run the second slowest Ryzen CPU ever and I use it for Virtual
Machines, I don't expect others use VBox VMs on this slow CPU (4C4T;
3.7GHz).
Based on the time I worked on a kernel long ago, I have the feeling,
that we are dealing with a parallel processing problem related to
kernel and virtualbox modules, since it has a timings aspect. Something
like the hypervisor type is not supplied yet by vbox and the kernel
expects it to be present already. On faster CPUs vbox could be in time
to provide the data. Also on faster booting Ubuntu flavors (~7
seconds), the data could be provided mostly on time. But whenever you
have 2 threads working on the same data access must be synchronized to
avoid these type of timing issues.

I can explain the strange behavior, that it boots after the 6th boot by
the fact that I use OpenZFS. So on every run it collects more code in
the 4 GB ZFS memory cache (L1ARC, lz4 compressed) and the next boot is
more from memory and less from the nvme-SSD (3400/2300MB/s). In the
~5th try it did reach the login screen, but it did not login, in the
~6th try I could log in normally. You should also have the log from
this boot as last one and the one I used for journalctl.

Remember I also have occasionally a faulty boot on Ubuntu Budgie 22.04,
but there the second boot is always correct. Some weeks ago, I also had
the problem with 24.10, but there it disappeared.

On Tue, 2024-08-13 at 01:36 +0000, Daniel van Vugt wrote:
> There are several kernel crashes there. And separately vmwgfx seems
> to
> be failing, complaining "*ERROR* vmwgfx seems to be running on an
> unsupported hypervisor". So it's possible the fix here is to choose a
> different virtual graphics card in VirtualBox.
>

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like a bug in the guest driver (vmwgfx) in that case. Although some quick googling for:

  "vmwgfx seems to be running on an unsupported hypervisor"

reveals it can be storage related too. I guess because the hypervisor uses similar mechanisms for sharing storage as it does for communicating graphics? One could potentially break the other.

affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Incomplete → New
tags: added: vmwgfx
Revision history for this message
BertN45 (lammert-nijhof) wrote :

I don't know the design, so I can't add much information. But I expect it is a timing issue between the kernel and one of the virtualbox kernel modules. They do things in 2 threads (one from the kernel and one from virtualbox) and they are not properly synched. So in some systems it will work always, in others it will fail always and in others it will work occasionally. Nobody will have detected it during e.g a review, because the maintenance is done by 2 separate teams.

The fact that it works fine with linux kernel 6.5 (22.04) and fails with linux kernel 6.8 (24.04), means I would suspect a change in the kernel itself causing the issue. Note that all my VMs run on Virtualbox Guest Additions 7.0.20.

Revision history for this message
ElTouco72 (eltouco72) wrote (last edit ):

I have exactly the same problem on ubuntu 22.04 LTS since the kernel was updated to 6.8
VMs don"t start now
I use virtualbox 6.1 (the version that is in ubuntu repo)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: regression-release
Revision history for this message
nany (nany) wrote :

Hello,

ElTouco72 (eltouco72) wrote:

"I have exactly the same problem on ubuntu 22.04 LTS since the kernel was updated to 6.8
VMs don"t start now
I use virtualbox 6.1 (the version that is in ubuntu repo)"

+1
I had to restart on kernel 6.5.0-45 to use VMs.

Virtualbox version: 6.1.50-dfsg-1~ubuntu1.22.04.3

Revision history for this message
nany (nany) wrote (last edit ):
Revision history for this message
Phil (zealophobic) wrote (last edit ):

I have a very similar problem: I created a virtual machine using VirtualBox 6 and installed Ubuntu 22.04 on it. Recently, I installed VirtualBox 7.0.18 and created a virtual machine with Ubuntu 24.04. This VM installed Ubuntu correctly, but after that would never work properly again.
Sometimes it doesn't boot at all.
Sometimes it prints the error "vmwgfx seems to be running on an unsupported hypervisor".
Sometimes it freezes, while still consuming most of my computer's CPU.
Sometimes it freezes while still consuming very little CPU.
Sometimes it logs me in and gets all the way to showing the Ubuntu desktop, then immediately pops up a window with a memory error, and closes the machine when I click on that pop-up.

VB7 still runs that old Ubuntu 22.04 VM fine, with NO turtle indicating snail mode, so Hyper-V apparently? isn't running, although the 24.04 machine sometimes reports another hypervisor IS running. And I CAN run the 24.04 VM without problem if I insert the Ubuntu 24.04 live CD and boot from that. And I updated to VirtualBox 7.0.20, and still had the same symptoms. So the problem does appear to be with Ubuntu 24.04, not with VirtualBox 7.

I'm very confused by the fact that the 22.04 machine runs at max speed, yet, in another window at the same time, the 24.04 reports another hypervisor is running.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtualbox (Ubuntu):
status: New → Confirmed
Revision history for this message
Phil (zealophobic) wrote :

OP's bug report says:

dmi.product.name: VirtualBox
dmi.product.version: 1.2

VirtualBox 1.2? That can't be right. That was in 2007.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.