Vagrant Box Failing to Load - VirtualBox hangs on Booting VM while Selecting IO

When trying to run a vagrant box with a virtualbox provider on an endeavourOS dual boot. It always hangs when booting the VM.

Virtual Box Version: 7.0.8
Vagrant: 2.3.6 (aur package is outdated but looking at changelog nothing in v 2.3.7 would fix this)

Here is my Hardware Setup: https://linux-hardware.org/?probe=32fbe34ce0
Here is my A Gist of the Log when it hangs: https://gist.github.com/DaneParcJr/1a67fb070d402bd9bf6737a5478ce274

And here is the relevant section (I think) of where it hangs:

==> default: Running 'pre-boot' VM customizations...
2023-07-18 06:05:03 [ INFO] Starting process: ["/usr/bin/VBoxManage", "modifyvm", "9dd722f5-dd12-41d3-bc19-eaf9824cd7e4", "--memory", "3072"]
2023-07-18 06:05:03 [ INFO] Command not in installer, restoring original environment...
2023-07-18 06:05:03 [DEBUG] Selecting on IO
2023-07-18 06:05:03 [DEBUG] Waiting for process to exit. Remaining to timeout: 32000
2023-07-18 06:05:03 [DEBUG] Exit status: 0
2023-07-18 06:05:03 [ INFO] Starting process: ["/usr/bin/VBoxManage", "modifyvm", "9dd722f5-dd12-41d3-bc19-eaf9824cd7e4", "--uart1", "off"]
2023-07-18 06:05:03 [ INFO] Command not in installer, restoring original environment...
2023-07-18 06:05:03 [DEBUG] Selecting on IO
2023-07-18 06:05:03 [DEBUG] Waiting for process to exit. Remaining to timeout: 32000
2023-07-18 06:05:03 [DEBUG] Exit status: 0
2023-07-18 06:05:03 [ INFO] Calling IN action: #<VagrantPlugins::ProviderVirtualBox::Action::Boot:0x00005615a8313350>
2023-07-18 06:05:03 [ INFO] info: Booting VM...
2023-07-18 06:05:03 [ INFO] info: ==> default: Booting VM...
==> default: Booting VM...
2023-07-18 06:05:03 [ INFO] Starting process: ["/usr/bin/VBoxManage", "startvm", "9dd722f5-dd12-41d3-bc19-eaf9824cd7e4", "--type", "headless"]
2023-07-18 06:05:03 [ INFO] Command not in installer, restoring original environment...
2023-07-18 06:05:03 [DEBUG] Selecting on IO

Very new to ArchLinux to bear with me please if I ask dumb questions or don’t quite know everything yet. Still learning! :slight_smile:

It has been years since I used virtualbox and converted to QEMU/KVM so a little rusty, and I have also not used vagrant in a similar amount of time.

Can you run the VM in a the VB GUI so you can see better error messages, and maybe get prompted, rather than as headless?

Can you increase the verbosity of the logging?

What the the ‘Command not in installer’ that keeps getting flagged?

search for “command not in installer” restoring gives me this:

Seems like one solution is trash the VM and rebuild.

I’ve tried to run it in gui mode with the v.gui = true.

But it just hangs on the starting vm and requires a full restart to exit.

Can’t get more valid debugging than what I’m showing at the moment unfortunately.

Do you think this could be potentially a kernel issue?

Don’t know, but journalctl -kb will show kernel logs.

Since you are using Linux I don’t know why you aren’t using libvirt for the virtualization? Seems to be supported with vagrant and as far and I know libvirt would be more tuned to Linux while virtulbox is more generic and works over numerous operating systems.

I’m new to Linux the main reason I’m using it now is because the M1/M2 chips we got for our new work computers aren’t compatible with our dev environment, so we have to find alternatives. I also really wanted to get into arch linux. So seemed like the perfect opportunity.

Is libvirt compatible with virtual boxes? As I believe that’s the main reason I am using virtual box, our box is being provided to us by the company.

Sorry if this is something I should have known about, I’ll be reading up on the libvirt docs, see if it’s possible to convert an existing vagrant box to it.

I just searched vagrant libvirt and came up with relevant hits.
VB and libvirt/qemu/KVM are both virtualization systems.

The disk image from VB should be convertable for qemu, probably using qemu-img, or VboxManage, or a combination.

You will learn a lot going thru the process, but not sure it is a rabbit hole you want to go down.

If you can create and run a normal virtualbox image with a gui, then that would say that virtualbox works.

If not you should double check the prereqs like IOMMU/VTx, any kernel modules you might need, etc. Check the VB docs.

Thank you! I’ve been reading the docs as well. VTx should be enabled, I’ll have to check for IOMMU, but on the windows machine (this is a dual boot), Virtual Box works so I think everything is fine from a BIOS standpoint.

I will try just using a generic box to see if it works, and if it does, then maybe it’s something with Vagrant. Otherwise like you say, I’ll triple check the prereqs and make sure I got everything.

I found the solution! I ended up going down the rabbit hole like Samarium suggested and I discovered a little tidbit about disabling ibt on boot. I have done so by pressing e on the boot option for endeavourOS and appending “ibt=off” to the end. Now all my VMs are working as intended!

Thank you Samarium for suggesting the rabbit holes and for your help! I’ve learned a lot from this process.

Now I just need to figure out how to add ibt=off as a default option via systemd–boot.

1 Like

With sudo add it to /etc/kernel/cmdline and then run reinstall-kernels.

Also be aware that you have possibly reduced your kernel security by disabling that parameter.

1 Like

Thank you, will do. Seems turning ibt off is a common solution for intel/nvidia issues in regard to linux. At least from what I’ve been reading online. Also seems like switching to the lts kernel is better at handling these issues. So I may very well try to switch to that as well.

I normally run LTS. Less chance of things breaking, and I usually don’t need the latest fashionable kernel bling.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.