Virtual machine will not start after host hardware change

Discussions related to using VirtualBox on Linux hosts.
Post Reply
bepaald
Posts: 5
Joined: 1. Jan 2023, 19:57

Virtual machine will not start after host hardware change

Post by bepaald »

Hi! I recently upgraded my computer and changed almost all hardware inside (motherboard, cpu, ram, storage). When I now try to start my Win10 guest VM, it hangs with a message 'starting vm' at 20%. The full log is:

Code: Select all

00:00:00.463597 VirtualBox VM 7.0.4 r154605 linux.amd64 (Nov 18 2022 12:54:46) release log
00:00:00.463599 Log opened 2023-01-01T11:14:21.987185000Z
00:00:00.463599 Build Type: release
00:00:00.463600 OS Product: Linux
00:00:00.463600 OS Release: 6.1.1-arch1-1
00:00:00.463601 OS Version: #1 SMP PREEMPT_DYNAMIC Wed, 21 Dec 2022 22:27:55 +0000
00:00:00.463613 DMI Product Name: Z790 GAMING X AX
00:00:00.463617 DMI Product Version: Default string
00:00:00.463620 Firmware type: UEFI
00:00:00.463762 Secure Boot: Disabled
00:00:00.463779 Host RAM: 31904MB (31.1GB) total, 30897MB (30.1GB) available
00:00:00.463781 Executable:  /usr/lib/virtualbox/VirtualBoxVM
00:00:00.463781 Process ID: 1526
00:00:00.463781 Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.468318 Installed Extension Packs:
00:00:00.468323   Oracle VM VirtualBox Extension Pack (Version: 7.0.4 r154605; VRDE Module: VBoxVRDP; Crypto Module: VBoxPuelCrypto)
00:00:00.468570 Console: Machine state changed to 'Starting'
00:00:00.468630 Qt version: 5.15.7
00:00:00.468631 X11 Window Manager code: 3
00:00:00.472583 SUP: seg #0: R   0x00000000 LB 0x00061000
00:00:00.472591 SUP: seg #1: R X 0x00061000 LB 0x0019c000
00:00:00.472593 SUP: seg #2: R   0x001fd000 LB 0x0006d000
00:00:00.472594 SUP: seg #3: RW  0x0026a000 LB 0x0002eae8
00:00:00.495872 GUI: UIMediumEnumerator: Medium-enumeration finished!
00:00:00.497332 X Server details: vendor: The X[dot]Org Foundation, release: 12101006, protocol version: 11.0, display string: :0
00:00:00.497337 Using XKB for keycode to scan code conversion
00:00:00.503117 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated: Screen 0 work area is actually resized to: 0x0 x 2560x1440
Nothing more will happen. The window opened (and the progress modal stuck at 20% on top) do not respond to any clicks and all I can do is kill the process. No snapshots or anything, just trying to do a normal start.

Any ideas? Thanks!
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual machine will not start after host hardware change

Post by mpack »

The most obvious mistake would be to have saved states which relied on the previous hardware. The whole idea of a saved state is that there's no need to go through a "lengthy" (1) checked boot process if nothing about the system has changed. In your case a lot has changed so you should start each VM from scratch.

Next up, you may have damaged the VirtualBox install somehow. I would reinstall.

If problems continue then please provide a complete VM log. Fragments are not useful. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.

1 At least boots used to be potentially lengthy. IMO in the modern era of SSDs nobody needs to be using saved states.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual machine will not start after host hardware change

Post by fth0 »

FWIW, "Console: Machine state changed to 'Starting'" indicates that the VM was started from the Powered Off state. When started from the Saved state, the log message would be "[...] 'Restoring'" instead.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual machine will not start after host hardware change

Post by mpack »

I didn't bother reading beyond the first line of the log fragment provided. I don't do fragments.
bepaald
Posts: 5
Joined: 1. Jan 2023, 19:57

Re: Virtual machine will not start after host hardware change

Post by bepaald »

Hi! Thanks for looking into this.

I've reinstalled virtualbox, but unfortunately, nothing has changed. As mentioned in the first post (even before the first line of the log :wink: ) that was the full log. Nothing more appears in there before I forcibly kill the process (I waited over half an hour the first times I tried).

Here is another log (full log) from just now, after reinstalling:
Image

(edit: seems the image link is not working? It's here: https://i.imgur.com/gDY7rZy.png)

Unless there is a more detailed log I can grab somewhere?

Thanks again, open to more suggestions.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual machine will not start after host hardware change

Post by fth0 »

In the host OS, did you check dmesg or /var/log/syslog?
bepaald
Posts: 5
Joined: 1. Jan 2023, 19:57

Re: Virtual machine will not start after host hardware change

Post by bepaald »

Thanks, that led me to an internet search which shows I'm running into a known issue where I need to boot with ibt=off for virtualbox to work. It's not optimal, I'd personally rather have all default protections in place, but it works. Not sure if the problem is in the kernel or the vboxdrv module though (and who produces that module).

Thanks again!
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual machine will not start after host hardware change

Post by fth0 »

Thanks for reporting back! :)

AFAIR, this issue was allegedly solved as part of the Linux kernel 5.18/5.19 support in VirtualBox 6.1.36. So it's a bit strange to see it resurface in the combination of VirtualBox 7.0.4 and Linux kernel 6.1.1. We'll see if it gets reported by more users ...
bepaald
Posts: 5
Joined: 1. Jan 2023, 19:57

Re: Virtual machine will not start after host hardware change

Post by bepaald »

Well, just for completeness in case anyone else runs into this thread, I'm watching these two issues:

https://bugs.archlinux.org/task/75481 (in Arch)
https://bugzilla.kernel.org/show_bug.cgi?id=216102 (upstream)

Both seem to describe this problem, and both are still open so I assume not fixed. As I understand it now, this has been a problem from 11th gen intel CPU's (I'm on 13th now) and 'ibt' will be enabled by default in the upstream kernel in the upcoming 6.2, so I'm expecting a lot more reports (though many distro's already enable ibt now).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual machine will not start after host hardware change

Post by fth0 »

Thanks for the additional pointers, appreciated! :)
bepaald wrote:Not sure if the problem is in the kernel or the vboxdrv module though (and who produces that module).
The VirtualBox kernel modules (including vboxdrv) are built during the VirtualBox installation process and usually after each kernel update. Can you verify that the kernel module vboxdrv is newer than the date when you updated the kernel? I'm asking because there were issues in the past where the VirtualBox kernel modules erroneously were not rebuilt.
bepaald wrote:Both seem to describe this problem, and both are still open so I assume not fixed.
Since those issues are from mid-2022 and we haven't been overrun by this problem in the mean time, I'm still open to any explanation. ;)
bepaald
Posts: 5
Joined: 1. Jan 2023, 19:57

Re: Virtual machine will not start after host hardware change

Post by bepaald »

fth0 wrote:The VirtualBox kernel modules (including vboxdrv) are built during the VirtualBox installation process and usually after each kernel update. Can you verify that the kernel module vboxdrv is newer than the date when you updated the kernel? I'm asking because there were issues in the past where the VirtualBox kernel modules erroneously were not rebuilt.

Code: Select all

[~] $ pacman -Si linux virtualbox-host-modules-arch | "grep" -E "Name|Build"
Name            : linux
Build Date      : wo 04 jan 2023 17:28:15 CET
Name            : virtualbox-host-modules-arch
Build Date      : wo 04 jan 2023 17:56:11 CET
fth0 wrote:Since those issues are from mid-2022 and we haven't been overrun by this problem in the mean time, I'm still open to any explanation. ;)
Yeah, fair enough. Still, it's quite possible that most bigger distributions have not yet enabled ibt (or even provided a 5.18/5.19 kernel version).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual machine will not start after host hardware change

Post by fth0 »

fth0 wrote:The VirtualBox kernel modules (including vboxdrv) are built during the VirtualBox installation process and usually after each kernel update.
To elaborate on that, the compiler flags (e.g. -fcf-protection) come from the Linux kernel configuration of the host OS. Therefore, I see the following possible causes for your issue:

- Arch Linux has to provide the necessary compiler flags by itself and doesn't do that.

- VirtualBox somehow has to tell Arch Linux to provide the necessary compiler flags and doesn't do that.

- The VirtualBox kernel drivers are compiled with the necessary compiler flags and have some indirect branches written in assembler or in a way that the compiler doesn't instrument them.
Post Reply