Tag: Hyper-V

Making a serial port available on Hyper-V VMs

I have been looking for a way to make a serial port available on one of my VMs running on Hyper-V. Hyper-V exposes serial ports as named pipes to the VM. I found this program PipeToCom that runs a service on the VM which creates as many named pipe serial ports as you want.

It can be downloaded here: https://github.com/albertjan/PipeToCom


Tags:


Installing drivers on Windows 2012 Server Core

I needed to install a USB device on my HyperV host for which drivers had to be installed. Here’s how to do it:

  1. First copy the drivers to a temporary folder on the server core host. In my case C:\Install\FTDI.
  2. Open a command prompt on the server core host.
  3. In the directory with the drivers type the following command: pnputil -i -a *.inf
  4. As you can see the drivers have been installed successfully:

    Microsoft PnP Utility
    Processing inf :            ftdibus.inf
    Successfully installed the driver on a device on the system.
    Driver package added successfully.
    Published name :            oem2.inf
    Processing inf :            ftdiport.inf
    Successfully installed the driver on a device on the system.
    Driver package added successfully.
    Published name :            oem3.inf
    Total attempted:              2
    Number successfully imported: 2

    Microsoft PnP Utility
    Processing inf :            ftdibus.infSuccessfully installed the driver on a device on the system.Driver package added successfully.Published name :            oem2.inf
    Processing inf :            ftdiport.infSuccessfully installed the driver on a device on the system.Driver package added successfully.Published name :            oem3.inf

    Total attempted:              2Number successfully imported: 2

  5. Now connect the USB device and check whether it is recognized correctly in the system event log:
    Driver Management concluded the process to install driver ftdiport.inf_amd64_66f12493ff5adfb9\ftdiport.inf for Device Instance ID FTDIBUS\VID_0403+PID_6001+AE01CSYUA\0000 with the following status: 0x0.



Remote management of a standalone Hyper-V 2012 Server

This post mainly focuses on managing a standalone Hyper-V 2012 server with MMC tools. Hyper-V server is basically a server core installation. Server core can be managed using the command line through a remote desktop session but most tasks can be done remotely using the standard (MMC based) management tools.

  1. Since this is a standalone server we have to assume there is no DNS entry for this server. So first we need to add an entry in the hosts file on the workstation from where we want to manage the HyperV server.Edit the C:\windows\system32\drivers\etc\hosts file (you may need to give yourself permissions to edit the file).
    Add the ip address and name of the HyperV server and save the hosts file.
  2. Now we need to adjust the firewall on the Hyper-V server and the remote computer for remote administration to work.On the server execute the following command:netsh advfirewall firewall set rule group=”remote administration” new enable=yesYou may receive the following error: “No rules match the specified criteria”. The cause of the error seems to be that the “remote administration group” doesn’t exist. In this case run the following command first. This will create the rule group:

    netsh firewall set service type=remoteadmin mode=enable

    You will receive the following warning but the command is successful:IMPORTANT: Command executed successfully.
    However, “netsh firewall” is deprecated;
    use “netsh advfirewall firewall” instead.
    For more information on using “netsh advfirewall firewall” commands
    instead of “netsh firewall”, see KB article 947709
    at http://go.microsoft.com/fwlink/?linkid=121488

    Now repeat the command and it will succeed:

    netsh advfirewall firewall set rule group=”remote administration” new enable=yes

    Updated 3 rule(s).

    Ok.

  3. To allow access to disk management remotely run the following command on the server and the remote computer:

    netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes
  4. Since the Hyper-V Server is not a member of a domain, establish alternate credentials to use to connect to the Hyper-V server by typing the following command at a command prompt on the remote computer:

    cmdkey /add:<ServerName> /user:<UserName> /pass:<password>
  5. In order to be able to use Server Manager we need to modify the TrustedHosts list for the WinRM client on the remote computer:

    Set-Item WSMAN:\localhost\client\trustedhosts -value YOURSERVERNAME -concatenate

Now you should be able to administer Hyper-V remotely using MMC based management tools. You can download the RSAT (remote server administration tools) for your client OS here: http://www.microsoft.com/en-us/download/search.aspx?q=remote+server+administration+tools

 


Tags: