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

vagrant ssh command not work #22

Closed Fashaun closed 1 year ago

Fashaun commented 1 year ago

Hi,

Did you test with vagrant ssh command ?

image
ppggff commented 1 year ago

yes, vagrant ssh works

brandonros commented 1 year ago

I got it to work with

Vagrant.configure("2") do |config|
  config.vm.box = "generic/alpine316"
  config.vm.provider "qemu" do |qe|
    qe.arch = "x86_64"
    qe.machine = "q35"
    qe.cpu = "max"
    qe.net_device = "virtio-net-pci"
  end
end

but not

Vagrant.configure('2') do |config|
  config.vm.define "vm" do |config|
    config.vm.synced_folder '.', '/vagrant', disabled: true
    config.vm.box = "debian/bullseye64"
    config.vm.provider "qemu" do |qe|
      qe.arch = "x86_64"
      qe.machine = "q35"
      qe.cpu = "max"
      qe.net_device = "virtio-net-pci"
    end
  end
end

does it depend on the box? any way to make it work for Debian and not Alpine only?

brandonros commented 1 year ago

https://github.com/ppggff/vagrant-qemu/issues/5#issuecomment-1118158687 probably related to this

Notes, you also need add config.vm.synced_folder ".", "/vagrant", type: "smb", smb_host: "10.0.2.2" to the Vagrantfile due to a know issue.