Search Wiki:

About

    • HVRemote reduces the manual configuration steps needed for Hyper-V Remote Management down to a few simple commands.
    • HVRemote can diagnose common configuration errors.
    • HVRemote is locale neutral, although output is in English only.
    • HVRemote can configure all combinations of workgroup and domain joined clients and servers.
If you find HVRemote useful, please drop me an email through my blog, or add a comment to this post :)

10-second guide


Configuration Where Purpose Commands
Client and Server both workgroup Server Create a local account (eg "john") Use net user /? or Computer Management
Server Grant the user access cscript hvremote.wsf /add:accountname ***
Client Allow Anonymous Logon remote DCOM access cscript hvremote.wsf /anondcom:grant
Client Logon with matching local account. Ctrl+Alt+Del :)
Client If passwords do not match cmdkey /add:servername /user:servername\account /pass
Client Set firewall exception cscript hvremote.wsf /mmc:enable
Both Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername
-------------------------
Client workgroup, Server domain Server Grant domain account access cscript hvremote.wsf /add:domain\account ***
Client Allow Anonymous Logon remote DCOM access cscript hvremote.wsf /anondcom:grant
Client Set credentials for domain account cmdkey /add:servername /user:domain\account /pass
Client Set firewall exception cscript hvremote.wsf /mmc:enable
Both Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername
-------------------------
Client domain, Server workgroup Server Create a local account (eg "john") Use net user /? or Computer Management
Server Grant the user access cscript hvremote.wsf /add:accountname ***
Client Set credentials for local account Use cmdkey /add:servername /user:servername\accountname /pass
Client Set firewall exception cscript hvremote.wsf /mmc:enable
Both Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername
-------------------------
Client and Server both domain Server Grant the non-admin user access cscript hvremote.wsf /add:domain\account ***
Client Set firewall exception cscript hvremote.wsf /mmc:enable
Both Verify configuration for errors cscript hvremote.wsf /show /target:othercomputername


*** Restart server if this is the first time an account has been added.

Supported Servers:

    • Windows Server 2008 SP1 with Hyper-V RTM update applied (KB950050), Core & Full installations
    • Windows Server 2008 SP2, Core & Full installations
    • Microsoft Hyper-V Server 2008 SP1 (already contains Hyper-V RTM update)
    • Microsoft Hyper-V Server 2008 SP2
    • Windows Server 2008 R2, Core & Full installations
    • Microsoft Hyper-V Server 2008 R2

Supported Clients:

    • Windows Vista Business, Enterprise and Ultimate x86 & x64, SP1 and SP2, with KB952627 applied
    • Windows 7 Professional, Enterprise and Ultimate x86 & x64 with RSAT installed and Hyper-V tools feature enabled
    • Windows Server 2008 SP1 with Hyper-V RTM update applied (KB950050), x86 and x64
    • Windows Server 2008 SP2 x86 and x64
    • Windows Server 2008 R2

Command summary


Please see the documentation for more information - below is not a complete list of all command line options, just the most commonly needed commands. Commands should be run from an elevated command prompt.

If the default scripting engine is already CScript, you can run each command exactly as shown in the table. To change the default scripting engine to cscript, run cscript //h:cscript. Alternately, launch each command using the longer format: cscript hvremote.wsf command

Applicability Operation Command
Server Grant account access hvremote /add:domain\account (Domain) or hvremote /add:account (Workgroup)
Server Revoke account access hvremote /add:domain\account (Domain) or hvremote /add:account (Workgroup)
Both Display settings hvremote /show
Client Display settings and test server connectivity hvremote /show /target:servercomputername
Server Display settings and test client connectivity hvremote /show /target:clientcomputername
Both Display help hvremote /?
Client Add firewall exception for MMC hvremote /mmc:enable
Client Permit ANONYMOUS LOGON remote DCOM access hvremote /AnonDCOM:grant
Client Deny ANONYMOUS LOGON remote DCOM access hvremote /AnonDCOM:revoke

Installation


Save HVRemote.wsf from the Downloads tab to a directory on the local disk (eg c:\HVRemote)

Disclaimer


Although I work for Microsoft and am a Program Manager in the Hyper-V team, I must point you to the disclaimer on my blog, the disclaimer in the documentation, and the license conditions on this site before use. HVRemote and the associated documentation are provided "as-is". You bear the risk of using it. No express warranties, guarantees or conditions are provided. It is not supported or endorsed by Microsoft Corporation and should be used at your own risk.

Thanks,
John.
Last edited Sep 12 2009 at 11:24 PM  by jhoward, version 11
Comments
drinking12many wrote  Dec 3 2008 at 1:14 AM  
I have a question I have been trying to use your guides to setup a hyper-v server but I keep facing an issue where I receive this message. "The Security Database on the server does not have a computer account for this workstation" It appears to join our domain fine I reboot and receive this error. It does appear in our AD structure. I can log in as local admin and then add a domain group to the admin group fine. I then try to login with a domain account again and receive the same thing. I found something similar to this for Vista but nothing that definitively helped me correct this. Thanks

jhoward wrote  Dec 4 2008 at 2:43 AM  
Sounds like http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3117915&SiteID=17
Thanks, John.

MikeS wrote  Dec 4 2008 at 8:54 PM  
Great tool. Resolved my problem in connecting from Vista SP1 to Hyper-V running on a core installation. Too bad I didn't know about it when I began my current project.

LE2Strat wrote  Dec 17 2008 at 9:43 PM  
John, I have used this on my client, and no matter what I can not connect from my Vista machine to the HyperV server. I keep getting RPC Server Unavailable. Unable to Establish Communication between "HyperVServerName" and "MyComputersName". Any ideas? I have added Anonymous DCOM access and the firewall exception is in place.

dubya97 wrote  Dec 18 2008 at 5:26 AM  
This has been a nightmare. Basic remote management from a Windows 2008 server fails. How about just a simple auth prompt to allow access. This is a metaphor for how convoluted Microsoft technology can be. I have given up on my project with HyperV and will now revert to VMware ESXi for my project. Come on this basic functionality we are talking about. DCOM remote object permissions? The fact you had to right a program to get simple connectivity and remote management to work speaks volumes. I am disappointed.

RickEveleigh wrote  Dec 18 2008 at 8:46 PM  
Got to say I am disappointed too. Can you get the tech writer to add your tool to the release note for the free Hyper-V download? All the documents there make it look like you install it, install the remote management tool and connect. Nothing at all about firewall stuff!!

TroyW wrote  Dec 19 2008 at 6:56 AM  
Great tool John, worked good for me. Much thanks for all your effort behind it.

Vitaly_K wrote  Dec 24 2008 at 5:08 PM  
Too complicated for dummies like I am. I have a fresh hyper-v server installation (stand alone) and spent half a day serching for clear instructions on how to enable remote connections. Why don't you guys add option to allow remote connections to the hvconfig.cmd? This would ease life of tens of thousands admins.
As for your guide, a few words how to get to the elevated prompt would be helpfull.
Anyway thanks for listening and have a great holidays!

jhoward wrote  Dec 27 2008 at 9:56 PM  
@LE2Strat - This will almost certainly be DNS related. Take a look at the troubleshooting section of the PDF documentation.
Thanks,
John.

DKristofferson wrote  Jan 1 2009 at 3:55 AM  
To second Vitaly-K's question; How do you open an elevated command prompt in Server Core??? The usual Vista/Server 2008 options are not available. I tried various runas tricks but they didn't seem to work. I keep getting Access Denied errors when I try to run hvremote on the server. Can't find anything in the KnowledgeBase or on Google either or in my MS Server Core book.....

DKristofferson wrote  Jan 1 2009 at 4:07 AM  
P.S. - I have installed a generic Hyper-V Server install right off of the DVD and then I logged in as administrator. Curiously when I do a "runas /showtrustlevels" I get

C:\Users\administrator>runas /showtrustlevels
The following trust levels are available on your system:
0x20000 (Basic User)
C:\Users\administrator>

Looks like something is missing in the base install....?!?!??

wforney wrote  Jan 2 2009 at 6:01 AM  
This thing's great. Saved me a ton of time. Thanks!

bkitsgmbh wrote  Jan 2 2009 at 1:19 PM  
This is a great script! Saved me an as* full of time in trying to figure out how to get HyperV to do what I need! Thanks John!

LE2Strat wrote  Jan 5 2009 at 7:48 PM  
@jhoward

I can perform NSlookups from both sides and the names resolve perfectly, both fowward and reserve.
Adding my clients name to the host file on the server, and adding the servers name to my clients host file didn't help at all. I still get the same error. (Also, we will have serveral people wanting to remote manage our HyperV servers...we don't want ot keep track of editing host files, it should just work!) Any other ideas?

jhoward wrote  Jan 6 2009 at 7:14 PM  
@LEStrat

Can you email me through my blog (blogs.technet.com/jhoward) the results of ipconfig /all on server and client, the ping results in each direction, and the output of hvremote /show on both client and server. Any additional information about third party firewalls or "unusual" network configuration would be useful if there is anything to report.
Thx
John.

lancefisher wrote  Jan 12 2009 at 12:34 PM  
I'm not sure what I'm doing wrong, but I'm trying to remotely manage Hyper-V Server 2008. Both the server and my workstation on on a workgroup. I've followed the instructions, but when I run hvremote /show it tells me, "1: Found an account with an expired password"

If I scroll up, the error is in the "Contents of Group Distributed COM Users" it shows: "****WARN: This account has an expired password"

I created the account using this command: "net user lance * /expires:never" I can even log in fine as lance, but when I log back in as admin and run the program, I still get the error.

I appreciate all your hard work on blogging and building this tool, John, but I have been pretty disappointed with remote management of Hyper-V. It should be much easier than this to get it working.

jhoward wrote  Jan 12 2009 at 9:26 PM  
@Lance - yes, I found this bug on Friday and am working on getting a 0.5 out there any day. My bad, sorry. Ignore that message. The script was *supposed* to check for expired passwords, but actually doesn't. What that message means is that the password is set to expire at some point in the future and you can safely ignored.
Thanks,
John.

Caveman85 wrote  Jan 19 2009 at 5:33 PM  
Great tool, but I have 1 problem with it...

On a newly installed Hyper-V 2008 machine (only Hyper-V on Server Core), I get this message:

When joined a domain:
***** GetTrustee Failed: DOMAINNAME\USERNAME not found
***** If DOMAINNAME is a domain, you need to be connected to the domain for this to work

When joined a workgroup:
***** GetTrustee Failed: SERVERNAME\USERNAME not found
***** If SERVERNAME is a domain, you need to be connected to the domain for this to work

Can anyone please help me?

jhoward wrote  Jan 20 2009 at 4:07 AM  
@Caveman85 - I've not seen this before. It would imply that connectivity to the domain is not available (in the domain case), but that wouldn't explain the workgroup case. Has there been anything which would indicate a problem joining the domain? (And I assume you did have connectivity to the domain - net view works for example). Have you double and triple checked that the username does in fact exist in the domain (or locally in the workgroup case).
Feel free to email me direct through the email option on my blog at blogs.technet.com/jhoward. Would be helpful if you added output of hvremote /show and any other info you can think of.
Thanks,
John.

Caveman85 wrote  Jan 20 2009 at 11:43 AM  
@jhoward - Hello John, I've send you an email with the settings applied to the server. I hope you can give me some advice. Thanks in advance

Jasbo wrote  Feb 1 2009 at 12:38 AM  
Great tool but I am having an issue or running into a limitation...
I am also having the above mentioned:
***** GetTrustee Failed: DOMAINNAME\USERNAME not found
***** If DOMAINNAME is a domain, you need to be connected to the domain for this to work
error. In my case it works for the domain that the Hyper-V Server belongs to but when I try to add an account from another domain (trust is established) then I get the error.
Thanks in advance for any help

Jasbo wrote  Feb 3 2009 at 2:52 PM  
Just an update on my above mentioned problem. In one of my domains the two domain controllers (both with DNS) were not pointed at each other. After fixing this I was able to add users from the trusted domain...not sure why this happened because the trust itself was working fine. After fixing this I ran into the 'Cannot connect to the RPC service on computer' problem when trying to administer the Hyper-V server from a workstation in the other trusted domain using the Hyper-V Manager. It seems that the Hyper-V Manager is not using the FQDN since after adding the workstationX in domain X to the DNS zone of domain Y they were able to find each other. I should add that this is traversing a Linux firewall using Shorewall from the local network to a lab environment. One more tip for those using the Core Server in domain it is easy enough to add the Computer Management snap in for remote server and manage the users in the Management Console using MMC.

jhoward wrote  Feb 6 2009 at 5:16 AM  
Jasbo - sorry for not replying sooner. I don't tend to check comments added here very often - through my blog goes straight to my inbox (although also filtered as it's not my full time job.... :) ). There is a good chance that Shorewall does the same as most firewalls - they are unable to pass WMI traffic as a general rule (at least that is the case for ISA, and although I'm no ISA expert, that's my general understanding at least) unless they are completely open and able to pass RPC traffic across, effectively acting as a router.... which somewhat defeats the point of having a firewall in the first place. Are you able to confirm that without the FW in between, you do not get any error?

Jasbo wrote  Feb 10 2009 at 3:49 PM  
I have everything running now... On Shorewall I opened up ports 135, 2179, and 49152:65535. This is a lab environment and is not open to the internet so it is not a problem for us. The lab has it's own zone separate from our local network for testing purposes. When we need access from outside of the firewall we use VPN. I have another problem now with some VM's rebooting but I think that is a problem for a different forum :) Thanks

Tegglet wrote  Feb 22 2009 at 7:46 AM  
I agree with those who find this totally confusing especially for those trying virtualisation for the first time. I have just spent a most frustrating Saturday trying to connect my Vista laptop to my Hyper-V server. I am now so confused I am not sure what questions to ask! This seems to me to be a simple job made unnecessarily difficult by code freaks who revel in convoluted commands and processes.

All I want to do is connect my Vista laptop to my Hyper-V server and get some work done!

Rant over!!

As far as I can tell I have implemented the two updates 950050 and 952627 but cannot get a sensible response out of HVRemote. I have been trying to do the stuff shown on page 9 of the document “Hyper-V Remote Management Configuration Script” but cannot get a sensible response; is there a command line buried in the screen dumps somewhere?

Running hvremote /firewallwmimgmt:enable and hvremote /firewallhpervmgmt:enable just produces error messages.

Trying to connect using Hyper-V Manager from the Vista laptop produces nothing.

Can anyone help, preferably using words of one syllable?

jhoward wrote  Feb 22 2009 at 4:46 PM  
Tagglet - It would be far more beneficial if you could post the exact error than saying "just produces error messages". It's impossible to even hazard a guess as to what you're running into. You then say "...from the Vista laptop produces nothing.". I've never seen "nothing" - does it hang, does it give an error? To be honest, the best way forward would be for you to **THROUGH MY BLOG** at http://blogs.technet.com/jhoward use the email option at the top to post back the following five items which will allow diagnosis.

hvremote /show (on the server)
hvremote /show (on the client)
ping server-name -4 (from the client)
ping client-name -4 (from the server)
The message you get in Hyper-V Manager when you attempt to connect to the server.

killervette wrote  Feb 23 2009 at 12:37 AM  
I am having some trouble connecting my Windows 7 Machine to the hyper-v server. I get a RPC service unavailable error. I have run your script on the server and my client. I am in the MSHOME workgroup on both computers. The username and password are the same on both machines. i installed only one update for the hyper-v tools for windows 7. any ideas please??

jhoward wrote  Feb 23 2009 at 3:04 AM  
Killervette - RPC errors (regardless of Win7 or VistaSP1 against R2 or 2008) are almost always DNS related (or secondary that you have a firewall inbetween the client and server). You have to be able to ping *BY NAME* in both directions - from client to server and server to client. Run ipconfig /all on each box, note the IP v4 address. Then try to ping on each box the other box by name (ping <otherbox> -4) and verify it's hitting the right IPv4 address. If not, either edit the hosts file, or fix DNS. More information in the docs for HVRemote (troubleshooting section).

jhoward wrote  Feb 23 2009 at 3:06 AM  
Caveman85- to follow up, I think I now know the problem and have a fix in 0.6, but it's not ready for general consumption. Turns out to be a bug in Windows exposed by HVRemote. Drop me an email through my blog and I'll send you an early version of HVRemote 0.6 which works around the problem, if you need it. Thanks.

JamesA wrote  Feb 24 2009 at 1:25 PM  
Hi John, thanks for the tool. I am in the process of using it to get my test system working.

I have to echo the comments above though, it is truly ridiculous that you had to create this at all! Why does the documentation not show all the extra steps we have to take to make this work? Why is this not in the config menu system already? Come ON microsoft guys, get a grip will you and either update the documents with a step by step guide or make it so we can connect in an easy simple way to configure the server!

Tegglet wrote  Feb 26 2009 at 1:01 PM  
John, thanks for your response. I am new to Windows Server 2008, Windows Vista and to Virtualisation in any form and so I am on an almost vertical learning curve but I do perceive expertise in these areas as fundamental to my future livelihood. There again I always was a glutton for punishment. I tell you this so you have some idea why I may be asking stupid questions or doing stupid things.

I have completely reinstalled the server using the Microsoft Hyper-V Server 2008 download. At a considerable expense to the environment I have printed off your blogs Parts 1-5 (double sided!) and the “How to add the Hyper-V role to Windows Server 2008 Server core machine” and worked through it bit by bit (or byte by byte!). I hope to notice that I am trying desperately to retain a sense of humour in a, to me, very stressed situation.

The environment comprises the server, running Hyper-V Server 2008 fully patched and client running Windows Vista fully patched. Both are in a workgroup called workgroup and are the only machines in that workgroup. Both are on a physically independent network connected to the Internet through a WatchGuard firewall, router, and ADSL modem and both can connect to the Internet. The username Tegglet has been added to the server with the same password as the Vista client. Tegglet already existed on the Client. Tegglet has administrative rights on both machines.

I did not use the hvremote.wsi script as sometimes you learn more doing it the hard way!

As far as I can tell I have done everything to the letter except that at step 12
net localgroup “Distributed COM users” /add TVN-HV01\Tegglet
did not work, I had to type
net localgroup “Distributed COM users” /add Tegglet.
I presume because I am in a workgroup rather than a domain.

When I run “hvremote show” everything corresponds with your screen dumps except the last one on page 9 which is three lines starting “ADMINISTRATOR1\user (S-1-5-21-1233540721 …

This I cannot identify nor can I work out what command is required to do whatever has to be done to create this entry. It appears to relate to permissions so is probably relevant.

When I run Hyper-V Manager on the Vista Client and try to connect to the server I cannot find it using the browse button but I do get some form of connection by typing the name of the server in the box. The server name is displayed in the left hand pane and the message “You might not have permission to perform this task” is displayed in the central pane. If I shut down the server the icon in the LH pane changes to indicate the connection has been lost.

I cannot ping the machines from each other but can ping the workstation from the server if I turn off the windows firewall.

I can find no trace of the “Virtual Machine Management Service” anywhere. I have changed the locale to UK which some say can affect this service although it did run in the first attempt to get all this working.

Sorry this is so long but I have tried to include all relevant information.

I look forward to you response.

Tegglet wrote  Feb 26 2009 at 2:36 PM  
John - I have just realised had not finished! I am finding the instructions a bit of a jigsaw puzzle; having jumped back from Part 3 Step 12B to Part 2 Steps 5,6, and 7 I forgot to jump forward again!

Implementing step 13 results in the error message “Failed to connect to \\TVN-HV01 because “Win32: the RPC Server is unavailable”. I can connect remotely to \\TVN-HV01 services alright and can see that the RPC service is running on the server. On the client machine the RPC service was also running but the RPC Locator service was not running. I started the Locator service to see if this helped; it did not.

Tegglet wrote  Feb 26 2009 at 3:26 PM  
John - Rebooting the server then the client seems to have got me a bit further but when I get to the security tab and select Root\CIMV2 the error message “The program cannot open the required dialog box because it cannot determine whether the computer named “TVN-HV01” is joined to a domain. Close this message and try again.” Closing the message gets another dialog box displaying the message “Unable to display the user selection dialog. The RPC Server is unavailable”

The server claims that the RPC service is running.

jhoward wrote  Feb 26 2009 at 10:54 PM  
Tegglet - to the best of my knowledge, they key in why this is not working is almost certainly your statement that the client and the server are on physically independent networks. WMI and DCOM are not suitable for use through this type of configuration unless you effectively have no firewall and router in between them which would be a very bad security practice for a public facing network. My recommendation in this configuration would be publish the server on the Internet through a TS gateway for access to RDP, or publishing VMConnect and Hyper-V Manager of a TSWeb front end.

Tegglet wrote  Feb 27 2009 at 12:59 AM  
John - We have a misunderstanding here. Both machines are on the same network (192.168.250.11 and 192.168.250.51) that is physically independant of any other network in the office.

jhoward wrote  Feb 28 2009 at 5:01 PM  
Tegglet - fair enough. However, by far the easiest way to allow diagnosis would be for you run run hvremote /show and the ping commands I mentioned earlier and post them to me in an email by using the email option on my blog (rather than this site which truncates long output). These will tell me what I need to know, whether you choose to do manual configuration or configuration through HVRemote.wsf.

Tegglet wrote  Mar 1 2009 at 3:52 PM  
John - I have finally beaten it into submission!!! Being a newbie I found the need to pick ‘n’ mix from the articles a bit confusing and I suspect I have been missing a vital element each time I tried. This time I made up some batch files to run the commands so once included a step was not forgotten the next time.

The worst bit is doing what azman.mmc should do although I thought this was done by running the command:
net localgroup administrators Tegglet /add
from the server.
Did I do it twice or is this something else?

Anyway the virtual machine is now installing and with luck will run to completion.

Vitaly_K wrote  Mar 7 2009 at 8:16 AM  
One more comment from VERY VERY VERY frustrated user. This is not my first aproach (see my previous post earlier in this list) to master Hyper-V server (standalone in workgroup environment). I got lost in multiple branching of your blog posts, it is completely unrealistic to go through all of them! I couldn't get elevated prompt on the server as well as many other points.
Is it really that hard to embed another menu point in the Hyper-V configuration on the server to simply enable remote hyper-v console connections???
Sory John, your script is useles for me.

jhoward wrote  Mar 8 2009 at 4:50 AM  
Vitaly_K - To be up front, it frustrates me more than anyone (and believe me, I feel your pain) that the steps to configure this are difficult. However, it is what it is, and nothing is changing in Windows Server 2008 or R2 (applies equally to Hyper-V server). This is exactly why I've spent literally several hundred near-thankless hours trying to put something together which makes this so much easier without needing to follow those guide. (Those hours don't even include another few hundred working on a seriously revamped version which I haven't yet released to make the entry point to access as close to zero as I can make it. That's for another day though).

My best suggestion would be to persevere - with HVRemote, it really is straight forward and I will provide whatever help anyone asks. Forget the detailed posts - you really don't need to know what HVRemote is doing or how to do it manually unless you want to go through the steps manually.

If you log on with an account which is local administrator on a server core box, you will get an elevated command prompt. It's that simple. I'm guessing you are in a workgroup. Once you log on with a local administrator account, cscript hvremote /add:username will be the first thing you need to do assuming username has already been created as an account on the machine.

I can't help more unless you provide more info on where else you are getting stuck.

Tegglet wrote  Mar 10 2009 at 6:59 AM  
Vitaly_K - I understand your frustration and have gone through the same process. I wanted to do a manual configuration so I had a better idea of what was involved and found it easier to create batch files containing the commands. This ensured that the same process was used for each attempt and nothing was forgotton. Hyper-V Server 2008 as downloaded from the Microsoft site is so quick and easy to install that I just reinstalled and started again after making whatever corrections or additions to the batch files that were required. One thing I did find was that for a Workgtoup environment an entry in the Host file is required! How's that for a rave from the grave! To me this was not clear from the articles but as soon as I added the entry everything lept into life.
Hope this helps.

fabriek wrote  Mar 12 2009 at 11:38 PM  
Yesterday received my new test server after one frustrating day I searched and found John's hvremote script and exelent documentation, tanx. HyperV server and Vista remote management client works fine in a workgroup on my new test server. I had also like Tegglet to add the server name in the hosts file on the client and on the HyperV server command prompt I added a user name (net user "name" *) (password must include 1 capital and 1 digit?) that is the same on the client and server. Tip : Don't make any mistakes and don't forget to reboot the client and server after the changes, this took me 2 hours extra time.

Shivaresear wrote  Mar 13 2009 at 2:16 PM  
Great Tool!! I am able to RDP Connect to a VM hosted on a Hyper-V Server with a user other than Administrator

Fred_boll wrote  Mar 18 2009 at 2:48 AM  
Tegglet
Would you be willing to share your batch files?

lbueno wrote  Apr 1 2009 at 9:22 PM  
John, I just want to say thank you for this tool... I just wished I had founded sooner... but, I tried it and it worked just fine...The only issue I ran was modifying the host file.. in Vista or Win08 you can't modified the hosts file. one has to first edit the file and save it somewhere else then copy the file to the correct path (%systemroot%\system32\drivers\etc).. So, I automated the process a bit more. How can I post my script so that others can use it? I automate the client and Server process...

Thanks

lbueno wrote  Apr 1 2009 at 10:02 PM  
John, I just created a new post http://code.msdn.microsoft.com/Hvautomated for those that want to take a look at the script I created.

thanks
LBueno

jaxoson wrote  Apr 17 2009 at 8:10 PM  
For those still having problems, here's one more thing for you to try: Make sure you can ping the unqualified name of the server; the fully-qualified name wasn't good enough, at least not in my case.

I was trying to connect to vmserver.otherdomain.com from a computer on mydomain.com, and kept getting RPC errors. Eventually, I ended up adding an A record to mydomain.com's DNS server for "vmserver" (i.e., vmserver.mydomain.com would now resolve to the same IP as vmserver.otherdomain.com). This allowed me to successfully ping "vmserver" using the unqualified server name. Once I did that, I was able to connect using the unqualified server name in the management tool.

And thanks for the excellent tool John! It was definitely helpful.

jon80 wrote  May 1 2009 at 5:51 PM  
I have a bit of a problem, since I just installed the free version of Hyper-V, and, I could not find any UI options for installing my first virtual machine. I am also planning to install Virtual Server 2005 R2 and load some existing virtual machines, although I'm aware that the performance may not be optimal for these machines.

So how do I get that screen where I can install virtual machines? Remotely? Locally?

I mainly use WinXP but I also have a Vista machine around, although I tried to install KB952627 unsuccessfully because Vista rejected it.

jhoward wrote  May 5 2009 at 3:22 AM  
jon80 - the remote management tools are only available for Vista SP1 (you have the right KB) or a full install of Windows Server 2008. For the rejection case on Vista, which SKU of Vista are you running, and are you sure you are attempting to install the update for the correct architecture and have SP1 installed?
Thanks,
John.

RandallKent wrote  May 18 2009 at 4:02 PM  
Great tool, thanks!

dlsteelejr wrote  May 18 2009 at 10:48 PM  
I've logged into my server core 2008 server both as the domain administrator and as the local administrator. When I try the script, I still get the "Must run from an elevated command prompt for all sever operations" message. My understanding is that all command prompts in server core are already elevated. I have no idea how to get an elevated command prompt from a nonelevated one.

dlsteelejr wrote  May 20 2009 at 11:40 AM  
I just wanted to say that I figured out my problem mention (just above). There is at least one time you don't have elevated command prompts in server core. If the server has UAC turned on, then the prompts are no longer elevated. This was happening to me because I joined the server core installation to a windows domain that had a group policy enabling UAC on all devices. Hope this saves someone some trouble - it sure caused me a great deal...

Script works fine for me now. I appreciate all the work that was put into it. I just wish it wasn't necessary...

jhoward wrote  May 20 2009 at 5:44 PM  
dlsteelejr - that's good to know, thanks. I was asking around here, and was still trying to find out why that would have been the case. Certainly something I should include in the documentation some time (or enhance the error message).
Cheers,
John.

copdips wrote  Sep 17 2009 at 1:07 PM  
thanks a lot !
1. great for workgroup(client)->workgroup(server) by hrremote;
2. upset for domain(client)->workgroup(server) by hrremote, there's no firewall on the gateway, still cannot connect, error: "You do not have the required permission to complete this task. ...", i read the part 5 of your blog. Finnally, i used "netsh advfirewall set allprofiles state off" to disable completely the firewall on the Hyper-V R2 server, it passed, but once i shift to "state on", the same error retruned.

So problem about the firewall on Hyper-V R2?
(my client is windows server 2008 standard with SP2)

frankbasti wrote  Sep 29 2009 at 7:54 PM  
How can i install hvremote on a core install???
When i setup hyper-v everything worked great!
I was able to use hyper-v manager from home to configure my server.

Then i took the server to a colo facility.
In Server 2008 R2 core i setup the IP address that the colo gave me.
I went home.
I have RDP access to the core. Its a cmd line and some options to change the ip.

But when i try to connect with Hyper-V manager on my desktop i get the error cannot connect to the RPC service on computer "computer name" make sure RPC service is running.

I need to get Hyper-V manager to run so i can configure my VHD's with appropritate IP addresses.

I cannot get HV remote installed on the core.
How can i download it form command prompt?

michaelvirture wrote  Oct 8 2009 at 10:55 AM  
download hvremote to your admin station, map with explorer the partition on your hyper-v where you want to place hvremote into ( for example: \\<ip-of-hyper-v>\c$ - with the host admin credentials) and copy the file.
then you can start hvremote via the remote desktop (you have to activate rdp on the hyper-v prior to that)
It works fine for me.

a worthy hint: the remote management via the hyper-v mmc-snap-in work only if you enter the dns-name of the hyper-v host in the connection dialog. The IP doent' work (for me), so be sure, that yout client can resolve the name of the hostor put the name in the host file.

mesdrg wrote  Oct 8 2009 at 4:50 PM  
Wont run for me. I get "Access is denied" When attempting to run hvremote.wsf from the Hyper-v server even when logged in as a domain admin.

I have to tell you, this is an EPIC FAIL For Hyper-V. I've already spent 2 DAYS! trying to simply manage the hyper-v server. I took 3 minutes for me to install XenCenter and manager Xen! ON XP!. EPIC FRICKING FAIL!!!!!!!!!!!!!! M$

jhoward wrote  Oct 9 2009 at 7:02 PM  
mesdrg - In the documentation, troubleshooting section, point 1 pasted below:

"“Access Denied” when running HVRemote. This is a Windows security mechanism. On the machine where you downloaded HVRemote, in Windows Explorer, right-click on the file and select properties. On the general tab at the bottom of the page, there will be a message saying “Security: This file came from another computer and might be blocked to help protect this computer”. To the right of that is an Unblock button. You need to click that to allow HVRemote to work."

Thanks,
John.

sandve wrote  Oct 9 2009 at 10:46 PM  
I agree with mesdrg sentiment. John has done great work with this script, but he should not have had to create a script at all. MS neglected administrative niceties in their rush to market.

3phatladies wrote  Oct 11 2009 at 2:35 AM  
Almost there...I agree though..it's been quite frustrating so far...I can ping from the HyperV server but cannot ping to the Hyper V server from my win2k8r2 workstaion running hyperv manager so essentially i cannot connect to it!!!!
I've gone though all the steps without any errors so i cannot see it being a firewall issue and as I can ping from the hyper v standalone i'm guessing it's not a dns problem...Unless i can figure it out today I'll be reverting back to esxi...so much easier and faster...Just wanted to try MS effort though.

3phatladies wrote  Oct 11 2009 at 3:03 AM  
okay i'm now guessing it is a firewall issue although I've gone through all the steps outlined in this forum and also the following too: http://msmvps.com/blogs/xperts64/archive/2008/10/22/configuring-hyper-v-server-for-remote-management.aspx#comments

with no errors but on trying to connect to the server form the management console I've typed in the ip address where it asks for the admin credentials then i click ok twice then after 5 seconds a popup tells me that i do not have the required permission to complete this task???? so do i try a reinstall and go throught this again?

michaelvirture wrote  Oct 23 2009 at 8:44 AM  
Try with the host-name, not the IP. If you can't use DNS, put the host-name in the local hosts file of your admin station. I've had the same issue: with IP doesn't work, with name resolution it worked perfectly.

NitaJD wrote  Oct 28 2009 at 9:47 PM  
Call me a Hyper-V convert from VMWare now that I'll finally be able to import my VMs! Thanks John, this tool rocks! Found that last 'issue', thank you very much due to being dual-boot with another IP registering the hostname in DNS. Your tool pointed that out - along, with the DCOM, cmdkey add credentials, WMI perms, and on and on - compared to VMWare!

Anyway, I was up and running in 10 minutes once I found your tool which took me about 2 days...

mastapat11 wrote  Nov 6 2009 at 5:03 PM  
OMG!! i'm at my wit's end. after 3 days of f**ing around with this, i thought i had it all working. vista's mmc could see the server finally (without ha ving to disable the server firewall). so, i try to create a new virtual machine. everything seems to be going well, then i click finish and..."blah, bla h, you don't have rights to open this ISO file...".
makes no sense. i can traverse thru the network, find an iso to install the vm, and select it. then when its trying to make the vm, hyper-v spazzes out o n me. FRAK!!!
what do i do now? i'm using hyper-v server 2008 r2 (not the core or full installation). & vista sp2.
PS. I tried to install RSAT (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d) on win7 RC and the .msu
said it wasn't "right" for my system. what gives? yes, i used the 32bit sw on my 32bit os.
thanks for any help :)

jhoward wrote  Nov 10 2009 at 7:08 PM  
mastapat11: Where is the ISO located? Locally on the server, or on a network share (from the servers perspective). If you are in a workgroup, you will not be able to manage a VMs configuration to add an ISO on a network share. This is because the server where the ISO is located needs to have permissions for the machine account of the Hyper-V box added (machine$), but in a workgroup, the server hosting the ISO will not know anything about the machine account of the Hyper-V box.

If you are in a domain, again you need to add the machine account (domain\machine$) with permissions to the share. If you are managing *locally* on the Hyper-V box (which would have to be through script), you can add the ISO to the configuration. If you are managing *remotely* from the Hyper-V box, you need to configurre constrained delegation in AD too.

RSAT on the download site will only install on Windows 7 RTM, not on any pre-release versions.
Thanks,
John.

, but it can be done locally on the server.

asbarrus wrote  Nov 15 2009 at 7:20 AM  
Hello,

I have some thoughts to share, and am also asking for help.
First, the hvremote script seems to succeed on both the client and the server, as follows:

On the windows 7 client:

C:\Users\aaronbarrus.AARONBA-VM7-LT\Downloads>cscript hvremote.wsf /show /target:win2k-vmhost

1: fails, I don't have it in DNS. But I put it in the hosts file, and I can ping it (see below)

2: - ping attempt (ping -4 -n -1 win2k-vmhost)

Pinging win2k-vmhost [10.1.4.219] with 32 bytes of data:
Request timed out.

Ping statistics for 10.1.4.219:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~


3: - Connect to root\cimv2 WMI namespace
PASS - Connection established

4: - Connect to root\virtualization WMI namespace
PASS - Connection established

5: - Simple query to root\cimv2 WMI namespace
PASS - Simple query succeeded

6: - Simple query to root\virtualization WMI namespace
PASS - Simple query succeeded
- 1 computer system(s) located

7: - Async notification query to root\virtualization WMI namespace
PASS - Async notification query succeeded

INFO: Are running the latest version

on the windows hyper-v 2008 R2 server

Test 2
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Pinging aaronba-vm7-lt [10.1.4.128] with 32 bytes of data:
Reply from 10.1.4.128: bytes=32 time<1ms TTL=128

Ping statistics for 10.1.4.128:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
INFO: Are running the latest version

Again, no DNS for test 1, but it's in the hosts file for test2.

I have been able to map drives back and forth between both machines (which is how I got hvremote.wsf onto the 2k8 hyper-v box). they both resolve each other for pings. and all tests succeed between both machines.

On my win7 box with rsat and hyper-v mmc installed, both of those tools fail. server manager says "Server Manager cannot connect to win2k-vmhost. Click Retry to try to connect again.", then it goes on to tell me to use WinRM blah blah blah. Hyper-V Manager actually lets me connect, but if I try to create a virtual machine, it fails and tells me: "Cannot connect to the RPC service on computer '10.1.4.219'. Make sure your RPC service is running."

I am familiar with authentication protocols that MS uses, and run a DC at work, and even at home for my household network (because I can and its fun). All ports are open between these boxes, and they're on the same subnet, in the same workgroup, using the same account and same password. Both machines can perform authentication to each other for file & print. But nothing I can find will convince the MMC snapins to talk to the win2k hyper-v server.

I have used VMWare Server and VMWare ESX for years, and they work (sort-of). VMWare Server has angered me lately by not releasing patches on time and not responding to major outages experienced by large customer bases. I have a few servers that I planned to set up as hosts, and thought I might try hyper-v. But I've spent an entire day reading all documentation I can find (is there any, other than marketing?!), and have found sketchy information at best. How does the rest of the world actually use this product? Is there a customer base? I've found little-to-no information on the entire product-line. This is an R2--shouldn't there be official documentation downloadable from MS somewhere? The two-page deployment guide is a joke. The quick-setup guide is a regurgitation of the onscreen instructions when you install it. I already had networking configured, users added, RDP established, and the snapins installed on my win7 before I ventured to find instructions. I never found anything that went beyond what i've already done. Not only that, but there is absolutely no documentation anywhere saying that users need to be added to roles or permissions on the hyper-v server in order to be allowed to respond to remote management requests by clients. I only guessed at that by reading your code. My best "documentation" so far is the actual code in your .wsf file, which I read thoroughly as best I could, but still have no idea where to proceed.

Am I missing the 200+ page manual entitled "Setup and Deployment Guide for Hyper-V Server 2008 R2"? Is the entire world missing it? Is there an actual customer who is actually using this product in a real-life deployed scenario? Or is this product just slideshows and presentations and ROI calculators and advertisements for how cool it would be if we told people how to use it?

As much as I was hoping for something more cool, and as excited as i was to run the virtualization on bare-metal, I'm headed back to vmware to continue that fight on redhat. I guess I have to run unpatched servers with outdated kernels to keep it compatible with vmware's products. At least they're straight-forward and work out-of-the-box. I don't want my virtualization environment to require me to depend on all sorts of haphazard authentication mechanisms full of what if's and exceptions and logs that go nowhere and toolkits and snapins that GPF or fail without saying why. The idea of running virtualization on bare metal is that it's simple--where nothing can go wrong. Creating a virtualized environment really doesn't require a lot of options and management. But it seems that this has gone in the wrong direction. If I actually got this working, I'm not sure I would trust it in a production environment. Since when did remotely administering a virtual machine running busybox or centos or anything else in the world require me to authenticate to a DC? What if I actually had a server down, and had to submit one tiny little command to bring it back up, but I had changed my password an hour earlier on a DC that hadn't replicated yet? What do I say when the president is screaming about our ecommerce system being down, or our VOIP server not transferring calls? should I say: "I'm not sure why I can't talk to the server... maybe it's down? maybe it's bluescreened? maybe it's busy replicating? Maybe I'll wait fifteen minutes and try again? Maybe I'll open a ticket with microsoft? Maybe we'll be back up in about twenty-four hours? Yeah, go ahead and send the production team home, I have no idea what's wrong, so i have no idea how long it'll take to fix..."

I must be missing something, right?

wickedwaring wrote  Dec 4 2009 at 1:27 PM  
Thanks for the tool AND "michaelvirture", I was using ip address!!

"Try with the host-name, not the IP. If you can't use DNS, put the host-name in the local hosts file of your admin station. I've had the same issue: with IP doesn't work, with name resolution it worked perfectly"

KvChaos wrote  Dec 16 2009 at 8:40 AM  
GOT PWNED IN TEST3!
I hope you can assist me on this, since even your documentation says you haven't encounter that before. -.-
This remote management crap is depressing. Btw, I'm using Hyper-V Server Core & Win7.

jhoward wrote  Dec 17 2009 at 5:16 AM  
KvChaos - and the specifics of the problem I haven't encountered before are......?

KvChaos wrote  Dec 21 2009 at 8:58 AM  
Failing test 3? -.-
My simple query failed. Using Hyper-V(domain) and Win7 (standalone).

jhoward wrote  Dec 26 2009 at 6:17 PM  
KvChaos - and the *FULL* output from *BOTH* machines ie hvremote /show /othermachinename? Impossible to diagnose from what you've provided... I will be away though until next year.

jagginess wrote  Dec 30 2009 at 12:17 PM  
Anybody knows 100% for sure if upgrading the 1.0 Schema on the Server's(W2008r2) Authorization Manager to 2.0 Schema still/or is compatible to Vista's RSAT ?

"c:\programdata\microsoft\windows\hyper-v\initialstore.xml" lists under the .xml properties from the Authorization manager. On that properties window there's an upgrade button and a beware text saying that the upgrade is a one-way operation. Any reply greatly appreciated, thanks..

PaulGa wrote  Fri at 1:00 PM  
Thanks for the tool and everyone's comments. I was trying the lightest of installs to test the Windows 2008 Server R2 evaluation Virtual hard Disk, so all I wanted was a Hyper-V only server and a Windows 7 laptop for remote admin. I only had two main problems....
1) The MSU update that provides the Hyper-V Manager for Windows 7 Professional *won't install* on the Windows 7 Release Candidate. I needed a commercial version.
2) When only following the instructions in the Hyper-V download's instructions I gor the 'RPC' errors described above. Resolved by using the HVRemore.wsf tool and adding IP address for both client and server to the local HOSTS files on the client and server.
That's all. It seems to work.
Thanks
Paul G

Updating...
Page view tracker