Archive for the ‘Hyper-V’ Category

General:

  • install file server role: file management from other machine using \\servername\c$
    Import-Module Servermanager
    get-windowsfeature *
    add-windowsfeature fs-fileserver
  • blue console sconfig.cmd offers only Log Off or Shut Down / Restart.
    But pressing ctrl+alt+del offers Lock to lock the screen
  • install corefig to get some graphical management tools (docs here)
    set powershell to remote signed and unblock corefig ps* files:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
    Unblock-File -Path path_to_corefig\*.ps*
  • to open ports run powershell command
    New-NetFirewallRule -protocol tcp -localport 3551 -direction inbound -action allow -displayname apcupsd
    (rule is gets removed by Remove-NetFirewallRulle -displayname apcupsd)
  • to forward ports to another host run netsh command
    netsh interface portproxy add v4tov4 listenport=1234 listenaddress=10.0.1.234 connectport=5678 connectaddress=10.0.5.678
    (netsh interface portproxy delete v4tov4 listenport=1234 listenaddress=10.0.1.234)
  • to display id of a vm use powershell (reference):
    get-vm
    $vm=get-vm -name your_vm_name
    $vm.vmid
  • hyperv vm’s can be managed by 5nine Manager (free edition for up to 6(? only seen 2) local vm’s)
    or use ProHVM by probus-it.com (Standard edition is free; key file by email after registration; for multiple servers multiple key files can be obtained; works with local and remote hosts!)
  • this tool runs on hyper v server and includes a vm console
    (which may be put into HKLU/…/Run; fetch cmd args using process explorer)
  • to install drivers from inf files use
    pnputil -i -a path_to_inf_file.inf
  • some server 2012 core specific help for powershell is here

Server 2008r2 sp1 as guest vm:

  • easily moved from hard disk to vhdx by running disk2vhd tool inside physical 2008r2 server
    with a network share as target
  • important, if server 2008r2 includes hyper v role: bluescreen when hyper v 2012 guest tools are installed:
    Boot 2008r2 inside vm; use server manager to uninstall hyper-v role (needs 2 or more reboots); if server manager confirms successful removal of hyper v role, then install 2012 hyper v guest tools; insert hyperv guest iso using hyper v manager (5nine).

Special note for mainboard with adaptec softraid for onboard ata disks

  • server 2012r2 can be installed on such a raid drive, if sata raid driver is installed from usb during installation (e.g for amd boards with sp5100 chip)
  • adaptec storage manager runs inside hyper v 2012r2; email notifications can be configured; manual.
    (smtp access by ssl/tls via stunnel; stunnel -install configures stunnel as auto starting service; config: client=yes accept=127.0.0.1:25 connect=yourmailserver.tld:465)
  • smartctl of smartmontools seems to be unable to look into physical drives of this adaptec softraid devices (but possible with intel softraid)