vmware / photon-packer-templates

VMware Photon Packer Templates
Apache License 2.0
35 stars 19 forks source link

Add support for macOS M1 and VMware Fusion Professional Version Tech Preview M1 #24

Open epic-bunny opened 2 years ago

epic-bunny commented 2 years ago

Code of Conduct

Hypervisor

VMware Fusion Professional Version Tech Preview M1

Operating System

macOS Monterrey 12.3.1 M1

HashiCorp Packer

No response

HashiCorp Packer Plugin for VMware

No response

HashiCorp Vagrant

2.2.19

HashiCorp Vagrant VMware Utility

1.0.21

HashiCorp Vagrant plugin for VMware

3.0.1

Environment Details

No response

Description

Hi guys!

I was just trying to use the box here https://app.vagrantup.com/vmware/boxes/photon v4.0.2 by running the following commands:

vagrant init vmware/photon vagrant up

Which results in the following error:

Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: <provider config: virtualbox>
Line number: 15
Message: NameError: undefined local variable or method `override' for main:Object

vagrant up --provider vmware_desktop, results in the same error.

Any help would be appreciated. Thanks!

Expected Behavior

When I execute:

vagrant init vmware/photon vagrant up

A new vagrant box with Photon OS is ready to use.

Actual Behavior

vagrant init vmware/photon vagrant up

Results in the following error:

Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: <provider config: virtualbox>
Line number: 15
Message: NameError: undefined local variable or method `override' for main:Object

Steps to Reproduce

  1. Create a folder called "photon"
  2. Execute the following commands inside this folder:

vagrant init vmware/photon vagrant up

  1. You will get the following error:
Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: <provider config: virtualbox>
Line number: 15
Message: NameError: undefined local variable or method `override' for main:Object

Log Fragments and Files

No response

Screenshots

No response

Additional Context

No response

tenthirtyam commented 2 years ago

Hi @epic-bunny, 👋

This project hasn't yet been tested on an Apple M1 chipset with the VMware Fusion TechPreview.

The upstream box does work on MacOS with Intel and Fusion 12.

❯ cd ..
❯ mkdir photon
❯ cd photon
❯ vagrant init vmware/photon
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
❯ vagrant up --provider vmware_desktop
Bringing machine 'default' up with 'vmware_desktop' provider...
==> default: Cloning VMware VM: 'vmware/photon'. This can take some time...
==> default: Checking if box 'vmware/photon' version '4.0.2' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
==> default: Waiting for the VM to receive an address...
==> default: Forwarding ports...
    default: -- 22 => 2222
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    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!
==> default: Configuring network adapters within the VM...
❯

Once I have access to an M1 device, I'd be happy to take a look into the issue.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam commented 2 years ago

I've updated the description and added the enhancement label.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam commented 2 years ago

Unfortunately, it doesn't appear I'll have access to an M1 anytime soon. If you'd like to research and submit a pull request, contributions are welcomed.

Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.