Posts tagged ‘WIndows 7’

Hyper-V: Creating and Managing a Minimal 2012 installation from Windows 7

This is the process I used to create and install a Hyper-V 2012 minimal installation on my network on its own machine and manage it from a different machine running Windows 7. This installation targets two machines on a Workgroup network. Below are the steps taken for each of the machines.

Step Server Client Summary/Links
1 Install Hyper-V on the Server Install Windows 7
2 Rename (Option 2) Name your server something meaningful. I named my “HyperV”. Smile
3 Get IP Address Add Server IP to Hosts file
Allows for quicker access during remote desktop. Note this step may ignored if the Server gets a dynamic IP. If that is the case the suggested option is to change the DNS server/gateway/router or whatever it is on the system to make it static.
4 Enable Remote Desktop for all clients
7) Remote Desktop
Remote to Server If you have issues at this point, pinging the server won’t tell you anything. The server is behind its firewall. See the below section miscellaneous commands to turn off the firewall.
5 5) Do Windows Update Full Get the latest and greatest
6 Download / Install
Remote Server Administration Tools For Windows 7 With Service Pack 1
This allows you to create VMs from windows 7. Verify that there is not a new version since this blog was written.
7 Follow install instruction’s on the download page (or the W7 Remote admin tools window which pops up after install) to turn on the newly installed windows 7 feature:
Remote Server Administration Tools
Control Panel –> Programs –> Programs and Features –> Turn Windows features on or off –> Remote Server Administration tools –> Select the tools needed (Hyper-V tools)
8 3) Create Local Admin Account the step #3 on the sconfig.cmd shell. This account will be used to access the sever either during remote sessions. Note you might want to use the name of the client computer’s account for the name/password. Otherwise you will need to do an additional step #11 on the client.
9 -Install On Server- -Install on Client- Hyper-V Remote Management Configuration Utility
This is helps minimize the number of operations needed to configure a hyper-v setup on both the server and a remote server operation. Note this will help deduce any problems which might occur. This utility was made for a previous version of Hyper-V and for Windows 7. As of this writing it is being updated to be used on Windows 8. We will be following the 10-second guide on its page for “Client and Server both workgroup” but skipping steps no longer needed since this version of Hyper-V server has some of those commands offered on the initial boot screen.
9 cscript hvremote.wsf /add:{account name used in #8} This step prepares for the remote admin access for hyper-v.
10 cscript hvremote.wsf
Check the script for “Granted Remote DCOM Access to Anonymous Logon” for success
11 cmdkey
This step is only needed if either the client’s account  or even just the password is different than what is done.  (/pass is the actual, though in some situations to save the password use /pass:{actual passsword}
12 cscript hvremote.wsf
cscript hvremote.wsf
Identifies problems on either the client or the server.
13 Run Hyper-V manager
Connect to Server
If there is a problem here and one cannot connect to the server got step 12 and investigate.
14 (Hyper-V Manager)
Virtual Network Manager
Setup networking for victuals to access the network. See next step in Virtual Network Manager (VNM)
15 (Hyper-V Manager – VNM )
Add “External” virtual network
Just name the network to use with Virtuals and accept that pending changes may disrupt the network. This may take give it time.
16 (Hyper-V Manager)
Create a Virtual!
Dust off that old ISO and create a virtual to remember. Just realize that the browse operation is from the server and not your client.


Misc commands

NET SHARE Images=D:\Images /GRANT:Everyone,FULL Create a Share drive.
Get-VMSwitch Lists all the virtual switches
netsh advfirewall set allprofiles state off Turn off the firewall. Note that the firewall on a Hyper-V machine will block any ping from your internal network.

Windows 7: Getting SQL Express to Work with Visual Studio

Here are some of the tips and tricks required to get SQL Express working with Visual Studio 2008 under Windows 7.

SQL Management Studio

Why they don’t supply this with the install of Express is beyond me. But you will need it to solve a problem in a future step so I recommend you download it. Microsoft SQL Server Management Studio Express Note check for a newer version than the one at the time of this writing.

Before you actually install it, do the next section first.

User Account Control Not Just For Vista

This situation actually affects most of the older install programs when it comes to the UAC. The user account control will have an install quietly fail an install and provide no warning to the user that it was the UAC. For example if you run the install for SQL Management Studio with the default UAC settings in Windows 7 this is the error you will get:

The installer has encountered an unexpected error installing this package. This may indicated a problem with this package. The error code is 29506.

The UAC will never come up with any warning either.

So change the UAC settings to be minimal (search for UAC in the start bar and select Control Panel –> Change User Account Control Settings) and set to minimal settings.

Install the Management Studio Now.

Connecting to the Database Complains about .Net…WHAT?

Once you attempt to connect to the sql express database VS2008 will complain such as:

Execution of .NET Framework code is disabled.

Set "clr enabled" configuration option and restart the server.

I love this error because it implies you need change Visual Studio’s setting. Oh no, its the SQL Express Server setting. To add insult to injury one cannot use Visual Studio’s SQL editor to execute the change! It has to be done from management express.

Wow…as a new developer that has to be a challenge. Microsoft gives the tools such as express, but makes it impossible to use out of the gate.

To resolve the problem open up SQL Server Management Studio Express, open up the instance of SQL Express and run this command:

EXEC sp_configure 'CLR ENABLED' , '1'

Once run find Sql Server Configuration Manager in the start program menu and by right clicking the “SQL Server (SQLEXPRESS)” instance restart the service. At that point you should be able to go back to Studio and run the application. HTH