Coder Social home page Coder Social logo

Comments (15)

jamiejackson avatar jamiejackson commented on August 16, 2024 1

Since my last post, I've been trying the ISO directly in virtualbox and there's a problem even there. I'm about to post to the virtualbox mailing list.

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

when clicking on that link for the vagrant boxes you can see there are 2 arm boxes for Parallels and Vmware_desktop which is Vmware Fusion for mac or Vmware Player for linux and windows. Vagrant 2.4.0 is needed and make sure you are setting the vagrant provider to one of those virtualization systems otherwise it defaults to virtualbox.

Otherwise I'm not sure what is the ask here.

from bento.

jamiejackson avatar jamiejackson commented on August 16, 2024

Argh, sorry. Every time I wrote Vagrant, I'd meant to type VirtualBox. Will edit...

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

Virtualbox is only beta for Non Intel Macs and isn't supported. I can't get any boxes to build for it on arm architecture.
image

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

you are welcome to try packer with this repo. Simply clone this repo, install packer, in terminal navigate to this repo. Run packer init packer_templates > packer build -only virtualbox-iso.vm -var-file=os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl ./packer_templates if you want a gui add -var 'headless=false' Instructions can also be found in https://github.com/chef/bento/blob/main/README.md

from bento.

jamiejackson avatar jamiejackson commented on August 16, 2024

@Stromweld , thanks for the info. I know that VirtualBox for the new Macs is only in beta at the moment but I understand why Bento wouldn't jump on it yet.

We can give those instructions a shot. Do you remember what issue you ran into when you tried arm builds?

from bento.

jamiejackson avatar jamiejackson commented on August 16, 2024

Ah, yes. This is what I'd been getting in my own failed Packer attempts, too.

After hacking the following:

diff --git a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl
index 35e3798..e49428e 100644
--- a/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl
+++ b/os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl
@@ -1,7 +1,7 @@
 os_name                 = "ubuntu"
 os_version              = "22.04"
 os_arch                 = "aarch64"
-iso_url                 = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.3-live-server-arm64.iso"
+iso_url                 = "https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso"
 iso_checksum            = "file:https://cdimage.ubuntu.com/releases/jammy/release/SHA256SUMS"
 parallels_guest_os_type = "ubuntu"
:

Then running:

packer init packer_templates
packer build -only virtualbox-iso.vm -var-file=os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl ./packer_templates

I got this in the guest:

Could not read from the boot medium!
Please insert a bootable medium and reboot.

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

that's part of the issues troubleshooting so many images, times virtualization providers, times cpu architectures. So many to go through and fix. Typically you have to find the difference in a running config for virtualbox and the config we are generating and then we may have to update the code to make it work. Some arm boxes require EFI others have patches for specific providers and only support those with arm platforms(oracle8 patches form vmware arm but rhel 8 doesn't). Most often it's configuration in the boot_wait and boot_command that needs updating and packer gets stuck at waiting for ssh.

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

I'd try manually downloading the machine and spinning it up in virtualbox then running vboxmanage command to dump it's config. Then run packer and add -on-error=ask flag to pause before cleaning up and dump the configuration of the packer virtualbox machine and compare to see what is potentially needed to be changed.

from bento.

jamiejackson avatar jamiejackson commented on August 16, 2024

I think I'm finding that despite the existence of a VirtualBox beta/test version for the new Macs, there is no useful version in existence.

I have a forum post here to clarify the matter.

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

that's been my experience so far for virtualbox on arm64.

from bento.

jamiejackson avatar jamiejackson commented on August 16, 2024

I haven't given up quite yet, because of a reponse on the forum.

On my Intel Mac, I have just installed a dev snapshot of VirtualBox and I'm trying to build an arm box on it.

This VirtualBox version's VBoxManage createvm seems to expect an architecture flag:

VBoxManage: error: Parameter --platform-architecture is required

I can't figure out how to influence the arguments that Packer/bento sends to VBoxManage, though. I'm not finding it in the bento source. (Maybe this is upstream in Packer?)

Please let me know if you have ideas on how to make progress.

Full command and output:

 % packer build -only virtualbox-iso.vm -var-file=os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl ./packer_templates

virtualbox-iso.vm: output will be in this color.

==> virtualbox-iso.vm: Retrieving Guest additions
==> virtualbox-iso.vm: Trying /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso.vm: Trying /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso.vm: /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso => /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso.vm: Retrieving ISO
==> virtualbox-iso.vm: Trying https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso
==> virtualbox-iso.vm: Trying https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso?checksum=sha256%3A74b8a9f71288ae0ac79075c2793a0284ef9b9729a3dcf41b693d95d724622b65
==> virtualbox-iso.vm: https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso?checksum=sha256%3A74b8a9f71288ae0ac79075c2793a0284ef9b9729a3dcf41b693d95d724622b65 => /Users/jjackson/.cache/packer/a2bcf685fcca57f42a01f519e9e768cc87ac72b2.iso
==> virtualbox-iso.vm: Starting HTTP server on port 8423
==> virtualbox-iso.vm: Creating virtual machine...
==> virtualbox-iso.vm: Error creating VM: VBoxManage error: Oracle VM VirtualBox Command Line Management Interface Version 7.0.97
==> virtualbox-iso.vm: Copyright (C) 2005-2024 Oracle and/or its affiliates
==> virtualbox-iso.vm: 
==> virtualbox-iso.vm: VBoxManage: error: Parameter --platform-architecture is required
==> virtualbox-iso.vm: 
==> virtualbox-iso.vm: Usage - Create a new virtual machine:
==> virtualbox-iso.vm: 
==> virtualbox-iso.vm:   VBoxManage createvm <--name=name> <--platform-architecture= x86 | arm>
==> virtualbox-iso.vm:       [--basefolder=basefolder] [--default] [--group=group-ID [,...]]
==> virtualbox-iso.vm:       [--ostype=ostype] [--register] [--uuid=uuid] [--cipher=cipher]
==> virtualbox-iso.vm:       [--password-id=password-id] [--password=file]
==> virtualbox-iso.vm: Deleting output directory...
Build 'virtualbox-iso.vm' errored after 6 seconds 812 milliseconds: Error creating VM: VBoxManage error: Oracle VM VirtualBox Command Line Management Interface Version 7.0.97
Copyright (C) 2005-2024 Oracle and/or its affiliates

VBoxManage: error: Parameter --platform-architecture is required

Usage - Create a new virtual machine:

  VBoxManage createvm <--name=name> <--platform-architecture= x86 | arm>
      [--basefolder=basefolder] [--default] [--group=group-ID [,...]]
      [--ostype=ostype] [--register] [--uuid=uuid] [--cipher=cipher]
      [--password-id=password-id] [--password=file]

==> Wait completed after 6 seconds 812 milliseconds

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso.vm: Error creating VM: VBoxManage error: Oracle VM VirtualBox Command Line Management Interface Version 7.0.97
Copyright (C) 2005-2024 Oracle and/or its affiliates

VBoxManage: error: Parameter --platform-architecture is required

Usage - Create a new virtual machine:

  VBoxManage createvm <--name=name> <--platform-architecture= x86 | arm>
      [--basefolder=basefolder] [--default] [--group=group-ID [,...]]
      [--ostype=ostype] [--register] [--uuid=uuid] [--cipher=cipher]
      [--password-id=password-id] [--password=file]

==> Builds finished but no artifacts were created.

from bento.

jamiejackson avatar jamiejackson commented on August 16, 2024

Actually, I forgot to try the arm ISO directly in the dev snapshot VirtualBox until now. It's still failing, so I'll go back to the forum with this issue.

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

https://github.com/chef/bento/blob/main/packer_templates/pkr-variables.pkr.hcl#L169 this is the variable you'd want to add to os_pkrvars/ubuntu/ubuntu-22.04-aarch64.pkrvars.hcl file. You'd want to copy the existing default value and then add the flag for architecture.

from bento.

Stromweld avatar Stromweld commented on August 16, 2024

if that works than it'd be a quick fix for me to be able to add a local variable that would be default add that architecture flag based on the template arch.

from bento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.