THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

Using Hyper-V for SQL Server CTP and RC Versions

Yesterday at SQL Saturday I was asked how to connect to SQL Server 2017 CTP 2.1 that was running in a virtual machine by using Remote Desktop Connection. If you want to learn how to use new software before it is released, running it in a virtual machine is a really good idea. It is wise to keep prerelease software off of your primary machine. Sometimes people call this keeping your machine clean. Microsoft no longer refers to prerelease versions of SQL Server as beta versions. Instead, they call the beta versions Community Technology Preview (CTP) versions. Prior to the final production release, they may be some Release Candidate (RC) versions. I do not install beta, CTP, or RC versions of software on my primary machine. Instead, I install such versions in a virtual machine. If you override the default settings for interacting with your virtual machine, you can greatly enhance your user experience. Among other things, you will likely experience a need to easily get files into and out of your virtual machine. CAUTION: The steps shown within this post remove the protections separating the virtual machine from the host machine. If you want to investigate the effects of potential malware within the safety of a virtual machine, you should not follow any of the steps within this post.

Windows 10 and Windows Server 2016 come with Hyper-V. After initially installing an operating system in a Hyper-V virtual machine, you will connect to it using the Virtual Machine Connection application. Instead of clicking the Connect button, you might want to familiarize yourself with the available options. Although I have primarily worked as a database consultant for the past 20 years, I’ve done quite a bit technical training and presentations as well. One of the things I stress to those I’m teaching is that you should not click on buttons without understanding. You need to know what defaults you are implicitly accepting. You should know if there are advantages to changing the default environment. Click the arrow by Show Options to see what is available.


Figure 1. Virtual Machine Connection. Click the arrow by Show Options.

You might want to save your settings by checking the obviously named checkbox so that your customized settings will persist from session to session.


Figure 2. Click the Local Resources tab.

Notice that here is a tab that says Local Resources.


Figure 3. Click the More… button.

Click the More… button to see what additional options are available. Select the drives on your host machine that you want to make available to your virtual machine.


Figure 4. Select host operating system drives to make available to virtual machine.

Once you’ve made all of your selections, connect to your virtual machine. Notice that the host’s machines files are available to the virtual machine.


Figure 5. Host operating system drives made available to virtual machine.

Many people prefer the user experience of Remote Desktop Connection over that of the Virtual Machine Connection. I do. By default, Windows operating systems have Remote Desktop Connection turned off. You have to connect to your virtual machine to change that. You’ll do that with Virtual Machine Connection. Navigate to the System applet. It’s probably easiest to type system into the search bar and pick it from the list.


Figure 6. Navigate to the System applet.


Figure 7. Select Remote settings.

By default, Windows operating systems are set to deny Remote Desktop Connection.


Figure 8. This is why you can’t connect to your virtual machine using Remote Desktop Connection.

Override the default to enable Remote Desktop Connection.


Figure 9. Enable Remote Desktop Connection.

Remote Desktop Connection presents you with the same options as Virtual Machine Connection, plus additional ones. You’ll probably want to override the defaults as show previously to enable access to drives on the host operating system.


Figure 10. Enabling access to host operating system drives from Remote Desktop Connection.

Open Windows Explorer in the Remote Desktop Connection so that you can see both the local drives and drives on the host machine. Click the Network node in Windows Explorer. Notice the message about network discovery being turned off. This is another default setting of Windows. Click the message


Figure 11. Network devices are not visible by default inside the virtual machine.


Figure 12. Virtual machine now has access to network resources.

Published Sunday, June 18, 2017 12:32 PM by John Paul Cook
Filed under: ,


No Comments
Anonymous comments are disabled

About John Paul Cook

John Paul Cook is a database and Azure specialist in Houston. He previously worked as a Data Platform Solution Architect in Microsoft's Houston office. Prior to joining Microsoft, he was a SQL Server MVP. He is experienced in SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a registered nurse recently completed the education to become a psychiatric nurse practitioner. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2. Connect on LinkedIn

This Blog



Privacy Statement