Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alternate Vagrant providers #5

Open
ideologysec opened this issue May 4, 2020 · 2 comments
Open

Support alternate Vagrant providers #5

ideologysec opened this issue May 4, 2020 · 2 comments

Comments

@ideologysec
Copy link

Please add support in the Vagrantfile for the vmware_fusion and/or vmware_desktop providers - they can do USB passthrough as well or better than VirtualBox, are generally more performant, and in many cases are already installed.

For example, I can't install a new hypervisor on my corp laptop without IT approval, but VMware and the Vagrant plugin are already installed and ready to be used, this box just doesn't work with them.

@ideologysec
Copy link
Author

ideologysec commented May 4, 2020

here's a first pass that works pretty well (please note, the base box is different; not sure how much that matters or not). I'm using Fusion 11.5, Vagrant 2.2.7, and the latest vagrant-vmware plugin. WiFi Explorer Pro automatically detects the Alfa/Ralink wireless adapter, and scans work!

(my next pass would be to switch to alpine, which is even lighter weight, but that requires a bit more work)

Vagrant.configure(2) do |config|
  config.vm.box = "bento/debian-10.2"
  if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.auto_update = false
  end
  config.vm.provider "vmware_desktop" do |vmware|
    # I think GUI needs to be present for hotplugging to work
    vmware.gui = true
    vmware.vmx["memsize"] = "256"
    vmware.vmx["numvcpus"] = "1"
    vmware.vmx["guestos"] = "debian10-64"
    vmware.vmx["usb.present"] = "TRUE"
    vmware.vmx["ehci.present"] = "TRUE"
    vmware.vmx["usb_xhci.present"] = "TRUE"
    vmware.vmx["ide0:0.clientdevice"] = "FALSE"
    vmware.vmx["ide0:0.devicetype"] = "cdrom-raw"
    vmware.vmx["ide0:0.filename"] = "auto detect"
  end
  config.vm.provider "virtualbox" do |vb|
    vb.name = "EASE"
    vb.memory = "256"
    vb.cpus = "1"
    vb.default_nic_type = "virtio"
    vb.customize ["modifyvm", :id, "--usb", "on"]
    vb.customize ["modifyvm", :id, "--usbxhci", "on"]
  end
  config.vm.provision :file, source: "ease.py", destination: "ease.py"
  config.vm.provision :file, source: "ease", destination: "ease"
  config.vm.provision :shell, path: "bootstrap.sh"
  config.vm.network "forwarded_port", guest: 5000, host: 5000
  for i in 26700..26710
    config.vm.network "forwarded_port", guest: i, host: i
  end
  config.vm.post_up_message = "External Adapter Support Environment (EASE)"
end

@adriangranados
Copy link
Collaborator

Nice. I'll look into it. When I first wrote EASE, VirtualBox was the only provider available on Mac. I also remember trying Alpine but I got into so many issues trying to compile the wireless drivers that I gave up. Maybe it's time for a new attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants