chef/bento

Box CentOS9 for VirtualBox with ARM architecture

aymg01 opened this issue · 12 comments

aymg01 commented

Describe the Enhancement

My environment is with a MBP with chipset M1. Vagrant can create Ubuntu machines that meet the architecture. Can you add the box here: https://portal.cloud.hashicorp.com/vagrant/discover/bento/centos-stream-9

Thanks!

virtualbox 7.1 finally added apple silicon support. My testing so far I've been able to get packer to build a box but it fails at the last step when it needs to export the vm.

betalb commented

I also managed to get to the last step, and found this thread in vbox forum https://forums.virtualbox.org/viewtopic.php?t=112717 plus ticket https://www.virtualbox.org/ticket/22196. Both links don't have useful info.

@Stromweld Virtualbox 7.1.6 was released recently. And seems that it fixed export. I've managed to build Ubuntu 24.04, though had some problems with very slow grub rendering which caused issues with boot command, so I had to put timeouts here and there. Not sure if this slowness was caused by update of Virtualbox.

can you share your configuration you used. It's been a while since I've tried to get virtualbox to work and I can't seem to get VM's to boot. I keep getting a session error.

Here it is https://github.com/betalb/bento/tree/ubuntu-arm-vbox

And to run it in vagrant, you will need to monkey-patch it a little bit, VirtioSCSI adapter is added to supported

class VagrantPlugins::ProviderVirtualBox::Model::StorageController
    SCSI_CONTROLLER_TYPES = ["LsiLogic", "BusLogic", "VirtioSCSI"].map(&:freeze).freeze
end

I see that almost the same changes were made for SUSE builds. And it seems that they can be made common for all vbox builds on ARM, because according to manual:

  • EFI is the only option
  • VirtioSCSI also the only option for disk subsystem on ARM

I've pushed changes to linked branch to make code more generic.
But I'm not sure about changes in boot command. Is it my local issues or new VBox version introduced some issues and now RDP is too slow on inital boot phase and grub is painting very slow.

I'm testing that out now. I found adding to vbox manage array ["modifyvm", "{{.Name}}", "--graphicscontroller", "qemuramfb"], helps with the slow load of boot menu. It doesn't like the vmsvga gfx adapter. But if you shutdown and start back up the vm with vmsvga adapter the issue goes away. weird. have you submitted the vagrant patch back to the vagrant repo?

I also observed this behavior with restart.
Also strange that according to VBox docs vmsvga is the only supported option for ARM.

No, haven't yet submitted patch, but was planning to do so.

Raised PR to vagrant: hashicorp/vagrant#13587

I have a new branch and PR that is now working for virtualbox arm systems. #1596

new bento boxes and template updates in main are working to build all boxes for virtualbox on arm64 architecture. The only boxes that don't work is debian as they build but then don't boot.