It seems like the majority of OpenStack users tend to work with a Linux or Mac desktop. What about the Windows users? Fortunately, the OpenStack CLI utilities we know and love (like python-novaclient, python-glanceclient, etc.) run just as well on Windows as they do on Mac and Linux. Although, there are a few differences in setting your environment variables as well as in how you format your commands.
Environment Variables
On Linux and Mac desktops, users are accustomed to using the source command with their openrc files to properly set environment variables for the OpenStack CLI tools to run properly.
I wrote a simple PowerShell script that will set environment variables for you based on values you copy and paste from an openrc file. Simply edit my PowerShell script with the appropriate contents from your openrc file, and run it. Your environment variables will be ready for use with your OpenStack CLI binaries.
Install the OpenStack CLI Utilities
Install the latest version of Python 2. Why not Python 3? The OpenStack community is still working on Python 3-compatible versions of the CLI binaries. Then, use the Python package manager (pip) to install the CLI tools that you wish to use:
pip install python-novaclient python-glanceclient python-neutronclient python-cinderclient python-swiftclient python-heatclient
Command Formatting
You may see OpenStack CLI examples that include one or more backslashes (\) to continue a long command on the next line. With PowerShell, we use a backtick (`) instead as follows:
glance image-create --property vmware_disktype=preallocated `
--property vmware_adaptertype=lsiLogicsas --name windows-2012-r2-test `
--property vmware_ostype=windows8Server64Guest --container-format bare `
--disk-format vmdk --min-disk 40 --min-ram 512 --progress `
--file z:\windows2012-blank-flat-control.vmdk
Do you have any additional tips for using the OpenStack CLI on a Windows desktop? Share them in the comments section below! In the meantime, you can learn more about VIO on the VMware Product Walkthrough site and on the VMware Integrated OpenStack product page.
Great! Thanks for this helpfull post.