Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github

LinkedIn

Triple-boot to run Windows and Ubuntu and other Linux on a Mac: Vagrant, BootCamp, VMWare Fusion, etc.

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

Apple no longer provides updates to hardware with Intel x86 chips (such as my Quad-Core Intel Core i7) beyond their Ventura 13.6.1 macOS release. My Early 2013 MacBook Pro is forever stuck at macOS 10.13.6 High Sierra.

So a great use for hardware “obsoleted” by Apple is to convert them to run Linux and Windows operating systems, which were built on Intel “x86” chips. VIDEO: Why Apple macs are good. VIDEO

Optionally, run 2012 mac Minis as a NAS server.

This article describes several ways to run Microsoft Windows on an Apple MacOS. Each approach has its own advantages and disadvantages:

NOTE: Content here are my personal opinions, and not intended to represent any employer (past or present). “PROTIP:” here highlight information I haven’t seen elsewhere on the internet because it is hard-won, little-know but significant facts based on my personal research and experience.


Not new-generation M1 chips

Newer Macs with Apple Silicon (M1, M2, M3, etc.) chips’ ARM architecture are not supported by Linux (at time of writing). To run Linux on Apple Silicon Macs use virtual machine software such as:

(Boot Camp is for Windows only, not Linux.)

https://www.youtube.com/watch?v=uF6Wal8vFJg home server


Triple-boot Mac

VIDEO: VIDEO: The stages:

  1. Empty Trash
  2. Take full backup of your Mac.
  3. Partition disk space for Windows and Linux.
  4. Create a bootable USB on a Mac.
  5. Use Apple’s Boot Camp to install Windows on the new Windows partition.
  6. Install boot loader rEFInd so we can choose OS at boot time

  7. Shrink (compress) the partition for Boot Camp to allow space for Linux installation
  8. Install Ubuntu Linux on the newly created partition.

Empty Trash

  1. Cursor to the edge for the Trash Can to appear so you can right-click it to select “Empty Trash”. Confirm.

    Take Full backup

  2. Plug in a USB drive with enough space to hold your various backups.

    If the drive is new, you’ll be prompted to format it.

  3. Cursor to the top edge to click the backup icon to select “Back Up Now”.
  4. Wait for the backup to complete.
  5. In Finder, scroll down to the USB drive to click the eject icon.

    Partition disk space

  6. Press command+spacebar for the Spotlight to type enough of “Disk Utility.app” to press Enter to open it.

  7. Click View in the top left corner of the window to select “Show All Devices”.
  8. To see the left menu better, click and drag the divider between the panes.
  9. Notice the total amount of disk space available on the upper-right box (such as “499.96 GB”). Later on the app would show the same disk at “500.28 GB”.
  10. Click “Macintosh HD - Data” on the left pane.

    PROTIP: You’ll be allocating from the Free amount. Make sure there’s enough.

  11. Click the “Partition” square icon at the top of the window. If you are using a newer Mac, you might be asked to add a volume. Click Partition on the pop-up.

    Allocate 20 GB each for Linux and Windows:

  12. For Name:, type “LINUX”. No space character.
  13. For Format, select “MS-DOS (FAT)”.
  14. Drag the little white circles on the edge of the larger circle. The gray side of the pie is space for your Mac, while the blue space is your new partition.

    Alternately, type the size in the box next to Size.

    It is recommended that you set aside at least 20GB for Linux.

  15. Take note of the size of your partition, you will need this information later.

  16. Click “Apply”. Your computer becomes unresponsive as the partition is created.

  17. Click Partition and Continue when further prompted and wait for the partition process to finish.

  18. Create a bootable USB on a Mac.

Vagrant Virtualbox

Vagrant (at https://www.vagrantup.com) is from HashiCorp, the same folks who provide Consul and Terraform.

Vagrant provisions complete virtual machines (Unix, Linux, Mac, or Windows) inside the Mac operating system as virtual machines. The VMs are segregated from other processes. This allows you to test software in a variety of environments.

Install Virtualbox

  1. First, Apple XCode needs to be installed.

  2. Install Homebrew

  3. From within any folder, download, verify, and install Virtualbox (virtualbox.org):

    brew install Caskroom/cask/virtualbox

    The response (at time of writing):

    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    ==> Updated Formulae
    notmuch                                                        pwntools                                                       todoman
     
    ==> brew install --cask Caskroom/cask/virtualbox 
    ==> Satisfying dependencies
    ==> Downloading http://download.virtualbox.org/virtualbox/5.1.26/VirtualBox-5.1.26-117224-OSX.dmg
    ######################################################################## 100.0%
    ==> Verifying checksum for Cask virtualbox
    ==> Installing Cask virtualbox
    ==> Running installer for virtualbox; your password may be necessary.
    ==> Package installers may write to any location; options such as --appdir are ignored.
    Password:
    ==> installer: Package name is Oracle VM VirtualBox
    ==> installer: Upgrading at base path /
    ==> installer: The upgrade was successful.
    🍺  virtualbox was successfully installed!
    
  4. Download, verify, and install VirtualBox extension pack for your version of virtualbox:

    brew install Caskroom/cask/virtualbox-extension-pack

    The response at time of writing:

    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 1 tap (caskroom/cask).
    No changes to formulae.
     
    ==> brew install --cask Caskroom/cask/virtualbox-extension-pack 
    ==> Caveats
    Installing this Cask means you have AGREED to the
    VirtualBox Personal Use and Evaluation License at
     
    https://www.virtualbox.org/wiki/VirtualBox_PUEL
     
    ==> Satisfying dependencies
    All Cask dependencies satisfied.
    ==> Downloading http://download.virtualbox.org/virtualbox/5.1.26/Oracle_VM_VirtualBox_Extension_Pack-5.1.26-117224.vbox-extpack
    ######################################################################## 100.0%
    ==> Verifying checksum for Cask virtualbox-extension-pack
    ==> Installing Cask virtualbox-extension-pack
    ==> 0%...
    ==> 10%...20%...30%...40%...50%...60%...70%...80%...90%...
    ==> 100%
    🍺  virtualbox-extension-pack was successfully installed!
    
  5. Download, verify, and install Vagrant:

    brew install Caskroom/cask/vagrant

    The response at time of writing:

    ==> brew install --cask Caskroom/cask/vagrant 
    ==> Satisfying dependencies
    ==> Downloading https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.dmg
    ######################################################################## 100.0%
    ==> Verifying checksum for Cask vagrant
    ==> Installing Cask vagrant
    ==> Running installer for vagrant; your password may be necessary.
    ==> Package installers may write to any location; options such as --appdir are ignored.
    ==> installer: Package name is Vagrant
    ==> installer: Upgrading at base path /
    ==> installer: The upgrade was successful.
    🍺  vagrant was successfully installed!
    
  6. Download, verify, and install Vagrant-Manager:

    brew install Caskroom/cask/vagrant-manager

    The response at time of writing:

    ==> brew install --cask Caskroom/cask/vagrant-manager 
    ==> Satisfying dependencies
    ==> Downloading https://github.com/lanayotech/vagrant-manager/releases/download/2.5.4/vagrant-manager-2.5.4.dmg
    ######################################################################## 100.0%
    ==> Verifying checksum for Cask vagrant-manager
    ==> Installing Cask vagrant-manager
    ==> Moving App 'Vagrant Manager.app' to '/Applications/Vagrant Manager.app'.
    🍺  vagrant-manager was successfully installed!
    

    Spin up Ubuntu server

  7. Find an image at https://app.vagrantup.com/boxes/search

    PROTIP: Ubuntu is the most popular download, and is recently maintained.

    ubuntu/precise64 20170427.0.0 contains Official Ubuntu Server 12.04 LTS (Precise Pangolin).

  8. Make a sandbox directory, cd into it from your Home (~) directory:

    cd ~ && mkdir vagrant-sandbox && cd vagrant-sandbox

  9. Download the Ubuntu image, then initialize (init) the installation inside the sandbox folder (aka make the Vagrantfile).

    vagrant box add precise64 http://files.vagrantup.com/precise64.box --force

    PROTIP: The --force parameter specifies overwrite of the file if it already exists. This is since Vagrant downloads before checking anyway.

    This takes several minutes. The intermediate output:

    ==> box: Box file was not detected as metadata. Adding it directly...
    ==> box: Adding box 'precise64' (v0) for provider: 
     box: Downloading: http://files.vagrantup.com/precise64.box
     box: Progress: 38% (Rate: 464k/s, Estimated time remaining: 0:07:22)
     
    ==> box: Box download is resuming from prior download progress
    ==> box: Successfully added box 'precise64' (v0) for 'virtualbox'!
    
  10. PROTIP: Verify the box file downloaded is stored on MacOS and Linux at:

    ~/.vagrant.d/boxes

    On Windows:
    C:/Users/<em>USERNAME</em>/.vagrant.d/boxes

    Windows image

    Alternately, create a Windows 10 sandbox:

    vagrant box add windows? http://files.vagrantup.com/windows?.box

    This takes several minutes.

    Configure same subnet

    PROTIP: Machines talk with each other only if they are on the same network subnet.

  11. In Virtualbox, click Settings, Networking, click the Adapter with the “Host-only Adapter”.
  12. Select the name “vboxnet1”.
  13. Click on the icon at the right to create a new entry.
  14. Specify a private network address such as 192.168.57.1, with a subnet mask of 255.255.255.0.

  15. Initialize

    A Vagrant environment or target machine is required to run the vagrant up command. Run vagrant init to create a new Vagrant environment. Or, get an ID of a target machine from vagrant global-status to run this command on. A final option is to change to a directory with a Vagrantfile and to try again.

    vagrant init precise64

    The response in the command line:

    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.

    This creates a .vagrant hidden folder.

    This creates a Vagrantfile. All such files begin with these two lines:

    # -*- mode: ruby -*-
    # vi: set ft=ruby :
    

    Generated:

       
    # All Vagrant configuration is done below. The "2" in Vagrant.configure
    # configures the configuration version (we support older styles for
    # backwards compatibility). Please don't change it unless you know what
    # you're doing.
     

    The minimal specification for vagrant up to instantiate a single Ubuntu box:

    Vagrant.configure("2") do |config|
     config vm.box = "hashicorp/precise64"    
    end
     

    Vagrant obtains the image from
    https://app.vagrantup.com/hashicorp/boxes/precise64

    Several server instances can be defined within the same Vagrantfile.

      config.vm.define "webserver01" do |web01|
     web01.vm.box = "jptoto/Windows2012R2"
     web01.vm.hostname = "windows-webserver01"
     web01.vm.communicator = "winrm"
     web01.winrm.username = "vagrant"
     web01.winrm.password = "vagrant"
     web01.vm.network "private_network", ip: "192.168.57.3"
     web01.vm.provider "virtualbox" do |vb|
       vb.memory = 2048
       vb.cpus = 2
     end
      end
     

    Vagrant obtains the image for web01.vm.box = "jptoto/Windows2012R2" from
    https://app.vagrantup.com/jptoto/boxes/Windows2012R2

    Also: http://www.vagrantbox.es/

    CAUTION: Unlike Linux machines which requires no new license code every 90 days, Microsoft insists that a new image be re-created every 90 days. Painful.

    Thus the need for Packer template provisioning scripts to create Windows server images.

    Packer Templates

  16. Install Packer from HashiCorp. On a Mac use Homebrew even though HashiCorp shows compiling:

    brew install packer

    Alternatively, on Windows: choco install packer

  17. Verify you can run the command without parameters (no PATH problems):

    packer

    The response:

    Usage: packer [--version] [--help]  [<args>]
     
    Available commands are:
     build       build image(s) from template
     fix         fixes templates from old versions of packer
     inspect     see components of a template
     push        push a template and supporting files to a Packer build service
     validate    check that a template is valid
     version     Prints the Packer version
    
  18. Packer templates

    A Packer template simplifies the creation of minimally-sized, fully patched Windows Vagrant boxes.

    More importantly, it’s used to achieve immutable server configurations.

    Matt Wrock covers it in detail in his Nano Server template.

    See http://blog.traintracks.io/building-a-devbox-with-packer-vagrant-and-ansible-2/

    Virtualbox

    “Think of Vagrant as a scripting engine for VirtualBox.”

    PROTIP: The ideal strategy for scaling deployments is a judicious combination of both an automation pattern and “Golden Image” approaches. Start with a “DNA stem cell” image containing an approved base build, security fixes, and settings which don’t often change. Use provisioning tools such as Kickstart and Cobbler. Then customize using Ansible, Puppet, or Chef to create a golden image for production.

    Local Vagrant Global Status

  19. List Vagrant instances from any directory:

    vagrant global-status

    A sample response can include directories that have been deleted:

    id       name    provider   state   directory                                                 
    ----------------------------------------------------------------------------------------------
    0cf0a57  acs     virtualbox saved   /Users/mac/gits/ansible                          
      
    The above shows information about all known Vagrant environments
    on this machine. This data is cached and may not be completely
    up-to-date. To interact with any of the machines, you can go to
    that directory and run Vagrant, or you can use the ID directly
    with Vagrant commands from any directory. For example:
    "vagrant destroy 1a2b3c4d"
    

    For example, the sample instance named “acs” (Ansible Control Server) would contain files like these:

    ansible-files-244x215-31570

    PROTIP: Such folders defined need to be deleted or they take up space and cycles.

    Deleted .vagrant dir deleted from the filesystem still show as running, to remove:

    vagrant global-status --prune

    Vagrant up

  20. Within the folder containing the Vagrantfile, start the server via Vagrant:

    vagrant up

    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Box 'base' could not be found. Attempting to find and install...
     default: Box Provider: virtualbox
     default: Box Version: >= 0
    ==> default: Box file was not detected as metadata. Adding it directly...
    ==> default: Adding box 'base' (v0) for provider: virtualbox
     default: Downloading: base
    An error occurred while downloading the remote file. The error
    message, if any, is reproduced below. Please fix this error and try
    again.
     
    Couldn't open file /Users/mac/vagrant-ubuntu-sandbox/base
    

    PROTIP: vagrant destroy removes Vagrant VMs are stored in
    \Users<em>username</em>"VirtualBox VMs”

    If you see an error message VBoxManage list hdds

    vagrant up --provider vmware_fusion

    https://www.virtualbox.org/manual/ch08.html

  21. Login to the new server via SSH (Secure Shell):

    vagrant ssh

  22. Change what you like. Mess it up if you care to.

  23. Logout once done poking around:

    exit

  24. Destroy the virtual server instance defined on the current directory:

    vagrant destroy

  25. View your processes:

    ps -al

    Configuration

    The vagrant virtual servers are configured with a single file (called a “Vagrantfile”) started with a single command (vagrant up), are contained within a single folder, and can be destroyed with a single command (vagrant destroy).

Blogs about this topic:

  • https://gist.github.com/tbonesteaks/000dc2d0584f30013913
  • http://sourabhbajaj.com/mac-setup/Vagrant/README.html
  • https://varyingvagrantvagrants.org/ is an open source Vagrant configuration focused on WordPress development.

Boot Camp on Mac

VIDEO: Apple came up with it, at https://support.apple.com/en-us/HT201468 says the installer is in the Utilities folder inside the Applications folder.

This is called a “split brain” approach. The hassle with this are that:

  • a repartition of your startup disk to create a Windows partition is necessary. You install Windows in the Windows partition.

  • switching requires a reboot.

See https://support.apple.com/en-us/HT201468

Parallels

Parallels

Parallels Boot Camp Guide and Guidelines

One blogger combined both: installing Windows into a Boot Camp partition first, and then turned that partition into an active Parallels virtual machine. This way, I have the option of using Windows in the virtual machine, or restarting to run Windows natively at full speed. But he hasn’t needed to boot directly to Windows.

You can’t pause the virtual machine or save it to a snapshot. A non-Boot Camp virtual machine doesn’t have these limitations.

Virtual machine settings: 2 virtual CPUs 4096MB system memory 256MB graphics memory

Parallels options:

* Optimization: Faster virtual machine, Adaptive hypervisor, Tune Windows for speed all turned on.
* Sharing: Shared cloud, SmartMount, and Access Windows folders from Mac turned off, as I didn’t need these for my workflow.

Parallels’ Coherence presentation mode shows Windows apps side-by-side with OS X is good for copy and paste. But this slows performance.

PROTIP: Use two monitors. Have Windows full-screen on an external Thunderbolt display, and OS X on the laptop screen. Then swipe the Magic Mouse to switch desktops.

Fix a few annoyances and performance drains:

https://www.youtube.com/watch?v=gfjFJ-v_h2s Web Development in Visual Studio 2017

  • Function keys. If you’re using the Mac keyboard, you’ll want to change the function key behavior so the F1-F12 keys work correctly in Visual Studio. From System Preferences – Keyboard, make sure Use all F1, F2, etc. keys as standard function keys is checked. With this turned on, hold Fn to use the Mac functions (brightness, volume, etc.) on F1-F12. With an external non-Mac keyboard, this isn’t an issue.

  • Disable Windows visual effects. I turned off most of the Windows desktop manager visual effects by going to Control Panel – System and Security – Advanced system settings – Advanced – Performance – Settings – Visual Effects and choosing Adjust for best performance. However, I left Smooth edges of screen fonts checked because it improves text rendering on my monitor.

Through trial and error, I found a number of things that could be disabled to improve performance. You may not want to make all of the changes I did, so pick and choose your own list of tweaks:

Disable hardware-accelerated rendering. Unchecking Automatically adjust visual experience based on client performance, Enable rich client visual experience, and Use hardware graphics acceleration if available via Options – Environment made the UI feel much more responsive on my machine.

Start up to an empty environment. Starting up Visual Studio for the first time feels a lot snappier if you skip the default news page on startup. Select Empty environment under Options – Environment – Startup – At startup.

Remove unused extensions. Visual Studio ships with a number of extensions that you may not need. From Tools – Extensions and Updates – Installed, remove any extensions you aren’t actively using (you can always reinstall them later). I got rid of six extensions I didn’t need.

Disable extra debugging features. I turned off both Enable Diagnostic Tools while debugging and Show elapsed time PerfTip while debugging in Options – Debugging – General. I wasn’t using these debugging features, and debugging felt snappier after I disabled them.

Turn off the Navigation Bar. I found the code editor Navigation Bar to be unnecessary if the Solution Explorer is open. I disabled it via Options – Text Editor – All Languages – Navigation Bar.

Disable CodeLens. CodeLens is a cool feature for collaboration, but it’s not part of my current workflow. I got rid of the CPU overhead by turning it off via Options – Text Editor – All
Languages – CodeLens – Enable CodeLens.

Turn off Track Changes. When a file is open in the code editor, Visual Studio will represent recent changes by displaying small regions of green or yellow on the scroll bar. If you can live without this, turn off Track changes via Options – Text Editor – General for a small performance boost.

Turn off Track Active Item. Squeeze out a little bit more UI performance out by ensuring Track Active Item in Solution Explorer is unchecked under Options – Projects and Solutions – General.

VMware Fusion

VMware Fusion enables you to experiment with setups on a fresh instance of Windows.

With VMWare Fusion, you can quickly switch among macOS, Windows, or Linux on a macOS machine.

Unlike ___, you don’t need to reboot to switch.

  1. The marketing page for VMWare’s Fusion for Mac is at:

    https://www.vmware.com/products/fusion.html

    PROTIP: The Pro edition costs $395 if you need to share images.

    This is the Mac edition of the VMware Workstation 17 Pro for Windows/Linux.

  2. PROTIP: VMware Fusion currently supports macOS 12 Monterey or 13 Ventura but NOT 14.

    That’s why I keep an older 2017 MacBook Pro around for this.

    Precautions Before

  3. Buy a USB drive and take a full backup of your whole laptop so you can fall back.

  4. So you’ll have enough disk space for the GB-large VMware image files (at least 80-200 GB free), move other unneeded files to a cloud or USB drive.

    Remove previous VMware Fusion

  5. Press command+Tab to switch to the Finder. Navigate to folder “/Applications”.
  6. If “VMware Fusion.app” is there, right-click on it and select “Move to Trash”.

    HISTORICAL NOTE: VMware Fusion 7 worked great. But when I upgraded my Mac to Yosemite, VMware Support was not able to figure it out until Some found that uninstalling Vagrant fixed the problem.

    Installing Fusion

    I prefer using package managers so that I can uninstall with a single command. Homebrew automatically verifies download files so I don’t have to do it manually.

  7. Install Homebrew. See my instructions
  8. Install a Git client.
  9. ssh.exe (like putty for Windows).

  10. Get information about it on Homebrew:

    brew info vmware-fusion
    ==> vmware-fusion: 13.0.2,21581413 (auto_updates)
    https://www.vmware.com/products/fusion.html
    Not installed
    From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/vmware-fusion.rb
    ==> Name
    VMware Fusion
    ==> Description
    Create, manage, and run virtual machines
    ==> Artifacts
    VMware Fusion.app (App)
    ==> Analytics
    install: 211 (30 days), 212 (90 days), 212 (365 days)
    
  11. Install the latest version of VMWare Fusion:

    brew install --cask vmware-fusion
    ==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/8ed7aa4
    Already downloaded: /Users/johndoe/Library/Caches/Homebrew/downloads/8976eded57c3c79fed520419d49c675949e67141d74647dabebc34a6ad75112b--vmware-fusion.rb
    ==> Downloading https://download3.vmware.com/software/FUS-1302/VMware-Fusion-13.
    Already downloaded: /Users/johndoe/Library/Caches/Homebrew/downloads/86f7c23de61d4ee020bb5e7754695769322424164acff8ab281a4b3347e53f84--VMware-Fusion-13.0.2-21581413_universal.dmg
    ==> Installing Cask vmware-fusion
    ==> Moving App 'VMware Fusion.app' to '/Users/johndoe/Applications/VMware Fusi
    ==> Linking Binary 'vmnet-cfgcli' to '/usr/local/bin/vmnet-cfgcli'
    ==> Linking Binary 'vmnet-cli' to '/usr/local/bin/vmnet-cli'
    ==> Linking Binary 'vmnet-dhcpd' to '/usr/local/bin/vmnet-dhcpd'
    ==> Linking Binary 'vmnet-natd' to '/usr/local/bin/vmnet-natd'
    ==> Linking Binary 'vmnet-netifup' to '/usr/local/bin/vmnet-netifup'
    ==> Linking Binary 'vmnet-sniffer' to '/usr/local/bin/vmnet-sniffer'
    ==> Linking Binary 'vmrest' to '/usr/local/bin/vmrest'
    ==> Linking Binary 'vmrun' to '/usr/local/bin/vmrun'
    ==> Linking Binary 'vmss2core' to '/usr/local/bin/vmss2core'
    ==> Linking Binary 'ovftool' to '/usr/local/bin/ovftool'
    ==> Linking Binary 'vmware-aewp' to '/usr/local/bin/vmware-aewp'
    ==> Linking Binary 'vmware-authd' to '/usr/local/bin/vmware-authd'
    ==> Linking Binary 'vmware-id' to '/usr/local/bin/vmware-id'
    ==> Linking Binary 'vmware-ntfs' to '/usr/local/bin/vmware-ntfs'
    ==> Linking Binary 'vmware-rawdiskAuthTool' to '/usr/local/bin/vmware-rawdiskAut
    ==> Linking Binary 'vmware-rawdiskCreator' to '/usr/local/bin/vmware-rawdiskCrea
    ==> Linking Binary 'vmware-remotemks' to '/usr/local/bin/vmware-remotemks'
    ==> Linking Binary 'vmware-usbarbitrator' to '/usr/local/bin/vmware-usbarbitrato
    ==> Linking Binary 'vmware-vdiskmanager' to '/usr/local/bin/vmware-vdiskmanager'
    ==> Linking Binary 'vmware-vmdkserver' to '/usr/local/bin/vmware-vmdkserver'
    ==> Linking Binary 'vmware-vmx' to '/usr/local/bin/vmware-vmx'
    ==> Linking Binary 'vmware-vmx-debug' to '/usr/local/bin/vmware-vmx-debug'
    ==> Linking Binary 'vmware-vmx-stats' to '/usr/local/bin/vmware-vmx-stats'
    ==> Linking Binary 'vmware-cloneBootCamp' to '/usr/local/bin/vmware-cloneBootCam
    ==> Linking Binary 'vctl' to '/usr/local/bin/vctl'
    ==> Linking Binary 'vmnet-bridge' to '/usr/local/bin/vmnet-bridge'
    🍺  vmware-fusion was successfully installed!
    

Skip to Configure Fusion if you want to, instead of above, install using the manual alternate:

  1. Visit the VMware Fusion installer (not the Pro edition) at:

    https://www.vmware.com/products/fusion/fusion-evaluation.html

  2. Register for a “Personal Use License”. Create an account if you don’t already have one.

  3. Click “Register Here”. Fill out the info. Click “START FREE TRIAL”.
  4. Highlight and copy the LICENSE KEY and save it in 1Password.

    PROTIP: Historically:

    • VMware Fusion 13.0.2 (for Intel-based and Apple silicon Macs) 2023-04-25 13.0.2 672.09 MB dmg
    • VMware-Fusion-11.1.0-13668589.dmg was 520.1 MB
    • VMware-Fusion-8.5.8-5824040.dmg was 467 MB

    NOTE: I’ve been using VMWare Fusion since its version 6 in 2016.

    PROTIP: The default location of virtual machine images changed in Fusion 11.x “$HOME/VirtualMachines⁩” from “$HOME/Documents/VirtualMachines” in Fusion 8.x and 10.x.

  5. Click “Manually Download”.
  6. Verify whether the file you downloaded is what the developers intended to store on the website:

    1. Press command+Tab to switch to a Terminal window.

    2. List the file name of the .dmg file you downloaded into the Downloads folder:

      ls $HOME/Downloads/VM*</ul>
      
      You should see something like:
      
      
        /Users/johndoe/Downloads/VMware-Fusion-13.0.2-21581413_universal.dmg
      1. Highlight the file name and press command+C to copy that path into your hidden Clipboard: 1. Construct a command such as:
        shasum -a 256 VMware-Fusion-13.0.2-21581413_universal.dmg
        It should return a line such as this: c86b40823b97334f20b4e6b475b488ec23faf06c986e291965b9e56f7b44c042 VMware-Fusion-13.0.2-21581413_universal.dmg </ul> 1. If the hash value generated is NOT the same as what the website shows, try downloading again. If it's still different, create a support ticket.
  7. At the VMWare webpage, press command+W to close that tab.

  8. In the Terminal, remove the VMWare installer: Double-click on the file name to copy it. Construct a command:

    rm VMware-Fusion-13.0.2-21581413_universal.dmg

Configure Ways to Invoke VMware Fusion

Enable Fusion to be opened in different ways:

  1. To invoke Fusion at a Terminal command line, configure your aliases setup file with this:

    alias vfusion='open -a "$HOME/Applications/VMware Fusion.app"'
    1. I click “Don’t Allow” to the pop-up “VMware Fusion.app” would like to access the microphone.

    2. Click to dismiss the “Background Items Added” message appear on the upper right corner.
    3. Click “OK” to the “Legacy System Extension” message.

    4. Type vfusion in the Terminal
  2. To make Fusion available from the Apple Dock, on the Touchpad pinch 4 fingers together and drag the app icon to drop it in the mac’s Dock.

  3. Press command+Tab to switch to the Finder. Navigate to folder “/Applications”. Click “VMware Fusion.app”.

    First-time steps

  4. The first time a new version opens, click “Open” to “VMware Fusion.app” is an app downloaded from the Internet.
  5. Click Agree.
  6. Type the License Key into the dialog. PROTIP: I was not able to paste the License Key.
  7. Click “Done” to dismiss the installer.
  8. Click “OK” to access Accessibility.

  9. Mouse up to select “VMware Fusion”, Settings.
  10. “When closing a virtual machine”: choose “Power off the virtual machine”.
  11. Check “Enable keyboard shortcut”.
  12. Click the “x” to exit.

    VMware Fusion files

Install Windows as a SOC Analyst

PROTIP: Apps in the /Applications folder are sorted by the date when the app was created, not when it was installed on your laptop.

  1. In Finder, on the left pane, scroll to the “Locations” section to click the exit icon to the right of “VMware Fusion”.

  2. Click OK to “System Extention Blocked”.
  3. Click Agree to Terms & Conditions.
  4. Copy the License key and paste in the form. Continue.
  5. You’ll be asked to enter your password again. Then “Done”.
  6. Click OK to “VMWare Fusion.app” wants access to control “System Events.app”.
  7. Click “Allow” or “Don’t Allow” to “VMware Fusion” Notifications. You can change it later.
  8. Open System Preferences → Security & Privacy → General

    vmware-fusion requires a kernel extension to work. If the installation fails, retry after you enable it in:

  9. Click “Allow” to “System software from developer “VMWare Inc.” was blocked
    from loading.
  10. Click the lock to block further changes on that form.
  11. Click “Cancel” at the “Select the Installation Method” screen because you’ll see it again.
  12. To open the app, on the Touchpad squeeze four fingers together and use two fingers to scroll. Click “VMWare Fusion”.

    Get Ubuntu Server 22.04.01 installer image

    See my article Packer from HashiCorp within macOS to create an ISO image of Windows with a license for the Windows operating system.

  13. Identify the version of Ubuntu to use.

    VIDEO: Gerald Auger explains these instructions by Eric Capuano.

  14. Download the 14 GB .iso image file:

    https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-live-server-amd64.iso

  15. PROTIP: Move large .iso files to a fast SSD USB drive to make room on your laptop’s hard drive.

    Samsung’s SSD Magician software is only for Windows. To get Samsung’s T7 SSD Factory Reset Tool for Mac, call their 800.726-7864. The app only works when Apple System Settings Appearance is set to Light (not Dark).

  16. Invoke VMware Fusion. Click Continue.
  17. In “Create a New Virtual Machine”, drag and drop the .iso file. Click Continue.
  18. Click “UEFI”, not “UEFI Secure Boot”. Continue.
  19. Click “Customize Settings”.

    Notice that a “Virtual Machines” folder was created to store “vmwarevm” image files.

  20. Click Save.

    TODO: for 2 CPU cores & 2GB RAM like https://kb.vmware.com/s/article/1018415

  21. Click the big arrow button.
  22. Check “Never show this dialog again”, then click OK to “You are running this virtual machine with side channel mitigations enabled. Side channel mitigations provide enhanced security but also lower performance. To disable mitigations, change the side channel mitigations setting in the advanced panel of the virtual machine settings. Refer to VMware KB article 79832 at https://kb.vmware.com/s/article/79832 for more details.”

    Ubuntu GNU GRUP Boot

  23. TODO:

    Get Windows installer image

  24. TODO:

    Keyboard

    To press the Windows key, press the command key.

    To press F keys (F2, etc.), hold down the fn key and press F2, etc. at the top row.

    Troubleshooting

    PROTIP: My Fusion instance has been more stable than my Windows PC laptop.

  25. Others suggested:

    sudo kextunload -b com.intel.kext.intelhaxm

    Settings

    Several topics below refer to use of VMWare Tools installed from inside Windows.

    You need to be on a single-screen to obtain the VMWare Machine menu at the top by moving the mouse there.

    1. Click Sharing.
    2. Use the square + and - icons at the lower right.

    PROTIP: Do not mirror a folder. It may take too much space.

    Shared Folder

    This uses VMWare Tools installed from inside Windows.

  26. Virtual Machine > Settings > Sharing

    PROTIP: After unzip, delete the zip file to keep disk usage low.

    Delete Snapshots

    VMWare Fusion automatically takes snapshots as a fall-back.

    But they take up room.

    In the list of Virtual Machines available, the amount of room taken by snapshots is listed.

    To establish a particular state of an instance as the base for another image, it’s best to remove the snapshots.

  27. Shut down the virtual machine.
  28. Make a complete backup to anotther USB device.
  29. Go to Virtual Machine menu Snapshots. …
  30. Select one or more snapshots to delete by holding down Shift when clicking.
  31. Click the Delete icon.
  32. Watch the progress bar at the bottom. This takes several minutes.

USB Drive Formats

Windows and Macs can both read older FAT32-formatted drives. But…

  • FAT32 has a 4GB size limit per file, so it isn’t ideal for video files.
  • FAT32 also has 32 GB limit for drives, not the 2 TB external drives.

Most external USB drives today (TB size) are sold formatted in NTFS for Windows , which Mac can read but not write to.

Windows computers can’t even read Mac-formatted HFS+ drives.

exFAT has a theoritical limit of 16 Exa-bytes. 64 ZB (512 TB recommended max). Format the USB drive in “exFAT” format and it can be read by both Windows and Mac (except for Leopard version of Macs, which few Mac users have anymore). This blog says it’s faster than NTFS.

To format extFAT on a Mac UI:

  1. Connect the drive to the Mac.
  2. Open Disk Utility: hit command and spacebar at the same time for Spotlight search, then type in Disk Utility to find the program.
  3. Select the USB drive you want to format. (The lowest level with an eject icon under an “External”).
  4. Click Erase.
  5. Give the partition a name and select exFAT for the format.
  6. Click Erase again.

If you get an error message “Erase process has failed”, open a Terminal to use commands:

  1. Get the disk id from:

    diskutil list
    
  2. unmount using the disk ID from above:

    diskutil unmountDisk force disk3
    

    The response is

    Forced unmount of all volumes on disk3 was successful

  3. Write zeros

    sudo dd if=/dev/zero of=/dev/disk3 bs=1024 count=1024
    

    The response:

    1024+0 records in
    1024+0 records out
    1048576 bytes transferred in 1.889696 secs (554891 bytes/sec)
    
  4. Partition it again in “MBR” partition scheme for use with Windows machines:

    diskutil partitionDisk disk3 1 MBR exfat MyDisk 100%

    “Error creating partition map: The disk is too large to be supported by the given partition scheme (-69659)”

    Windows 7 doesn’t like the UUID partition scheme. Reformat as MBR in macOS for Win7

    This is why if you format exFAT on a Mac, it won’t read on a PC. But if you format exFAT on a PC, the it will work on both.

    Alternately, to partition it in “Mac OS Extended (Journaled)” format so a Mac can boot from it:

    diskutil partitionDisk disk3 GPT JHFS+ "My External HD" 0g

    See this

    The response:

    Started partitioning on disk3
    Unmounting disk
    Creating the partition map
    Waiting for partitions to activate
    Formatting disk3s2 as Mac OS Extended (Journaled) with name My External HD
    Initialized /dev/rdisk3s2 as a 3 TB case-insensitive HFS Plus volume with a 229376k journal
    Mounting disk
    Finished partitioning on disk3
    /dev/disk3 (external, physical):
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:      GUID_partition_scheme                        *3.0 TB     disk3
    1:                        EFI EFI                     209.7 MB   disk3s1
    2:                  Apple_HFS My External HD          3.0 TB     disk3s2
    
  5. Repeat the steps above for ExFAT.

  6. Click on the Partition tab in the DU main window.

  7. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to MBR then click on the OK button. Set the format type to MSDOS (FAT32.) Click on the Partition button and wait until the process has completed.

    See https://support.apple.com/kb/PH22240?locale=en_US

    Alternately:

  8. brew install e2fsprogs
  9. figure out the name of your partition or drive using diskutil list – in my case, my partition had was on disk2 and had the identifier of disk3s2

  10. ?

    sudo $(brew –prefix e2fsprogs)/sbin/mkfs.ext3 /dev/disk3s2

    but you may need to change the drive from disk2s1 to the partition or drive that you want to format. This command will ask you to verify the name of the partition, just to be sure :)

Format ExFAT on Windows OS

  1. Open up Windows Explorer and right-click on your drive in the sidebar. Choose “Format”.
  2. In the “File System” dropdown, choose exFAT instead of NTFS.
  3. Click Start and close this window when finished.

https://osxfuse.github.io/ (file system in user space)

https://unetbootin.github.io/ loads Linux ISO images to USB drives

Defrag Windows

SSD drives should not be defragmented.

Only traditional spinning disks need to be defragmented, to relocate where bits are stored so contiguously blocks are available.

  1. Before doing this, make a full backup to a USB external drive.
  2. You’ll need to use an Admin account.
  3. Click the Start button.
  4. Type Disk and select Disk Defragmenter (rather than going through menu All Programs, Accessories, Choose System Tools).
  5. Hit Analyze or Defragment Now.
  6. This takes a while, possibly even hours, to run.
  7. The PC can be used throughout the process, but it’s not advisable.

Configuration

It’s a good thing the classic Control Panel is still in Windows 10.

The Color Picker in the classic Control Panel is nested under “Appearance and Personalization”, “Personalization”, then “Color and Appearance.”

The classic Control Panel enables you to create nearly any color you want for the accent color, even though Windows 10 Personalization page of the Settings app provides only a limited palette of 48 colors to choose from.

Fink

Back in 2007 Fink was recommended. It is a package manager like Homebrew and MacPorts. Fink is Apt-based, so people will feel right at home coming from a Debian Linux environment. Its packages are binary,so no long compile times. But practically they are usually outdated and I had to compile stuff for my system anyway. It needs X11 installed.

Windows Edge Browser

Here’s a way to get a bit of Microsoft on your Mac - the Edge browser, now built on Google Chrome.

  1. Download Beta, Dev, and Canary Channel Insider builds of the Microsoft Edge for your Mac from Microsof’ts Insider website at https://www.microsoftedgeinsider.com/en-us/download?platform=macos

    It’s 126,040,696 bytes (130.3 MB on disk)

  2. In Finder, double-click file MicrosoftEdgeCanary-76.0.176.0.pkg
  3. In the pop-up, click “Continue”, then “Install”.
  4. Provide Password.
  5. Close, then Delete the installer file.
  6. Click “Start from Scratch”.
  7. Click “Focused”, then “Done”.
  8. Look for the program in /Applications as “Microsoft Edge Canary.app”.
  9. Drag the app’s icon to your Dock bar for easy access.
  10. See https://www.microsoftedgeinsider.com/en-us/welcome?channel=canary&version=76.0.176.0
  11. On Twitter, follow @msedgedev and @MicrosoftEdge for videos that says Edge can recognize handwriting from a stylus. Save to Microsoft’s OneNote.

References

More on macOS

This is one of a series on macOS: