diff --git a/lib/vagrant-parallels/action/box_register.rb b/lib/vagrant-parallels/action/box_register.rb index 16df164..73bfd08 100644 --- a/lib/vagrant-parallels/action/box_register.rb +++ b/lib/vagrant-parallels/action/box_register.rb @@ -40,6 +40,14 @@ def call(env) def box_path(env) pvm = Dir.glob(env[:machine].box.directory.join('*.pvm')).first + mac_vm_m1 = false + + if !pvm + pvm = Dir.glob(env[:machine].box.directory.join('*.macvm')).first + if pvm + mac_vm_m1 = true + end + end if !pvm raise Errors::BoxImageNotFound, name: env[:machine].box.name @@ -121,8 +129,10 @@ def register_box(env) end # Convert template to VM (compatibility with old-styled boxes) - env[:machine].provider.driver.execute_prlctl( - 'set', env[:clone_id], '--template', 'off') + # Not required for a macOS VM on M1 - not supported as a template and overall no such boxes anymore in public. Removed. # + # env[:machine].provider.driver.execute_prlctl( + # 'set', env[:clone_id], '--template', 'off') + end end end diff --git a/lib/vagrant-parallels/action/sane_defaults.rb b/lib/vagrant-parallels/action/sane_defaults.rb index 2833423..364116d 100644 --- a/lib/vagrant-parallels/action/sane_defaults.rb +++ b/lib/vagrant-parallels/action/sane_defaults.rb @@ -28,21 +28,23 @@ def call(env) def default_settings { - tools_autoupdate: 'no', - on_shutdown: 'close', - on_window_close: 'keep-running', - auto_share_camera: 'off', - smart_guard: 'off', - longer_battery_life: 'on', - shared_cloud: 'off', - shared_profile: 'off', - smart_mount: 'off', - sh_app_guest_to_host: 'off', - sh_app_host_to_guest: 'off', - startup_view: 'headless', - time_sync: 'on', - disable_timezone_sync: 'on', - shf_host_defined: 'off' + # all commented for macOS VM, need a better solution here + + # tools_autoupdate: 'no', + # on_shutdown: 'close', + # on_window_close: 'keep-running', + # auto_share_camera: 'off', + # smart_guard: 'off', + # longer_battery_life: 'on', + # shared_cloud: 'off', + # shared_profile: 'off', + # smart_mount: 'off', + # sh_app_guest_to_host: 'off', + # sh_app_host_to_guest: 'off', + # startup_view: 'headless', + # time_sync: 'on', + # disable_timezone_sync: 'on', + # shf_host_defined: 'off' } end end diff --git a/locales/en.yml b/locales/en.yml index 711fa42..e3e756d 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -16,7 +16,7 @@ en: Box VM config: "%{config}" box_image_not_found: |- - Parallels VM image (*.pvm) could not be found in the directory of + Parallels VM image (*.pvm or *.macvm) could not be found in the directory of '%{name}' box. This is usually because the image has been removed manually. Please remove the box, re-add it, and try again. dhcp_leases_file_not_accessible: |-