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

The QEMU provider doesn't support any of the Vagrant high-level network configurations (config.vm.network).' #41

Open ghost opened 1 year ago

ghost commented 1 year ago

Good day everyone,

Have faced an issue 'The QEMU provider doesn't support any of the Vagrant high-level network configurations (config.vm.network).':

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

Vagrant.configure("2") do |config|
  config.vm.box = "perk/ubuntu-2204-arm64"
  config.vm.network "forwarded_port", guest: 8080, host: 65080

  config.vm.provider "qemu" do |vb|
    vb.gui = "false"
    vb.memory = "1024"
  end
end
❯ vagrant up    
Bringing machine 'default' up with 'qemu' provider...
==> default: Checking if box 'perk/ubuntu-2204-arm64' version '20230416' is up to date...
==> default: Importing a QEMU instance
    default: Creating and registering the VM...
    default: Successfully imported VM
==> 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...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:50022
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!

Installed vagrant and plugin by running:

brew install qemu
brew install hashicorp/tap/hashicorp-vagrant
vagrant plugin install vagrant-qemu

vagrant ssh works fine

No libvirt virtualbox installed

CPU: Apple M1 OS: Ventura 13.3.1 QEMU 8.0.0, Vagrant 2.3.4, vagrant-qemu (0.3.4, global)

Could you please help to investigate

ppggff commented 1 year ago

see #40 for details

darkn3rd commented 1 month ago

Could there be any documentation in the README.md on a workaround, even if we have to use qemu commands? The current documentation on the README indicates that something like this should work:

config.vm.network "forwarded_port", guest: 80, host: 8080