Manjaro 26.0.1 as a VirtualBox virtual machine hangs shortly after startup

I have installed Manjaro 26.0.1 KDE Plasma as a virtual machine using VirtualBox 7.2.4 r170995 on Debian 13 (64 bit) as host. The VM attributes I chose are

  • OS Type: ArchLinux
  • RAM: 4096 MB
  • HDD: 20 GB

When I boot up Manjaro, all seems well (the desktop and startup window appears and I can interact with the desktop with the mouse). After a couple of minutes, the desktop hangs and becomes unresponsive. I notice my physical hard drive activity light blinks quite a bit as does the virtual hard drive light in the status bar of VirtualBox.

The only way out is to close the VirtualBox window and force a shutdown.

I did try to install Guest Additions (there is an Upgrade menu option), but that failed and I was unable to capture the error message. Regardless, just booting the VM to the desktop will hang after a couple of minutes.

Any ideas please?

Can you post your guest configuration? (The whole xml file in a code block.)

I am more of a qemu person myself, but I know Manjaro works fine in both.


One thing you would most likely want to change, and may have to do with the hyperactive disk I/O, is installing Manjaro to ext4 instead of btrfs, which is the new default for Manjaro.

I am also a huge btrfs advocate and fan! But on bare metal (or on the host).

This is just a virtualisation thing with CoW file systems in general. In any OS, even Windows. You lose many of the benefits of CoW when it’s inside a virtual drive. So best to avoid it unless you know what you are doing. (And if you have CoW on CoW, it’s even worse!)

1 Like

The general advice is to disable copy-on-write on the virtual machine images.

(I’m still woozy from anesthetic so hopefully I can articulate!)

You can mount it with nodatacow, but this only affects the data part of the file system.

btrfs metadata still runs the same way as before. And depending on what you are doing, and how you set up your disk(s), this can be a bottleneck and/or cause extra overhead.

If you are using the default thinly provisioned disks (which are CoW by nature), you now have CoW on CoW for metadata.

I do use btrfs in VMs quite a bit actually on many mediums, and it works. But it can be much slower, especially with random I/O, and even with nodatacow.

You can alleviate a lot of this I with pre-allocation (or raw images). And they feel somewhat closer to native performance.

(And there are a few cases where I want snapshots and/or checksumming inside my guests too!)

Mod edit: Fixed small typo :wink:

Whatever happens inside of the virtual machine stays inside the virtual machine — it’s somewhat like Las Vegas. :stuck_out_tongue:

So, if you set the nodatacow attribute on the files acting as virtual machine images, then it should be alright. :wink:

I have tried latest Manjaro ISO in VirtualBox in two different computers and can’t reproduce your problem. No hangs so far. Do you have problems with any other ISO? You can also try a memory test just in case…

The only problem I have is that in VirtualBox the live environment does not adjust automatically to my screen size. The default resolution is 800x600 and I have to change it manually if I want something bigger.

This is not necessary.

Is the virtual disk stored on btrfs file system?

If yes try moving it to an ext4 formatted partition.

I am thinking the following could generate some weird issues

  • if your virtual disk is stored on btrfs
  • the virtual machine is installed with btrfs (default file system on the ISO)

Apologies for not replying sooner; I received no email notification despite set to ‘watching’.

My host is ext4. When I created the VM, I only increased the HDD in size (I didn’t see an option to choose format).

I ran the VM up now, manged to launch a terminal, entered lsblk -f and got FSTYPE as btrfs.

So is it possible to switch the FSTYPE to ext4?

As for the ISO I used to install the VM:

$ sudo blkid -o value -s TYPE manjaro-kde-26.0.1-260114-linux618.iso
iso9660

$ file -sL manjaro-kde-26.0.1-260114-linux618.iso
manjaro-kde-26.0.1-260114-linux618.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) ‘MANJARO_KDE_2601’ (bootable)

From where do I obtain the XML file?

(As I said in an earlier reply), I don’t recall seeing an option for choosing ext4 over btrfs (or any other format)…and no idea how to change to ext4 after the fact.

How can I set the nodatacow on the VM files if my host is ext4?

Any other ISO in terms of other distros? Nope. Happily installed Manjaro 24 and 25 both from an ISO.

You can’t, because ext4 does not use copy-on-write.

I wrote that because I was under the impression that the host filesystem was btrfs. My mistake. :man_shrugging:

1 Like

Convert the file system of the freshly installed VM from BTRFS to ext4? No.
The other way around is possible.

You installed with the defaults , which is BTRFS.
The option to choose the file system is not really hidden, but also not very prominent either.
In the third screen of the installer (Partitioning stage), right below the third option,
where you select whether to use swap or not - to the right of that is a small selector field with the default set to btrfs.

1 Like

Then the possible, theoretical issue does not exist.

With most distributions it is recommended to use the guest iso to install certain support files.

This is not necessary with Manjaro Linux. The required package will be provided during installation (by mhwd).

The forum has an extensive troubleshooting and configuration guide in the Contributions > Tutorials section

[root tip] [How To] VirtualBox - Installation - USB - Shared Folder

What comes next is speculation…

Manjaro Plasma default to use Wayland - I don’t know if this is an issue, because I have never purposely tested for that scenario.

You can however test it - instead of signing in - you can use the Host-key+Fkey (if I recall correct) to switch to a TTY in the virtual machine.

Sign in and sync the system while adding the plasma-x11-session.

sudo pacman -Syu plasma-x11-session

Then restart the system - and in the lower left corner change session type to Plasma X11 - and sign in.

I managed to run a terminal (rather than TTY) and installed plasma-x11-session, logged out, selected x11 and logged in. Seemed fine, so I shutdown (via the start menu). Restart and all seemed well…then locks up again. Always running at maximum CPU. I’ll make a detailed post after this one giving the tests I’ve run so far…

Ran a few tests FWIW…

Download fresh ISO - same version/build numbers as what I downloaded initially.

Create VM (ArchLinux, 8GB RAM, 20GB HDD).
Start installation:
Boot using open source drivers.
Erase disk: No swap; ext4
Restart at end.
Locks up after restart after a few seconds.

Create VM (ArchLinux, 8GB RAM, 20GB HDD).
Start installation:
Boot using open source drivers.
Erase disk: Swap (no Hibernate); ext4
No restart at end; after a few seconds locked up.
CPU at maximum.
Force power off.
Remove virtual ISO.
Start up:
Sitting idle for a few minutes.
CPU is bouncing around.
Mouse hover over startup windows; seems responsive.
Screen saver kicked in. Entered password. Still responsive.
Minimised start up window.
CPU still bouncing around.
Desktop icons responding to mouse hover (showing tooltips).
Screen saver kicked in. Entered password. Still responsive.
Attempt shut down; CPU at maximum. Lock up. Force shutdown.
Start up:
Minimise start up window.
Run terminal (click on desktop shortcut).
CPU at maximum. Still responsive.
Run Firefox (click on desktop shortcut).
CPU at maximum. Still responsive.
Screen saved kicked in. Entered password. Still responsive.
Exit terminal.
Start terminal. Shutdown via terminal. Shutdown as normal.
Start up:
Managed to run a terminal (not TTY). Installed plasma-x11-session.
Log out. Select x11 and log in.
Seems fine for a minute or two, so do a proper shutdown via start menu.
Start up:
After a minute or two, locks up and CPU is at maxium (CPU is thrashing for most of the time).

It has been a long time since I used VirtualBox - this is from memory and from reading the documentation:

it’s likely located in ~/VirtualBox
some files, like the disk images, are in ~/VirtualBox VMs or similar
or look in ~/.config/ for a folder belonging to VirtualBox

If you are not dead set on VirtualBox - try virt-manager
(which is what I use)
or the very similar, but simpler Gnome Boxes.
(you appear to use Gnome as your DE on the Debian host)

Still only speculation …

So you are booting into the ISO and you are able to install the system but if you wait then it will lock up.

I am beginning to think it is related to the host and how it handles the virtual machine.

Just punching holes to see what’s behind

  • is virtual extensions enabled in the host firmware?
  • is there any file system or disk errors on the host?

EDIT:

I have not been able to reproduce your issue to the fullest extent.

I see a continued high CPU usage in the guest, but as this is the same no matter the guest system I don’t think it is the Manjaro Linux.

I have used a Clevo N141WU with Intel i7-85550u, 16G RAM using Intel iGPU, The host is installed with Manjaro Xfce 26.0.1 using Linux 6.18 kernel.

I see the same high CPU usage no matter the OS, I have created virtual machines using Manjaro Plasma 26.0.1 ISO and Zorin 17 (Ubuntu based, Linux 6.8 kernel).

I found $HOME/.config/VirtualBox/VirtualBox.xml and looked in that; only config stuff for VirtualBox itself, not for any of the VMs.

I’ve not had trouble with other distros/versions such as this using VirtualBox (that includes Manjaro 24 / 25).

Yes, using Debian 13 with GNOME; I will take a look at other VM solutions…annoyingly I’m spinning up VMs just to test out software I’m writing. After that, I bin the VM.

Yes, can install of ISO. Then restart, after a minute or three, lock up.

Not sure about virtual extensions being enabled. Is this a BIOS thing? I’ve run quite a lot of other VMs using VirtualBox (Manjaro 24 / 25 for example) without this issue.

I ran Manjaro 25; CPU is not thrashing nor at maximum once the VM has fully loaded. I then gave Fedora 43 a go and the CPU is at maximum and does not back off! Oh well…

I might try Manjaro GNOME or Xfce to see the difference. I’m only installing Manjaro (and a bunch of other distros/versions) to test some software. I’ve tested GNOME/Xfce with other distros, but really I want to test Manjaro 26 to check all is well (as has been with Manjaro 24 / 25).