Jump to content
RESET Forums (homeservershow.com)

Hyper-V on Windows Server Essentials 2012 R2 Question


Recommended Posts

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

  • Jason

    19

  • Drashna Jaelre

    14

  • jmwills

    11

  • ikon

    7

Top Posters In This Topic

Popular Posts

You can interact with the VM's via powershell.   For example, I use the Start-VM command to start them up at startup.  Here is the command I use.   C:\Windows\System32\WindowsPowerShell\v1.0\power

Thanks. I used Disk2Vhd to create a VHD disk of my VMWare Workstation VM then added it to a new Hyper-V VM. Booted right up then uninstalled VMWare Tools and installed Integration Services. It's a Wi

For anyone looking to remotely manage their Hyper-V Manager on another machine (i.e. WSE12R2 server), this is the best-kept secret.  Also supported by Microsoft.  Just ran it on both my server and cli

There is an old tool out there called "Remote Desktop Connection Manager" where you can create a grouping of similar servers or client machines and have all of them controlled by once central logon account.  Works on all Windows machines with RDP enabled.

 

http://www.microsoft.com/en-us/download/details.aspx?id=44989

 

It is very similar to vSphere, just not quite as rich or feature filled.

Link to post
Share on other sites

I haven't tried it but there must be a way to shut down VMs using the Command Line. At the very least, I'm certain PowerShell can do it (calling jmwills, calling jmwills ;)). Assuming that's the case, you should be able to build a command script that will shut down the VMs and the server, making sure the VMs are shut down before shutting the server down.

 

MS has had issues with this kind of thing in the past. I recall a warning the class got when I attended a course on MS Exchange 5.5. We were told, very emphatically, to never shut down or reboot the server without first shutting down Exchange Server. Failure to do so would cause the shutdown to take hours. It was also emphatically stated that the server must never be crash-shutdown (hold the power button 5 seconds) in that situation, at least not if there was any hope of having a functioning Exchange Server after reboot.

Link to post
Share on other sites
GavinCampbell

I haven't tried it but there must be a way to shut down VMs using the Command Line. At the very least, I'm certain PowerShell can do it (calling jmwills, calling jmwills ;)). Assuming that's the case, you should be able to build a command script that will shut down the VMs and the server, making sure the VMs are shut down before shutting the server down.

 

MS has had issues with this kind of thing in the past. I recall a warning the class got when I attended a course on MS Exchange 5.5. We were told, very emphatically, to never shut down or reboot the server without first shutting down Exchange Server. Failure to do so would cause the shutdown to take hours. It was also emphatically stated that the server must never be crash-shutdown (hold the power button 5 seconds) in that situation, at least not if there was any hope of having a functioning Exchange Server after reboot.

 

You can interact with the VM's via powershell.

 

For example, I use the Start-VM command to start them up at startup.  Here is the command I use.

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "& {Start-VM -Name [VMName]}"

 

The Stop-VM cmdlet can be used to either shut down, turn off or save the vm.  Here are the details for the parameters.

 

http://technet.microsoft.com/en-us/library/hh848468.aspx

 

Shouldn't be too hard to do.

  • Like 2
Link to post
Share on other sites

Thanks GavinCampbell. I couldn't imagine it would be too difficult. It should be possible to create a shortcut, on the Desktop perhaps, that can be run from a RDP session, to a PowerShell script. It should also be pretty easy to create a scheduled task to run the script at any desired day & time.

Link to post
Share on other sites
Drashna Jaelre

For anyone looking to remotely manage their Hyper-V Manager on another machine (i.e. WSE12R2 server), this is the best-kept secret.  Also supported by Microsoft.  Just ran it on both my server and client laptop and was up and running in seconds:

 

https://code.msdn.microsoft.com/HVRemote

I cheat.  I use a domain controller (I also cheat and use HyperV on essentials).

And I've set up a group policy to allow remote management on my systems.

 

But yeah, HVRemote is awesome. ;)

 

 

You can interact with the VM's via powershell.

 

For example, I use the Start-VM command to start them up at startup.  Here is the command I use.

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "& {Start-VM -Name [VMName]}"

 

The Stop-VM cmdlet can be used to either shut down, turn off or save the vm.  Here are the details for the parameters.

 

http://technet.microsoft.com/en-us/library/hh848468.aspx

 

Shouldn't be too hard to do.

Screw just for VMs, PowerShell is freaking fantastic. It is worth learning, especially if you like scripting things. Just beyond powerful.

Link to post
Share on other sites
GavinCampbell

Screw just for VMs, PowerShell is freaking fantastic. It is worth learning, especially if you like scripting things. Just beyond powerful.

 

Totally agree.  I'm registered for a 5 day Powershell programming course in a few weeks.  Excited to finally get my hands dirty with it.  Just haven't had the time until now.

 

Boss mainly wants me to figure out how we can utilize it with our SCCM infrastructure.  That's going to be fun.

Link to post
Share on other sites
Drashna Jaelre

Totally agree.  I'm registered for a 5 day Powershell programming course in a few weeks.  Excited to finally get my hands dirty with it.  Just haven't had the time until now.

 

Boss mainly wants me to figure out how we can utilize it with our SCCM infrastructure.  That's going to be fun.

I've been playing with it to automate installation and configuration for pre-built systems. It's absolutely fantastic, and it can do so much. Totally worth playing with!

 

 

Also, enabling remote connection for PowerShell is awesome as well. Much like telnet/ssh for WIndows. :)

Link to post
Share on other sites

BTW - I just initiated a manual shutdown of the host OS with both VMs active and it took 1m27s the first time to complete successfully. The second test was only 1m10s. Both of which are FAST for this system. Just glad they worked and didn't hang up.

Can't help but wonder whether these issues were also caused by bad RAM. Since replacing my bad DIMM, neither this nor backup corruption has occurred. Knock on wood.

Link to post
Share on other sites

Can anyone help me with a virtual switch problem?

 

I'm running Windows Server 2012 R2 Essentials on a HP Gen8 Microserver. I'm running two Hyper-V virtual machines, one Windows 8.1 and one Debian. They are connected by an external virtual switch with the default settings. It uses one of the two NICs on the Gen8 - the same problem occurs whichever I choose. "Allow management operating system to share this network adapter" is checked - I unchecked it once and promptly lost all remote connection to my server (I was happy to have iLO that day). No SR-IOV or anything else fancy.

 

The VMs work just fine except every so often (roughly every two weeks) they both lose all connection to the network. If I delete the virtual switch, create a new one with the same settings, and connect the VMs to the new switch, all is well again. But the workaround is not very satisfactory as I have to shutdown both VMs to do it, not to mention my VMs have no network connection for some unspecified period of time until I notice the problem.

 

Does anyone have any suggestions as to what might be causing this? I assume it is a host problem as it always affects both VMs simultaneously. Could it be a network driver problem? Or is there something in the settings of Hyper-V itself that can fix it?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...