ppggff / vagrant-qemu

Use Vagrant to manage machines using QEMU. Test with Apple Silicon / M1 and CentOS aarch64 image
MIT License
408 stars 32 forks source link

QEMU provider ('default') is invalid #14

Closed bruteForceAttack closed 1 year ago

bruteForceAttack commented 1 year ago

Hi, I've tested your code and so far I've struggled with this error message after the vagrant up --provider=qemu. Result is: The box you're using with the QEMU provider ('default') is invalid.

My setup is this:

I went over the example at the beginning but the error is still the same. Even if I try to convert vmware-fusion box to qcow2 image as described here: vmware fusion box conversion. Basically it happens with any box with qemu provider. Any clue what I do wrong ?

ppggff commented 1 year ago

Please provide the detail log?

vagrant up --provider qemu --debug
bruteForceAttack commented 1 year ago

Sure thing:

Logs..

```ruby vagrant up --provider qemu --debug 10:01:35 INFO global: Vagrant version: 2.3.0 INFO global: Ruby version: 2.7.6 INFO global: RubyGems version: 3.1.6 INFO global: VAGRANT_DEFAULT_PROVIDER="qemu" INFO global: VAGRANT_INSTALLER_VERSION="2" INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/bin/vagrant" INFO global: VAGRANT_INSTALLER_ENV="1" INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded" INFO global: VAGRANT_LOG="debug" WARN global: resolv replacement has not been enabled! DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/synced_folders/nfs/plugin.rb INFO manager: Registered plugin: NFS synced folders DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/synced_folders/rsync/plugin.rb INFO manager: Registered plugin: RSync synced folders DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/synced_folders/smb/plugin.rb INFO manager: Registered plugin: SMB synced folders DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/kernel_v2/plugin.rb INFO manager: Registered plugin: kernel DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/pushes/ftp/plugin.rb INFO manager: Registered plugin: ftp DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/pushes/noop/plugin.rb INFO manager: Registered plugin: noop DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/pushes/heroku/plugin.rb INFO manager: Registered plugin: heroku DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/pushes/local-exec/plugin.rb INFO manager: Registered plugin: local-exec DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/pushes/atlas/plugin.rb INFO manager: Registered plugin: atlas DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/docker/plugin.rb INFO manager: Registered plugin: docker-provider DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/hyperv/plugin.rb INFO manager: Registered plugin: Hyper-V provider DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/plugin.rb INFO manager: Registered plugin: VirtualBox provider DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/kernel_v1/plugin.rb INFO manager: Registered plugin: kernel DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/podman/plugin.rb INFO manager: Registered plugin: podman DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/docker/plugin.rb INFO manager: Registered plugin: docker DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/file/plugin.rb INFO manager: Registered plugin: file DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/shell/plugin.rb INFO manager: Registered plugin: shell DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/chef/plugin.rb INFO manager: Registered plugin: chef DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/ansible/plugin.rb INFO manager: Registered plugin: ansible DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/container/plugin.rb INFO manager: Registered plugin: container DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/salt/plugin.rb INFO manager: Registered plugin: salt DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/cfengine/plugin.rb INFO manager: Registered plugin: CFEngine Provisioner DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/provisioners/puppet/plugin.rb INFO manager: Registered plugin: puppet DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/provision/plugin.rb INFO manager: Registered plugin: provision command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/destroy/plugin.rb INFO manager: Registered plugin: destroy command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/init/plugin.rb INFO manager: Registered plugin: init command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/snapshot/plugin.rb INFO manager: Registered plugin: snapshot command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/validate/plugin.rb INFO manager: Registered plugin: validate command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/box/plugin.rb INFO manager: Registered plugin: box command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/autocomplete/plugin.rb INFO manager: Registered plugin: autocomplete command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/winrm/plugin.rb INFO manager: Registered plugin: winrm command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/resume/plugin.rb INFO manager: Registered plugin: resume command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/suspend/plugin.rb INFO manager: Registered plugin: suspend command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/plugin/plugin.rb INFO manager: Registered plugin: plugin command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/halt/plugin.rb INFO manager: Registered plugin: halt command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/provider/plugin.rb INFO manager: Registered plugin: provider command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/rdp/plugin.rb INFO manager: Registered plugin: rdp command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/status/plugin.rb INFO manager: Registered plugin: status command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/ssh_config/plugin.rb INFO manager: Registered plugin: ssh-config command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/winrm_config/plugin.rb INFO manager: Registered plugin: winrm-config command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/reload/plugin.rb INFO manager: Registered plugin: reload command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/powershell/plugin.rb INFO manager: Registered plugin: powershell command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/cap/plugin.rb INFO manager: Registered plugin: cap command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/push/plugin.rb INFO manager: Registered plugin: push command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/list-commands/plugin.rb INFO manager: Registered plugin: list-commands command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/ssh/plugin.rb INFO manager: Registered plugin: ssh command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/version/plugin.rb INFO manager: Registered plugin: version command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/up/plugin.rb INFO manager: Registered plugin: up command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/cloud/plugin.rb INFO manager: Registered plugin: vagrant-cloud DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/global-status/plugin.rb INFO manager: Registered plugin: global-status command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/serve/plugin.rb INFO manager: Registered plugin: start Vagrant server DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/port/plugin.rb INFO manager: Registered plugin: port command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/login/plugin.rb INFO manager: Registered plugin: vagrant-login DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/package/plugin.rb INFO manager: Registered plugin: package command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/help/plugin.rb INFO manager: Registered plugin: help command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/commands/upload/plugin.rb INFO manager: Registered plugin: upload command DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/slackware/plugin.rb INFO manager: Registered plugin: Slackware host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/bsd/plugin.rb INFO manager: Registered plugin: BSD host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/freebsd/plugin.rb INFO manager: Registered plugin: FreeBSD host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/null/plugin.rb INFO manager: Registered plugin: null host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/void/plugin.rb INFO manager: Registered plugin: Void host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/linux/plugin.rb INFO manager: Registered plugin: Linux host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/arch/plugin.rb INFO manager: Registered plugin: Arch host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/darwin/plugin.rb INFO manager: Registered plugin: Mac OS X host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/windows/plugin.rb INFO manager: Registered plugin: Windows host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/redhat/plugin.rb INFO manager: Registered plugin: Red Hat Enterprise Linux host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/gentoo/plugin.rb INFO manager: Registered plugin: Gentoo host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/suse/plugin.rb INFO manager: Registered plugin: SUSE host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/alt/plugin.rb INFO manager: Registered plugin: ALT Platform host DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/communicators/winrm/plugin.rb INFO manager: Registered plugin: winrm communicator DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/communicators/winssh/plugin.rb INFO manager: Registered plugin: windows ssh communicator DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/communicators/ssh/plugin.rb INFO manager: Registered plugin: ssh communicator DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/alpine/plugin.rb INFO manager: Registered plugin: Alpine guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/solaris11/plugin.rb INFO manager: Registered plugin: Solaris 11 guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/dragonflybsd/plugin.rb INFO manager: Registered plugin: DragonFly BSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/pld/plugin.rb INFO manager: Registered plugin: PLD Linux guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/amazon/plugin.rb INFO manager: Registered plugin: Amazon Linux guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/mint/plugin.rb INFO manager: Registered plugin: Mint guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/debian/plugin.rb INFO manager: Registered plugin: Debian guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/rocky/plugin.rb INFO manager: Registered plugin: Rocky guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/slackware/plugin.rb INFO manager: Registered plugin: Slackware guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/centos/plugin.rb INFO manager: Registered plugin: CentOS guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/esxi/plugin.rb INFO manager: Registered plugin: ESXi guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/netbsd/plugin.rb INFO manager: Registered plugin: NetBSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/omnios/plugin.rb INFO manager: Registered plugin: OmniOS guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/alma/plugin.rb INFO manager: Registered plugin: Alma guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/bsd/plugin.rb INFO manager: Registered plugin: BSD-based guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/haiku/plugin.rb INFO manager: Registered plugin: Haiku guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/fedora/plugin.rb INFO manager: Registered plugin: Fedora guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/tinycore/plugin.rb INFO manager: Registered plugin: TinyCore Linux guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/atomic/plugin.rb INFO manager: Registered plugin: Atomic Host guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/freebsd/plugin.rb INFO manager: Registered plugin: FreeBSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/trisquel/plugin.rb INFO manager: Registered plugin: Trisquel guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/smartos/plugin.rb INFO manager: Registered plugin: SmartOS guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/kali/plugin.rb INFO manager: Registered plugin: Kali guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/linux/plugin.rb INFO manager: Registered plugin: Linux guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/arch/plugin.rb INFO manager: Registered plugin: Arch guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/openbsd/plugin.rb INFO manager: Registered plugin: OpenBSD guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/openwrt/plugin.rb INFO manager: Registered plugin: OpenWrt guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/nixos/plugin.rb INFO manager: Registered plugin: NixOS guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/photon/plugin.rb INFO manager: Registered plugin: VMware Photon guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/darwin/plugin.rb INFO manager: Registered plugin: Darwin guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/funtoo/plugin.rb INFO manager: Registered plugin: Funtoo guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/windows/plugin.rb INFO manager: Registered plugin: Windows guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/redhat/plugin.rb INFO manager: Registered plugin: Red Hat Enterprise Linux guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/solaris/plugin.rb INFO manager: Registered plugin: Solaris guest. DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/elementary/plugin.rb INFO manager: Registered plugin: Elementary guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/gentoo/plugin.rb INFO manager: Registered plugin: Gentoo guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/suse/plugin.rb INFO manager: Registered plugin: SUSE guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/coreos/plugin.rb INFO manager: Registered plugin: CoreOS guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/ubuntu/plugin.rb INFO manager: Registered plugin: Ubuntu guest DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/guests/alt/plugin.rb INFO manager: Registered plugin: ALT Platform guest INFO vagrant: `vagrant` invoked: ["up", "--provider", "qemu", "--debug"] DEBUG vagrant: Creating Vagrant environment INFO environment: Environment initialized (#) INFO environment: - cwd: /Users/dummy/Downloads/QEMU INFO environment: Home path: /Users/dummy/.vagrant.d DEBUG environment: Effective local data path: /Users/dummy/Downloads/QEMU/.vagrant INFO environment: Local data path: /Users/dummy/Downloads/QEMU/.vagrant DEBUG environment: Creating: /Users/dummy/Downloads/QEMU/.vagrant DEBUG manager: Enabling localized plugins INFO manager: Plugins: DEBUG solution_file: new solution file instance plugin_file=/Users/dummy/Downloads/QEMU/.vagrant/plugins.json solution_file=/Users/dummy/Downloads/QEMU/.vagrant/bundler/local.sol DEBUG solution_file: missing file so skipping loading DEBUG bundler: solution file in use for init: DEBUG bundler: Generating new builtin set instance. DEBUG bundler: Generating new plugin set instance. Skip gems - [] DEBUG bundler: generating solution set for configured plugins DEBUG bundler: Current generated plugin dependency list: [] DEBUG bundler: resolving solution from available specification set DEBUG bundler: solution set for configured plugins has been resolved DEBUG bundler: activating solution set DEBUG bundler: Activating solution set: [] DEBUG solution_file: plugin file does not exist, not storing solution DEBUG bundler: solution set stored to - INFO manager: Loading plugins... DEBUG manager: Enabling globalized plugins INFO manager: Plugins: INFO manager: - vagrant-qemu = [installed: 0.1.9 constraint: > 0] INFO manager: - vagrant-vmware-desktop = [installed: 3.0.1 constraint: > 0] DEBUG solution_file: new solution file instance plugin_file=/Users/dummy/.vagrant.d/plugins.json solution_file=/Users/dummy/Downloads/QEMU/.vagrant/bundler/global.sol DEBUG solution_file: reading solution file - /Users/dummy/Downloads/QEMU/.vagrant/bundler/global.sol DEBUG solution_file: solution validation check CHECKSUM b7454202f1849f3efdb135313dbe6741ebbaeaab1abc576a58c9418ff8a1b241 <-> b7454202f1849f3efdb135313dbe6741ebbaeaab1abc576a58c9418ff8a1b241 VERSION 2.3.0 <-> 2.3.0 DEBUG solution_file: loading solution dependency list DEBUG solution_file: solution dependency list: [#, @requester=nil>, #, @requester=nil>] DEBUG bundler: solution file in use for init: DEBUG bundler: Generating new builtin set instance. DEBUG bundler: Generating new plugin set instance. Skip gems - [] DEBUG bundler: loading cached solution set DEBUG bundler: activating solution set DEBUG bundler: Activating solution set: ["vagrant-qemu-0.1.9", "vagrant-vmware-desktop-3.0.1"] DEBUG bundler: Activating gem vagrant-qemu-0.1.9 DEBUG bundler: Activating gem vagrant-vmware-desktop-3.0.1 INFO manager: Loading plugins... INFO manager: Loading plugin `vagrant-qemu` with default require: `vagrant-qemu` INFO manager: Registered plugin: QEMU DEBUG manager: Successfully loaded plugin `vagrant-qemu`. INFO manager: Loading plugin `vagrant-vmware-desktop` with default require: `vagrant-vmware-desktop` INFO manager: Registered plugin: VMware Fusion Provider DEBUG manager: Successfully loaded plugin `vagrant-vmware-desktop`. INFO loader: Set :root = ["#"] DEBUG loader: Populating proc cache for # DEBUG loader: Load procs for pathname: /Users/dummy/Downloads/QEMU/Vagrantfile INFO loader: Loading configuration in order: [:home, :root] DEBUG loader: Loading from: root (evaluating) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password INFO loader: Set "65160_machine_default" = [] INFO loader: Loading configuration in order: [:home, :root, "65160_machine_default"] DEBUG loader: Loading from: root (cache) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password INFO loader: Set :"65160_vm_default__qemu" = ["[\"2\", #]"] DEBUG loader: Populating proc cache for ["2", #] INFO loader: Loading configuration in order: [:home, :root, "65160_machine_default", :"65160_vm_default__qemu"] DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 65160_vm_default__qemu (evaluating) DEBUG dummy_config: found name image_path= DEBUG dummy_config: setting instance variable name image_path DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password WARN vagrantfile: Failed to locate with version WARN vagrantfile: Performing lookup with initial values with version INFO loader: Set :"65160_vm_default__qemu" = ["[\"2\", #]"] INFO loader: Loading configuration in order: [:home, :root, "65160_machine_default", :"65160_vm_default__qemu"] DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 65160_vm_default__qemu (cache) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password INFO environment: Running hook: environment_plugins_loaded INFO runner: Running action: environment_plugins_loaded # INFO environment: Running hook: environment_load INFO runner: Running action: environment_load # INFO warden: Calling IN action: # DEBUG checkpoint_client: starting plugin check DEBUG checkpoint_client: starting utility check INFO warden: Calling OUT action: # DEBUG checkpoint_client: starting plugin check INFO cli: CLI: [] "up" ["--provider", "qemu"] DEBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command ["--provider", "qemu"] DEBUG checkpoint_client: waiting for checkpoint to complete... INFO vmware_driver: VMX file: DEBUG vagrant_utility: initialize HOST=127.0.0.1 PORT=9922 DEBUG checkpoint_client: utility communication error - Vagrant encountered an unexpected communications error with the Vagrant VMware Utility driver. Please try to run the command again. If this error persists, please contact support@hashicorp.com DEBUG checkpoint_client: plugin check complete DEBUG checkpoint_client: plugin check complete DEBUG checkpoint_client: vagrant is currently up to date DEBUG checkpoint_client: no alert notifications to display DEBUG command: 'Up' each target VM... DEBUG command: Getting target VMs for command. Arguments: DEBUG command: -- names: ["default"] DEBUG command: -- options: {:provider=>"qemu"} DEBUG command: Finding machine that match name: default INFO environment: Getting machine: default (qemu) INFO environment: Uncached load of machine. INFO loader: Set "65160_machine_default" = [] INFO loader: Loading configuration in order: [:home, :root, "65160_machine_default"] WARN loader: Unknown config sources: [:"65160_vm_default__qemu"] DEBUG loader: Loading from: root (cache) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password INFO loader: Set :"65160_vm_default__qemu" = ["[\"2\", #]"] INFO loader: Loading configuration in order: [:home, :root, "65160_machine_default", :"65160_vm_default__qemu"] DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 65160_vm_default__qemu (cache) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password WARN vagrantfile: Failed to locate with version WARN vagrantfile: Performing lookup with initial values with version INFO loader: Set :"65160_vm_default__qemu" = ["[\"2\", #]"] INFO loader: Loading configuration in order: [:home, :root, "65160_machine_default", :"65160_vm_default__qemu"] DEBUG loader: Loading from: root (cache) DEBUG loader: Loading from: 65160_vm_default__qemu (cache) DEBUG loader: Configuration loaded successfully, finalizing and returning DEBUG push: finalizing INFO vmconfig: config class lookup for provider :qemu gave us base class: VagrantPlugins::QEMU::Config DEBUG dummy_config: found name username= DEBUG dummy_config: setting instance variable name username DEBUG dummy_config: found name password= DEBUG dummy_config: setting instance variable name password INFO vmconfig: looking up provider config for: :qemu INFO vmconfig: provider config value that was stored: #> INFO machine: Initializing machine: default INFO machine: - Provider: VagrantPlugins::QEMU::Provider INFO machine: - Box: INFO machine: - Data dir: /Users/dummy/Downloads/QEMU/.vagrant/machines/default/qemu INFO machine: New machine ID: nil INFO interface: Machine: metadata ["provider", :qemu, {:target=>:default}] INFO command: With machine: default (#, @driver=#, @tmp_dir=#>, @cap_logger=#>, @out=#>>], @additive=true, @name="vagrant", @path="", @parent=#, @level=2, @trace=false>, @level=2, @trace=false>, @cap_host_chain=[[:qemu, #<#:0x00007ff0abfed2a8>]], @cap_args=[#], @cap_caps={:docker=>##, :proxy_machine=>#, :has_communicator=>#}, @results_cache={}>, :hyperv=>##, :snapshot_list=>#, :configure_disks=>#, :cleanup_disks=>#, :validate_disk_ext=>#, :default_disk_exts=>#, :set_default_disk_ext=>#}, @results_cache={}>, :virtualbox=>##, :nic_mac_addresses=>#, :public_address=>#, :configure_disks=>#, :cleanup_disks=>#, :validate_disk_ext=>#, :default_disk_exts=>#, :set_default_disk_ext=>#, :snapshot_list=>#}, @results_cache={}>, :vmware_desktop=>##, :delete_all_snapshots=>#, :delete_snapshot=>#, :forwarded_ports=>#, :public_address=>#, :nic_mac_addresses=>#, :scrub_forwarded_ports=>#}, @results_cache={}>, :vmware_fusion=>##, :delete_all_snapshots=>#, :delete_snapshot=>#, :forwarded_ports=>#, :public_address=>#, :nic_mac_addresses=>#, :scrub_forwarded_ports=>#}, @results_cache={}>}>) DEBUG command: Getting target VMs for command. Arguments: DEBUG command: -- names: ["default"] DEBUG command: -- options: {:provider=>"qemu"} DEBUG command: Finding machine that match name: default INFO environment: Getting machine: default (qemu) INFO environment: Returning cached machine: default (qemu) INFO command: With machine: default (#, @driver=#, @tmp_dir=#>, @cap_logger=#>, @out=#>>], @additive=true, @name="vagrant", @path="", @parent=#, @level=2, @trace=false>, @level=2, @trace=false>, @cap_host_chain=[[:qemu, #<#:0x00007ff0abfed2a8>]], @cap_args=[#], @cap_caps={:docker=>##, :proxy_machine=>#, :has_communicator=>#}, @results_cache={}>, :hyperv=>##, :snapshot_list=>#, :configure_disks=>#, :cleanup_disks=>#, :validate_disk_ext=>#, :default_disk_exts=>#, :set_default_disk_ext=>#}, @results_cache={}>, :virtualbox=>##, :nic_mac_addresses=>#, :public_address=>#, :configure_disks=>#, :cleanup_disks=>#, :validate_disk_ext=>#, :default_disk_exts=>#, :set_default_disk_ext=>#, :snapshot_list=>#}, @results_cache={}>, :vmware_desktop=>##, :delete_all_snapshots=>#, :delete_snapshot=>#, :forwarded_ports=>#, :public_address=>#, :nic_mac_addresses=>#, :scrub_forwarded_ports=>#}, @results_cache={}>, :vmware_fusion=>##, :delete_all_snapshots=>#, :delete_snapshot=>#, :forwarded_ports=>#, :public_address=>#, :nic_mac_addresses=>#, :scrub_forwarded_ports=>#}, @results_cache={}>}>) INFO interface: info: Bringing machine 'default' up with 'qemu' provider... Bringing machine 'default' up with 'qemu' provider... INFO batch_action: Enabling parallelization by default. INFO batch_action: Disabling parallelization because only executing one action INFO batch_action: Batch action will parallelize: false INFO batch_action: Starting action: # up {:destroy_on_error=>true, :install_provider=>false, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"qemu"} INFO machine: Calling action: up on provider QEMU (new) DEBUG environment: Attempting to acquire process-lock: machine-action-0129f1940806734ae1887877489a2660 DEBUG environment: Attempting to acquire process-lock: dotlock INFO environment: Acquired process lock: dotlock INFO environment: Released process lock: dotlock INFO environment: Acquired process lock: machine-action-0129f1940806734ae1887877489a2660 INFO interface: Machine: action ["up", "start", {:target=>:default}] INFO host: Autodetecting host type for [#] DEBUG host: Trying: slackware DEBUG host: Trying: freebsd DEBUG host: Trying: void DEBUG host: Trying: arch DEBUG host: Trying: darwin INFO host: Detected: darwin! INFO runner: Running action: machine_action_up # INFO warden: Calling IN action: # INFO handle_box: Skipping HandleBox because no box is set INFO warden: Calling IN action: # DEBUG host: Searching for cap: smb_installed DEBUG host: Checking in: darwin DEBUG host: Found cap: smb_installed in darwin DEBUG host: Searching for cap: smb_installed DEBUG host: Checking in: darwin DEBUG host: Found cap: smb_installed in darwin INFO host: Execute capability: smb_installed [#] (darwin) DEBUG host: Searching for cap: smb_installed DEBUG host: Checking in: darwin DEBUG host: Found cap: smb_installed in darwin DEBUG host: Searching for cap: smb_installed DEBUG host: Checking in: darwin DEBUG host: Found cap: smb_installed in darwin INFO host: Execute capability: smb_installed [#] (darwin) DEBUG syncedfolder: Searching for cap: default_fstab_modification DEBUG syncedfolder: Checking in: smb DEBUG syncedfolder: Found cap: default_fstab_modification in smb DEBUG syncedfolder: Searching for cap: default_fstab_modification DEBUG syncedfolder: Checking in: smb DEBUG syncedfolder: Found cap: default_fstab_modification in smb INFO syncedfolder: Execute capability: default_fstab_modification [#] (smb) INFO warden: Calling IN action: # WARN box_check_outdated: Not checking for update, no box INFO warden: Calling IN action: # INFO runner: Running action: machine_action_up # INFO warden: Calling IN action: # DEBUG is_state: Checking if machine state is 'not_created' DEBUG is_state: -- Machine state: not_created INFO warden: Calling OUT action: # INFO runner: Running action: machine_action_up # INFO warden: Calling IN action: # INFO warden: Calling IN action: # INFO import: Found box image path: /Users/dummy/.vagrant.d/boxes/bytesguy-VAGRANTSLASH-ubuntu-server-20.04-arm64/1.0.0/vmware_fusion/box.qcow2 ERROR import: Invalid qemu dir: /opt/homebrew/share/qemu ERROR warden: Error occurred: The box you're using with the QEMU provider ('default') is invalid. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The box you're using with the QEMU provider ('default') is invalid. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The box you're using with the QEMU provider ('default') is invalid. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-0129f1940806734ae1887877489a2660 INFO environment: Running hook: environment_unload INFO runner: Running action: environment_unload # ERROR vagrant: Vagrant experienced an error! Details: ERROR vagrant: # ERROR vagrant: The box you're using with the QEMU provider ('default') is invalid. ERROR vagrant: /Users/dummy/.vagrant.d/gems/2.7.6/gems/vagrant-qemu-0.1.9/lib/vagrant-qemu/action/import.rb:32:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/call.rb:53:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/box_check_outdated.rb:31:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/handle_box.rb:25:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:248:in `action_raw' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:217:in `block in action' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:631:in `lock' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:203:in `call' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:203:in `action' /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run' INFO interface: error: The box you're using with the QEMU provider ('default') is invalid. The box you're using with the QEMU provider ('default') is invalid. INFO interface: Machine: error-exit ["VagrantPlugins::QEMU::Errors::BoxInvalid", "The box you're using with the QEMU provider ('default')\nis invalid."] ```

ppggff commented 1 year ago

The root cause is "Invalid qemu dir: /opt/homebrew/share/qemu".

You can find the correct one by

echo `brew --prefix`/share/qemu

It's /usr/local/share/qemu on my Mac, then you can set it in the Vagrantfile:

config.vm.provider "qemu" do |qe|
  qe.qemu_dir = "/usr/local/share/qemu"
end

Sorry for the inaccurate error message...

ppggff commented 1 year ago

The qemu dir is used to find edk2-aarch64-code.fd and edk2-arm-vars.fd as firmware.

If echo `brew --prefix`/share/qemu still not the correct one, you can find it by:

find -L `brew --prefix qemu` -name edk2-aarch64-code.fd

It's /usr/local/opt/qemu/share/qemu/edk2-aarch64-code.fd on my Mac, then you can set qemu_dir with /usr/local/opt/qemu/share/qemu/.

Notes: the /usr/local/opt/qemu/share/qemu/ and /usr/local/share/qemu is all point to the same dir by symbolic link.

bruteForceAttack commented 1 year ago

Hi, thank you, good point. Now I got another err:

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ppggff/centos-7-aarch64-2009-4K"
  config.vm.provider "qemu" do |qe|
    qe.qemu_dir = "/usr/local/share/qemu"
  end
end

And output from vagrant up --provider=qemu

    Bringing machine 'default' up with 'qemu' provider...
==> default: Checking if box 'ppggff/centos-7-aarch64-2009-4K' version '1.0.0' is up to date...
==> default: Preparing SMB shared folders...
    default: You will be asked for the username and password to use for the SMB
    default: folders shortly. Please use the proper username/password of your
    default: account.
    default:
    default: Username (user[@domain]): vagrant
    default: Password (will be hidden):
==> default: Warning! The QEMU provider doesn't support any of the Vagrant
==> default: high-level network configurations (`config.vm.network`). They
==> default: will be silently ignored.
==> default: Starting the instance...
A command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.

Command: ["qemu-system-aarch64", "-machine", "virt,accel=hvf,highmem=on", "-cpu", "host", "-smp", "2", "-m", "4G", "-device", "virtio-net-device,netdev=net0", "-netdev", "user,id=net0,hostfwd=tcp::50022-:22", "-drive", "if=virtio,format=qcow2,file=/Users/dummy/Downloads/QEMU/.*****/machines/default/qemu/pkxETzEflIk/linked-box.img", "-drive", "if=pflash,format=raw,file=/Users/dummy/Downloads/QEMU/.*****/machines/default/qemu/pkxETzEflIk/edk2-aarch64-code.fd,readonly=on", "-drive", "if=pflash,format=raw,file=/Users/dummy/Downloads/QEMU/.*****/machines/default/qemu/pkxETzEflIk/edk2-arm-vars.fd", "-chardev", "socket,id=mon0,path=/Users/dummy/.*****.d/tmp/*****-qemu/pkxETzEflIk/qemu_socket,server=on,wait=off", "-mon", "chardev=mon0,mode=readline", "-chardev", "socket,id=ser0,path=/Users/dummy/.*****.d/tmp/*****-qemu/pkxETzEflIk/qemu_socket_serial,server=on,wait=off", "-serial", "chardev:ser0", "-pidfile", "/Users/dummy/Downloads/QEMU/.*****/machines/default/qemu/pkxETzEflIk/qemu.pid", "-parallel", "null", "-monitor", "none", "-display", "none", "-vga", "none", "-daemonize", {:notify=>[:stdout, :stderr, :stdin]}]

Stderr: qemu-system-aarch64: invalid accelerator hvf

Stdout:

I did install qemu via brew but seems it's missing some capability called hvf. Does it work you ? How did you install qemu? Also image ppggff/centos-7-aarch64-2009-4K says it supports libvirt as the only provider..

ppggff commented 1 year ago

Are you working on a arm64 platform? or x86_64? You want to run a arm64 box on x86_64?

bruteForceAttack commented 1 year ago

I am on arm64 and want to run arm64 box. As I understood I can't do x86_64 on arm64 with any provider, correct?

ppggff commented 1 year ago

Please provide more information?

uname -a

qemu-system-aarch64 --accel help

ls -l `which qemu-system-aarch64`

file `which qemu-system-aarch64`

brew --version

brew info qemu

And qemu can simulate x86_64 on arm64, with some performance loss.

bruteForceAttack commented 1 year ago

uname -a Darwin dummy 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 x86_64 i386 Darwin

qemu-system-aarch64 --accel help Accelerators supported in QEMU binary: tcg

ls -l which qemu-system-aarch64 lrwxr-xr-x 1 dummy admin 46 Aug 3 13:21 /usr/local/bin/qemu-system-aarch64 -> ../Cellar/qemu/7.0.0_2/bin/qemu-system-aarch64

file which qemu-system-aarch64 /usr/local/bin/qemu-system-aarch64: Mach-O 64-bit executable x86_64

brew --version

Homebrew 3.5.10
Homebrew/homebrew-core (git revision aebbb408f51; last commit 2022-08-23)
Homebrew/homebrew-cask (git revision 9505315020; last commit 2022-08-23)

brew info qemu

qemu: stable 7.0.0 (bottled), HEAD
Emulator for x86 and PowerPC
https://www.qemu.org/
/usr/local/Cellar/qemu/7.0.0_2 (162 files, 612MB) *
  Poured from bottle on 2022-08-03 at 13:20:56
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/qemu.rb
License: GPL-2.0-only
==> Dependencies
Build: libtool ✔, meson ✘, ninja ✘, pkg-config ✔
Required: glib ✔, gnutls ✔, jpeg-turbo ✔, libpng ✔, libslirp ✔, libssh ✔, libusb ✔, lzo ✔, ncurses ✔, nettle ✔, pixman ✔, snappy ✔, vde ✔, zstd ✔
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 74,865 (30 days), 202,298 (90 days), 546,617 (365 days)
install-on-request: 48,862 (30 days), 128,230 (90 days), 344,430 (365 days)
build-error: 281 (30 days)

I think there has to be some x86_ vs arm battle in brew ..

ppggff commented 1 year ago

I think your are using the x86_64 version of shell, brew, qemu by rosetta.

You could:

  1. run the shell in arm64 mode, the command arch should return arm64. I don't have a m1 mac now, may be this article may help
  2. then install brew, make sure newly installed brew shows before the old one in the $PATH, as here
  3. then install qemu; and check file `which qemu-system-aarch64`, it should be a arm64 file, check qemu-system-aarch64 --accel help again, it should include hvf
  4. becaues the arm64 version of brew will install everything at /opt/homebrew, then you should drop the qemu_dir setting in the Vagrantfile
bruteForceAttack commented 1 year ago

I think we're getting somewhere. So I've moved to the arch, arm-based brew (including all packages) so basically now I got rid of the original err. In the project description you write that networking is a TODO, right ? I've noticed a warning during the vagrant job:

Warning! The QEMU provider doesn't support any of the Vagrant
==> default: high-level network configurations (`config.vm.network`). They
==> default: will be silently ignored.

However a box based on x86_64 can be booted even sshed into but networking from the box is now broken - e.g. ping google.com results in:

[vagrant@localhost ~]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=0 ttl=255 time=4872180066333296 ms
wrong data byte #16 should be 0x10 but was 0x8
#16 8 d5 0 1 d 12 5 63 0 0 0 0 44 b2 c 0 0 0 0 0 10 11 12 13 14 15 16 17 18 19 1a 1b
#48 1c 1d 1e 1f 20 21 22 23

Also since you've mentioned that box format is the same as vagrant-libvirt version-1 -- does this mean you can use basically all the boxes configured with libvirt as provider?

ppggff commented 1 year ago

High level network is not supported, but a NAT based simple network with port forward is supported and working.

In general, ICMP traffic does not work (so you cannot use ping within a guest), but you can try wget or curl instead.

ppggff commented 1 year ago

I will close this issue since the initial problem has been solved. Feel free the open another one for new problems : )