RDP to EC2, Amazon WorkSpaces, Vagrant, BootCamp, VMWare Fusion, Docker
- Apple docs
- Amazon EC2 Cloud Images
- Client WorkSpaces in AWS cloud
- Launch Workspaces
- Set-up Users
- Amazon WorkSpaces Application Manager (WAM)
- Install WorkSpaces client
- Repeat Login
- Configure Remote Assistance
- Configure Windows 7 Folder Options
- Configure Windows 7 Toolbar
- Install posh-git for PowerShell
- Install clients using Chocolatey
- Clone Samples
- Shut-down and Resume
- Custom WorkSpaces
- Vagrant Virtualbox
- Boot Camp on Mac
- VMware Fusion
- USB Drive Formats
- Format ExFAT on Windows OS
- Windows Edge Browser
- More on OSX
This describes several ways to run Microsoft Windows on an Apple MacOS. Each approach has its own advantages and disadvantages:
- Amazon EC2 Cloud Images of server machines
- On an internet browser to Amazon WorkSpaces (virtual Desktop machines)
- Docker Windows instance
- Vagrant Virtualbox
- VMWare Fusion
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.
Access Windows machines by running a client software that runs Microsoft’s Remote Desktop Protocol (RDP), from within a Windows, MacOS, or Linux machine.
Apple offers the “Mac OS X - Certified Associate” certification exam on this topic (Mac Integration) on each OSX version. Those who pass get on Apple’s Registry.
Apple has a document that shows how to: Integrate a Mac into a Windows network environment and configure a Mac to work with Active Directory to take advantage of network services, file sharing, printing, instant messaging, email, calendars, and contacts. Included is security at the user, local-networking, and remote-networking levels. Migrate data from a Windows computer to a Mac. Back up data. Run Windows programs on a Mac.
Amazon EC2 Cloud Images
A hardened Amazon Machine Image (AMI) containing Visual Studio 2017 Community Edition on Windows Server 2016 costs 28 cents per hour on a t2.medium in the US. 20 cents of that goes pays for support from Cognosys, its creator. 888.489-2723
Cost per hour increases in a straight line (linear) way for number of CPUs:
Cost per hour increases in the same way for amount of Memory (RAM):
ec2instances.info provides a spreadsheet.
WARNING: On AWS EC2, Windows Server 2016 Nano servers do not support RDP, only Windows PowerShell.
PROTIP: With Amazon, you pay for hourly increments. With Google, you pay per minute.
- Create an Amazon EC2 account at http://aws.amazon.com/ec2/.
Client WorkSpaces in AWS cloud
This approach works not just a MacOS laptop, but for any computer running a modern browser, such as on a Chromebook. No files are transferred, just graphic images of a screen on servers within the AWS cloud. This makes for more stringent security, but also mean significant lag that affect productivity.
Use an appropriate AWS IAM account to login to the WorkSpaces Console at
- Select the region.
- Click “Directories” menu and set up a Directory.
- Launch. Select the Directory.
- For the simplest approach, select “Simple AD” Next. Small AWS Managed Microsoft AD”.
- Use a password generator UoyJhssxbcQzrDwT8ciF. Next.
- Choose VPC and two subnets.
Wait for Status to go from “Requested” to “Creating” to “Active”.
An image contains only the OS, software, and settings. A bundle is a combination of both that image and the hardware from which a WorkSpace is launched.
The Free Tier provides two Standard bundle WorkSpaces for up to 40 hours of combined use per month, for two calendar months, from the time you create your first WorkSpace. Usage time accrues while you’re actively using your WorkSpace as well as the time it takes to stop after a specified period of inactivity, which by default is set to one hour. If you exceed the Free Tier limits, you will be charged the standard Amazon WorkSpaces hourly rate for the additional resources you use. At the end of two calendar months, the WorkSpaces you launched in the Free Tier will automatically be billed at the applicable hourly rate.
Amazon’s regular pricing is $25 to $75 per month per user, which Amazon estimates is 59% less than traditional Virtual Desktop Infrastructures (VDI) from Citrix and VMware.
Amazon’s approach uses newer tech than VDI.
- Click “WorkSpaces” in menu.
- Click blue “Launch WorkSpaces”.
Select the Directory and Subnets.
Specify for each user his/her Username, First Name, Last Name, and Email for the Bundle selected.
PROTIP: Use a email as the Username.
- Click “Create Users”.
Check the user you want.
If a new user input was already defined, the form is cleared.
- Click “Show All Users”.
- Check the user.
- Click “Next Step”.
- Select Bundle for the OS (with default 80 GB root and 50 GB user volume).
- Select Running Mode (AlwaysOn or AutoStop hours).
Click “Next Step”.
- Click Launch Workspace (for all users).
- Wait (about 20 minutes) for the Workspace Console goes from PENDING to AVAILABLE (in green letters).
To refresh the page, type command+R or click the recycle icon.
Amazon WorkSpaces Application Manager (WAM)
Switch to return to managed users in the Amazon WorkSpaces Application Manager (WAM) for your current region at:
CAUTION: There is no moving WorkSpaces from one region to another.
There is a WAM Standard for additional functionality.
Install WorkSpaces client
- In each user’s email client, open the welcome email and click the link.
- Set your WorkSpaces credentials with a password.s
Highlight the registration code in the email and copy to your Clipboard.
Choose the link for your laptop model at
Click to download the “WorkSpaces.pkg” to your Downloads folder.
On a MacOS, it’s file “WorkSpaces.pkg” (38.2 MB taking 115.3 MB space).
On a Chromebook, click “ADD TO CHROME” at the upper-right corner.
Switch to Finder and click to invoke the installer the Chrome application to enable the proprietary PC over IP (PCoIP) protocol (from Teradici) to compress, encrypt and rapidly transport image pixels between client and server.
Double-click on the installer and click Continue and finally, Install. Provide your password when requested.
Move the installer file (WorkSpaces.pkg) to Trash, to recover disk space.
Do a Chromebook search to verify that the Amazon WorkSpaces client app icon appears.
BLAH: The full graphic streaming virtual desktops tends to eat up much bandwidth. So measure how much you have used before and after sessions.
Optionally, your company’s existing on-premises Active Directory (AD) can be reached by Amazon via an Amazon Virtual Private Cloud (VPC) with a hardware virtual private network (VPN) connection or a dedicated connection with AWS Direct Connect.
Once linked up, you use the AWS Management Console to select the users in your Active Directory who will receive a WorkSpace.
- Open the app for the first time.
- Type your user name and password and choose Sign In.
- Switch to your user’s email client and highlight the registration code from the “Your Amazon WorkSpace” email, then paste on the form.
NOTE: 1Password cannot auto-fill Username and Password on the MacOS WorkSpaces app nor on Chrombook.
Login using the Username and password for the WorkSpaces client.
If your Amazon WorkSpaces administrator has enabled multi-factor authentication for your organization’s WorkSpaces, you are prompted for a passcode to complete your login.
CAUTION: Only one browser can be used at the same time. Amazon logs off a session when another session is started on another computer.
If your Amazon WorkSpaces administrator has not disabled the “Remember Me” feature, you are prompted to save your credentials securely so that you can connect to your WorkSpace easily in the future. Your credentials are securely cached while the application is running.
After the client application connects to your WorkSpace, your WorkSpace desktop is displayed.
(Optional) If your WorkSpace uses an AD Connector directory, update the maximum lifetime of the Kerberos ticket by following the steps in Configuring Kerberos Policies in the Microsoft TechNet Library.
If you need to disable the “Remember Me” feature, search for help in the Amazon WorkSpaces forum.
Configure Remote Assistance
- Open PowerShell window.
Install Remote Assistance using this PowerShell command:
Add-WindowsFeature Remote-Assistance </tt>
Open port 3389 in the firewall and in the Security Group, Remote Desktop should work using the username and password in the traditional way.
Configure Windows 7 Folder Options
- Click the Windows Start round icon at the bottom left of the screen.
- Type “folder options” (without the quotes) until the line “Folder Options” appears for you to click at the top of the menu.
- In the “Folder Options” dialog box, click the “View” tab at the top of the window.
- Select “Show hidden files, folders, and drives”.
- Click to uncheck the box for “Hide extensions for known file types”.
Click the “OK” button at the bottom of the dialog box.
Configure Windows 7 Toolbar
- Click the Windows Start round icon at the bottom left of the screen.
- Click All Programs, Accessories. All the usual tools are there.
Drag Notepad and drop it on the tool bar at the bottom of the screen.
- Click the Windows PowerShell folder.
Drag “Windows PowerShell” and drop it on the tool bar at the bottom of the screen.
- Open Windows Explorer from the tool bar at the bottom of the screen.
- Click on “Computer”. Notice there is no C: drive and no access to C:\Windows internals.
Double-Click on “User Profile D:” drive.
Notice there are 50 GB for you.
Double-Click on D: and navigate into folder Users, your account name.
PROTIP: Here is the default location when command line windows open by default. So place scripts here (among folders).
- Right-Click Windows PowerShell to select “Run as Administrator”.
This is your user home folder.
Execution Policy Change The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
Type Y to confirm.
Within PowerShell you can also go your home by typing:
Verify whether you can create a PowerShell script file:
Add-Content helloworld.ps1 ‘Write-Host “Hello World”’
This is the PowerShell equivalent of
echo "Hello World" >helloworld.ps1.
Type the first letter h and press Tab to auto-complete:
Instead of “Hello World”, if you get this, it means executionpolicy was not set correctly:
+ CategoryInfo : SecurityError: (:) , PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
Install posh-git for PowerShell
TODO: file:///C:/Program%20Files%20(x86)/AWS%20Tools/Documentation/AWSToolsForWindows.html AWS Tools for Windows AWS SDK for .NET
To exchange files among a group of people, setup:
Install clients using Chocolatey
- Right-click on cmd and select “Run as Administrator”.
Copy this and right-click in the command window:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install jdk8 -y
Install Chrome browser:
choco install googlechrome -y
Install Git for Windows client:
choco install git -y
Alternately, to add a Git client manually, open Firefox, search for “Git for Windows”. Click Download. Click Save file. Click the down arrow for a list of downloads. Click to Open File. Run. Yes to UAC. Next all, but Git LFS. then Finish. Close Firefox. Click Windows icon. All Programs. Click Git, Git Bash.
Install Posh Git for PowerShell:
choco install poshgit -y
- Launch each and configure the window properties to enable Quick Edit and set Layout Height (scroll buffer) to 9999 lines.
Download Git repository containing bootstrap script:
- Open a Git Bash window.
cd to where you add Git repositories:
git clone https://github.com/wilsonmar/loadrunner.git --depth=1
git clone https://github.com/wilsonmar/git-utilities.git --depth=1
Shut-down and Resume
BLAH: It takes many minutes to stop and resume.
As an administrator, in the Console, select the WorkSpace and select “Create Image” to create an image with your applications and settings.
NOTE: Custom images created from Amazon WorkSpaces Graphics bundles can only be used with Graphics bundles, and custom images created from Value, Standard, Performance, or Power bundles can only be used with those bundles. Most Amazon WorkSpace images are available within 45 minutes.
Docker is now a favored approach because it runs the same (unaltered) (Dockerized apps) on Windows, Mac, and Linux platforms.
Docker provides a transparent interface to operating systems.
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.
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!
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!
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!
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
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).
Make a sandbox directory, cd into it from your Home (~) directory:
cd ~ && mkdir vagrant-sandbox && cd vagrant-sandbox
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
--forceparameter 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'!
PROTIP: Verify the box file downloaded is stored on MacOS and Linux at:
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.
- In Virtualbox, click Settings, Networking, click the Adapter with the “Host-only Adapter”.
- Select the name “vboxnet1”.
- Click on the icon at the right to create a new entry.
Specify a private network address such as
192.168.57.1, with a subnet mask of
A Vagrant environment or target machine is required to run the vagrant up command. Run
vagrant initto create a new Vagrant environment. Or, get an ID of a target machine from
vagrant global-statusto 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:
Vagrantfilehas been placed in this directory. You are now ready to
vagrant upyour first virtual environment! Please read the comments in the Vagrantfile as well as documentation on
vagrantup.comfor more information on using Vagrant.
This creates a
This creates a
Vagrantfile. All such files begin with these two lines:
# -*- mode: ruby -*- # vi: set ft=ruby :
# 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 upto instantiate a single Ubuntu box:
Vagrant.configure("2") do |config| config vm.box = "hashicorp/precise64" end
Vagrant obtains the image from
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
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.
brew install packer
Alternatively, on Windows: choco install packer
Verify you can run the command without parameters (no PATH problems):
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
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.
“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
List Vagrant instances from any directory:
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:
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
Within the folder containing the Vagrantfile, start the server via Vagrant:
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
vagrant destroyremoves Vagrant VMs are stored in
If you see an error message
VBoxManage list hdds
vagrant up --provider vmware_fusion
Login to the new server via SSH (Secure Shell):
Change what you like. Mess it up if you care to.
Logout once done poking around:
Destroy the virtual server instance defined on the current directory:
View your processes:
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://varyingvagrantvagrants.org/ is an open source Vagrant configuration focused on WordPress development.
Boot Camp on Mac
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.
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
* 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.
With VMWare Fusion, you can run quickly switch among Windows or Linux on a MacOSX machine using VMWare Fusion.
This would enable you to experiment with setups – a fresh instance of Windows.
The marketing page for VMWare’s Fusion is at
The Pro edition costs $395 enables you to share images.
Buy it to get the license key so you don’t get nagged later.
Un-install Vagrant.app (in /Applications) to avoid issues.
VMware Fusion 7 worked great. But when I upgraded my Mac to Yosemite, VMware Sopport was not able to figure it out until Some found that uninstalling Vagrant fixed the problem.
There are several versions on Brew:
brew search fusion
autodesk-fusion360 suitcase-fusion vmware-fusion10 macfusion vmware-fusion vmware-fusion7 macfusion-ng vmware-fusion-tech-preview vmware-fusion8
Install the latest version of VMWare Fusion:
brew install --cask vmware-fusion
You’ll be prompted for your password, then:
🍺 vmware-fusion was successfully installed!
When done, open /Applications folder, sort by Name, and scroll to see “VMWare Fusion.app”.
PROTIP: Apps in the /Applications folder are sorted by the date when the app was created, not when it was installed on your laptop.
- Click OK to “System Extention Blocked”.
- Click Agree to Terms & Conditions.
- Copy the License key and paste in the form. Continue.
- You’ll be asked to enter your password again. Then “Done”.
- Click OK to “VMWare Fusion.app” wants access to control “System Events.app”.
- Click “Allow” or “Don’t Allow” to “VMware Fusion” Notifications. You can change it later.
Open System Preferences → Security & Privacy → General
vmware-fusion requires a kernel extension to work. If the installation fails, retry after you enable it in:
- Click “Allow” to “System software from developer “VMWare Inc.” was blocked
- Click the lock to block further changes on that form.
- Click “Cancel” at the “Select the Installation Method” screen because you’ll see it again.
To open the app, on the Touchpad squeeze four fingers together and use two fingers to scroll. Click “VMWare Fusion”.
Get Windows image
See my article Packer from HashiCorp within macOS to create an ISO image of Windows with a license for the Windows operating system.
My Fusion instance has been more stable that my Windows PC laptop.
sudo kextunload -b com.intel.kext.intelhaxm
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.
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.
- Click Sharing.
- Use the square + and - icons at the lower right.
PROTIP: Do not mirror a folder. It may take too much space.
This uses VMWare Tools installed from inside Windows.
Virtual Machine > Settings > Sharing
PROTIP: After unzip, delete the zip file to keep disk usage low.
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.
- Shut down the virtual machine.
- Make a complete backup to anotther USB device.
- Go to Virtual Machine menu Snapshots. …
- Select one or more snapshots to delete by holding down Shift when clicking.
- Click the Delete icon.
- 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:
- Connect the drive to the Mac.
- Open Disk Utility: hit command and spacebar at the same time for Spotlight search, then type in Disk Utility to find the program.
- Select the USB drive you want to format. (The lowest level with an eject icon under an “External”).
- Click Erase.
- Give the partition a name and select exFAT for the format.
- Click Erase again.
If you get an error message “Erase process has failed”, open a Terminal to use commands:
Get the disk id from:
unmount using the disk ID from above:
diskutil unmountDisk force disk3
The response is
Forced unmount of all volumes on disk3 was successful
sudo dd if=/dev/zero of=/dev/disk3 bs=1024 count=1024
1024+0 records in 1024+0 records out 1048576 bytes transferred in 1.889696 secs (554891 bytes/sec)
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 OSX 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
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
Repeat the steps above for ExFAT.
Click on the Partition tab in the DU main window.
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.
- brew install e2fsprogs
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
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
- Open up Windows Explorer and right-click on your drive in the sidebar. Choose “Format”.
- In the “File System” dropdown, choose exFAT instead of NTFS.
- 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
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.
- Before doing this, make a full backup to a USB external drive.
- You’ll need to use an Admin account.
- Click the Start button.
- Type Disk and select Disk Defragmenter (rather than going through menu All Programs, Accessories, Choose System Tools).
- Hit Analyze or Defragment Now.
- This takes a while, possibly even hours, to run.
- The PC can be used throughout the process, but it’s not advisable.
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.
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.
It’s 126,040,696 bytes (130.3 MB on disk)
- In Finder, double-click file
- In the pop-up, click “Continue”, then “Install”.
- Provide Password.
- Close, then Delete the installer file.
- Click “Start from Scratch”.
- Click “Focused”, then “Done”.
- Look for the program in /Applications as “Microsoft Edge Canary.app”.
- Drag the app’s icon to your Dock bar for easy access.
- See https://www.microsoftedgeinsider.com/en-us/welcome?channel=canary&version=220.127.116.11
- On Twitter, follow @msedgedev and @MicrosoftEdge for videos that says Edge can recognize handwriting from a stylus. Save to Microsoft’s OneNote.
More on OSX
This is one of a series on Mac OSX:
- MacOS Setup step-by-step, with automation
- MacOS Hardware and accessories
- MacOS dotfiles for System Preferences setup automation
- MacOS Boot-up
- MacOS Keyboard tricks
- MacOS Terminal Tips and Tricks
- Text editors and IDEs on MacOS
- MacOS Xcode.app and CommandTools (gcc)
- MacOS Command-line utilities
- Applications on MacOS
- 1password on MacOS
- Manage Disk Space on MacOS
- Screen capture on MacOS
- Windows on Apple MacOS
- Packer create Vagrant Windows image
- Python on MacOS
- Maven on MacOS
- Ruby on MacOS
- Node on MacOS installation
- Java on MacOS
- Scala ecosystem