Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Youtube

Github Stackoverflow Pinterest

RDP to EC2, Amazon WorkSpaces, Vagrant, BootCamp, VMWare Fusion, Docker


Overview

There are several ways to run Microsoft Windows on an Apple Mac computer. Each has its own advantages and disadvantages:

Access Windows machines by running a client software that runs Microsoft’s Remote Desktop Protocol (RDP), from within a Windows, MacOS, or Linux machine.


Amazon EC2 Cloud Images

GUIDE

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: ec2-cognosys-vcpu-per-dollar-562x217-54344
Cost per hour increases in the same way for amount of Memory (RAM): ec2-cognosys-mem-per-dollar-562x225-62637

ec2instances.info provides a spreadsheet.

WARNING: On AWS EC2, Windows Server 2016 Nano servers do not support RDP, only Windows PowerShell.

A t2.medium has 2 cores and 4 GB.

PROTIP: With Amazon, you pay for hourly increments. With Google, you pay per minute.

Connect to an instance in AWS EC2:

  1. Create an Amazon EC2 account at http://aws.amazon.com/ec2/.

Browser 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.

  1. In the WorkSpaces Console for your default region, Get Started, Launch, and Select a Bundle.

    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 can be 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) provided by Citrix and VMware.

    Amazon’s approach uses newer tech than VDI.

  2. Specify for each user his/her Username, First Name, Last Name, and Email for the Bundle selected.

    PROTIP: Have the Username the same as the Email.

  3. Click Launch Workspace for all users. When the Workspace Console goes from PENDING to AVAILABLE (in green letters).

    Return to managed users in the Amazon WorkSpaces Application Manager (WAM) at
    https://us-east-1.console.aws.amazon.com/wam/home for your current region.

    CAUTION: There is no moving WorkSpaces from one region to another.

    Install WorkSpaces client

  4. In each user’s email client, open the welcome email and click the link.
  5. Set your WorkSpaces credentials with a password.
  6. Highlight the registration code in the email and copy to your Clipboard.

  7. Choose the link for your laptop model at
    http://clients.amazonworkspaces.com

  8. Download and install 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.

    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.

  9. Double-click on the installer and click Continue and finally, Install. Provide your password when requested.

  10. Move the installer file (WorkSpaces.pkg) to Trash, to recover disk space.

  11. Do a Chromebook search to verify that the Amazon WorkSpaces client app icon appears.

  12. 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.

  13. Open the app for the first time.
  14. Type your user name and password and choose Sign In.
  15. Paste the registration code and click Register.

    Repeat Login

    NOTE: 1Password cannot auto-fill Username and Password on the MacOS WorkSpaces app nor on Chrombook.

  16. 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.

  17. 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.

  18. (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.

  19. If you need to disable the “Remember Me” feature, search for help in the Amazon WorkSpaces forum.

    Configure Remote Assistance

  20. Open PowerShell window.
  21. 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

  22. Click the Windows Start round icon at the bottom left of the screen.
  23. Type “folder options” (without the quotes) until the line “Folder Options” appears for you to click at the top of the menu.
  24. In the “Folder Options” dialog box, click the “View” tab at the top of the window.
  25. Select “Show hidden files, folders, and drives”.
  26. Click to uncheck the box for “Hide extensions for known file types”.
  27. Click the “OK” button at the bottom of the dialog box.

    Configure Windows 7 Toolbar

  28. Click the Windows Start round icon at the bottom left of the screen.
  29. Click All Programs, Accessories. All the usual tools are there.
  30. Drag Notepad and drop it on the tool bar at the bottom of the screen.

  31. Click the Windows PowerShell folder.
  32. Drag “Windows PowerShell” and drop it on the tool bar at the bottom of the screen.

  33. Open Windows Explorer from the tool bar at the bottom of the screen.
  34. Click on “Computer”. Notice there is no C: drive and no access to C:\Windows internals.
  35. Double-Click on “User Profile D:” drive.

    Notice there are 50 GB for you.

  36. 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).

  37. Right-Click Windows PowerShell to select “Run as Administrator”.
  38. Type:

    echo $Env:USERPROFILE

    This is your user home folder.

  39. Set permissions:

    set-executionpolicy remotesigned

    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
    
  40. Type Y to confirm.

    See How to write a PowerShell script

  41. Within PowerShell you can also go your home by typing:

    cd ~

  42. 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.

  43. List directory:

    dir

  44. Type the first letter h and press Tab to auto-complete:

    ./helloworld.ps1

    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

  45. To exchange files among a group of people, setup:
    https://amazonworkdocs.com/en/clients

    Install clients using Chocolatey

    [Find-Package from OneGet included in Windows Management Framework 5.0 Preview gets packages from the Chocolatey installer repository]

  46. Right-click on cmd and select “Run as Administrator”.
  47. 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"
    
  48. Install Java Development Kit for version 8 using Chocolatey:

    choco install jdk8 -y

  49. Install Chrome browser:

    choco install googlechrome -y

  50. 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.

  51. 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.

    https://www.develves.net/blogs/asd/articles/using-git-with-powershell-on-windows-10/#fn:start

    Clone Samples

    Download Git repository containing bootstrap script:

  52. Open a Git Bash window.
  53. cd to where you add Git repositories:

    cd gits;
    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.

    Custom WorkSpaces

  54. 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.

    See http://docs.aws.amazon.com/console/workspaces/images

Docker

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 Virtualbox

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

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

  1. First, Apple XCode needs to be installed.

    https://itunes.apple.com/au/app/xcode/id497799835?mt=12

    Agree to EULA and Install.

    Install Prerequisite Software (XCode Tools from Command Line): Open a Terminal (Launchpad —> Other —> Terminal). At the command prompt run the following command to install XCode Tools

    xcode-select —install

    Accept the EULA. Agree to install at Prompt.

  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 cask install 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 cask install 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 cask install 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 cask install 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'!
    

    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.

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

  14. 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

  15. Install Packer from Hashicorp. On a Mac use Homebrew even though Hashicorp shows compiling:

    brew install packer

    Alternatively, on Windows: choco install packer

  16. 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
    
  17. 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

  18. 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                                   
    039b2ad  default virtualbox running /Users/mac/gits/wilsonmar/jhipster-sample                 
    c1d1bed  default virtualbox running /Users/mac/gits/wilsonmar/jhipster-sample/jhipster-devbox 
      
    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

  19. 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
    
  20. Login to the new server via SSH (Secure Shell):

    vagrant ssh

  21. Change what you like. Mess it up if you care to.
  22. Logout once done poking around:

    exit

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

    vagrant destroy

  24. 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

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.

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

It costs $395, but you can run quickly switch among Windows or Linux on a MacOSX machine using VMWare Fusion.

This would enable you to experiment with setups.

VMware Fusion 7 worked great. But when I upgraded my Mac to Yosemite, I got this message:

VMware Sopport was not able to figure it about trying various tricks. Some found that uninstalling Vagrant fixed the problem. Others suggested:

sudo kextunload -b com.intel.kext.intelhaxm

Run OSX in VMware within Windows

USB Drives

Most USB drives are sold formatting in NTFS which Mac can read but not write to. Windows computers can’t even read Mac-formatted HFS+ drives.

FAT32 has a 4GB size limit per file, so it isn’t ideal for video files. FAT32 also has 32 GB limit for 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 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
    

    See http://www.theinstructional.com/guides/disk-management-from-the-command-line-part-2

    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.

Click on the Partition tab in the DU main window.

  1. 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:

  1. brew install e2fsprogs
  2. 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

  3. ?

    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

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.

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.

  1. Virtual Machine > Settings > Sharing

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

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.

Delete Snapshots

VMWare automatically takes snapshots as a fall-back.

These take up room.

In the list of Virtual Machines available, the amount of roome 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.

  1. Shut down the virtual machine.
  2. Make a complete backup to anotther USB device.
  3. Go to Virtual Machine menu Snapshots. …
  4. Select one or more snapshots to delete by holding down Shift when clicking.
  5. Click the Delete icon.
  6. Watch the progress bar at the bottom. This takes several minutes.

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.

References

  • https://www.howtogeek.com/187359/5-ways-to-run-windows-software-on-a-mac/

More on OSX

This is one of a series on Mac OSX: