BytesGuy / arm-base-boxes

Vagrant Base Boxes for ARM Hosts (e.g., Apple Silicon / M1)
MIT License
32 stars 12 forks source link

Centos Stream 9 #6

Open grouville opened 2 years ago

grouville commented 2 years ago

Hello, I have been trying to run a Centos Stream 9 vagrant box on a Macbook pro M1, following your packer and your scripts. (I built the base VM manually, while trying to follow as much as possible your logic.

Once the VM created with the proper SSH key and the proper visudo rule, I made the tarball, as you do (also based on https://github.com/ysz/vagrant-vmware-box).

My current Vagrantfile to run this newly created box named vmware-centos9-arm64 (locally):

Vagrant.configure("2") do |config|
  config.vm.box = "vmware-centos9-arm64"
  config.vm.provider :vmware_desktop do |vmware|
    vmware.gui = true
    vmware.linked_clone = false
    vmware.cpus = 2
  end
end

I am unfortunately encountering 2 main issues, for which I didn't find any answer

  1. The GUI loads at first, but seems to get stuck
  2. I get stuck at this error: ==> default: Waiting for the VM to receive an address...

The logs are as follow:

DEBUG vmware_driver: Trying to get MAC address for ethernet0
DEBUG vmware_driver: No explicitly set MAC, looking or auto-generated one...
DEBUG vmware_driver:  -- MAC: XX:XX:XX:XX:XX:XX
 INFO vmware_driver: Reading DHCP lease for 'XX:XX:XX:XX:XX:XX' on 'vmnet8'
DEBUG vagrant_utility: request METHOD=GET PATH=/vmnet/vmnet8/dhcplease/XX:XX:XX:XX:XX:XX RESPONSE=400 ERROR=No entry found for MAC XX:XX:XX:XX:XX:XX
 INFO vmware_driver: Trying vmrun getGuestIPAddress...
 INFO subprocess: Starting process: ["/Applications/VMware Fusion.app/Contents/Library/vmrun", "getGuestIPAddress", "/Users/home/Virtual Machines.localized/vmware-centos9-arm64.vmwarevm/test/.vagrant/machines/default/vmware_desktop/a4fd56be-1a1d-4888-9687-c9764ccc1e5f/vmware-centos9-arm64.vmx"]
DEBUG subprocess: Command not in installer, not touching env vars.
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 255
 INFO vmware_driver: vmrun getGuestIPAddress failed: VMRunError

(Mac address has been changed in above example)

Whenever I manually run vmrun getGuestIPAddress on the base VM (directly run from vmware), it works, I get the corresponding IP. However, whenever I run it on the VM started with vagrant, I get above error.

Whenever I run your other arm boxes (https://app.vagrantup.com/bytesguy/boxes/ubuntu-server-22.04-arm64), it works without any issue (just need to run with the GUI, otherwise it hangs. However, with ubuntu, it works)/

Do you have the same issue ? Any idea on how to fix it ? Did you manage to start a centos stream 9 box ?

Thanks for all the work, it's really useful 😇

Versions:

BytesGuy commented 2 years ago

@grouville Sorry for the delayed response, I stopped receiving notifications from GitHub for some reason and have been very busy. I stopped working on the centos boxes due to multiple issues at the time. I don't recall this specific issue, but if you have since found a workaround feel free to submit a PR! 🙇

dbrennand commented 1 year ago

@grouville - Hey, I experienced this issue and managed to fix it. I have a working version in my fork.

The fix was to add the following in the Vagrantfile:

  config.vm.provider "vmware_desktop" do |v|
    v.vmx["ethernet0.virtualDev"] = "e1000e"
    # ...
  end
BytesGuy commented 1 year ago

@dbrennand Awesome! Would you be able to do a PR then we can merge this in? Thanks :)

dbrennand commented 1 year ago

Hi @BytesGuy - I've made quite a few changes in my fork.

Distro Version Provider
CentOS Stream 9 VMware Fusion
Ubuntu Server 22.04.2 VMware Fusion
Debian 11 VMware Fusion

Not sure how we should proceed in merging these changes in since I've changed quite a bit 😅

dbrennand commented 1 year ago

Hey @BytesGuy - Any thoughts on above? 🙂

BytesGuy commented 1 year ago

@dbrennand Hey really sorry for lack of responses on here, work has been super busy the past few months but I will be carving out some time to get this repo back on track soon! Please feel free to open a PR and I can go through the changes and thanks :)