Hyper V Server 2019 Sd Card

The Hyper-V Amigos ride again! In this episode (19) we discuss some testing we are doing to create high performant backup targets with Storage Spaces in Windows Server 2019. We’re experimenting with stand-alone Mirror Accelerated Parity with SSDs in the performance tier and HDDs in the capacity tier on a backup target. My 'Server' is running Hyper-V Server 2012. I am using the built in hyper-v MSC console on Windows 8.1 to control the server. The virtual client hosted on the 2012 server is Windows 8.1 as well. In this case, I can double click the VM in the hyper-v console and get any resolution I want, including 1920X1080 without using RDP.

This article will take you through installing Windows Server 2019 and then adding Hyper-V. Already installed Windows Server 2019? Skip to Hyper-V installation. A Note on Hyper-V Server (Updated June 17th, 2019) After a few initial missteps, Microsoft has finally released the gold bits for Windows Server 2019. Applies To: Microsoft Hyper-V Server 2016, Windows Server 2016, Microsoft Hyper-V Server 2019, Windows Server 2019. A basic understanding of networking in Hyper-V helps you plan networking for virtual machines. This article also covers some networking considerations when using live migration and when using Hyper-V with other server features. New Dell PowerEdge R610, which has an internal USB port and an internal SD card slot - right on the motherboard.-I have downloaded Hyper-V Server (950MB.ISO file) and want to install it.-Dell gives you the option to ship with the embedded hypervisor, but we didn't choose that option, because they didn't include Hyper-V (only Xen and VMWare).

-->

Applies to: Microsoft Hyper-V Server 2016, Windows Server 2016, Windows Server 2019, Microsoft Hyper-V Server 2019

Starting with Windows Server 2016, you can use Discrete Device Assignment, or DDA, to pass an entire PCIe Device into a VM. This will allow high performance access to devices like NVMe storage or Graphics Cards from within a VM while being able to leverage the devices native drivers. Please visit the Plan for Deploying Devices using Discrete Device Assignment for more details on which devices work, what are the possible security implications, etc.

There are three steps to using a device with Discrete Device Assignment:

  • Configure the VM for Discrete Device Assignment
  • Dismount the Device from the Host Partition
  • Assigning the Device to the Guest VM

All command can be executed on the Host on a Windows PowerShell console as an Administrator.

Configure the VM for DDA

Discrete Device Assignment imposes some restrictions to the VMs and the following step needs to be taken.

  1. Configure the “Automatic Stop Action” of a VM to TurnOff by executing

Some Additional VM preparation is required for Graphics Devices

Some hardware performs better if the VM in configured in a certain way. For details on whether or not you need the following configurations for your hardware, please reach out to the hardware vendor. Additional details can be found on Plan for Deploying Devices using Discrete Device Assignment and on this blog post.

  1. Enable Write-Combining on the CPU
  2. Configure the 32 bit MMIO space
  3. Configure greater than 32 bit MMIO space

    Tip

    The MMIO space values above are reasonable values to set for experimenting with a single GPU. If after starting the VM, the device is reporting an error relating to not enough resources, you'll likely need to modify these values. Consult Plan for Deploying Devices using Discrete Device Assignment to learn how to precisely calculate MMIO requirements.

Dismount the Device from the Host Partition

Optional - Install the Partitioning Driver

Discrete Device Assignment provide hardware venders the ability to provide a security mitigation driver with their devices. Note that this driver is not the same as the device driver that will be installed in the guest VM. It's up to the hardware vendor's discretion to provide this driver, however, if they do provide it, please install it prior to dismounting the device from the host partition. Please reach out to the hardware vendor for more information on if they have a mitigation driver

Hyper V Server 2019 Sd Card

If no Partitioning driver is provided, during dismount you must use the -force option to bypass the security warning. Please read more about the security implications of doing this on Plan for Deploying Devices using Discrete Device Assignment.

Locating the Device's Location Path

The PCI Location path is required to dismount and mount the device from the Host. An example location path looks like the following: 'PCIROOT(20)#PCI(0300)#PCI(0000)#PCI(0800)#PCI(0000)'. More details on located the Location Path can be found here: Plan for Deploying Devices using Discrete Device Assignment.

Disable the Device

Using Device Manager or PowerShell, ensure the device is “disabled.”

Dismount the Device

Server

Depending on if the vendor provided a mitigation driver, you'll either need to use the “-force” option or not.

  • If a Mitigation Driver was installed
  • If a Mitigation Driver was not installed

Assigning the Device to the Guest VM

The final step is to tell Hyper-V that a VM should have access to the device. In addition to the location path found above, you'll need to know the name of the vm.

What's Next

After a device is successfully mounted in a VM, you're now able to start that VM and interact with the device as you normally would if you were running on a bare metal system. This means that you're now able to install the Hardware Vendor's drivers in the VM and applications will be able to see that hardware present. You can verify this by opening device manager in the Guest VM and seeing that the hardware now shows up.

Removing a Device and Returning it to the Host

If you want to return he device back to its original state, you will need to stop the VM and issue the following:

You can then re-enable the device in device manager and the host operating system will be able to interact with the device again.

Example

Mounting a GPU to a VM

In this example we use PowerShell to configure a VM named “ddatest1” to take the first GPU available by the manufacturer NVIDIA and assign it into the VM.

Troubleshooting

If you've passed a GPU into a VM but Remote Desktop or an application isn't recognizing the GPU, check for the following common issues:

  • Make sure you've installed the most recent version of the GPU vendor's supported driver and that the driver isn't reporting errors by checking the device state in Device Manager.
  • Make sure your device has enough MMIO space allocated within the VM. To learn more, see MMIO Space.
  • Make sure you're using a GPU that the vendor supports being used in this configuration. For example, some vendors prevent their consumer cards from working when passed through to a VM.
  • Make sure the application being run supports running inside a VM, and that both the GPU and its associated drivers are supported by the application. Some applications have allow-lists of GPUs and environments.
  • If you're using the Remote Desktop Session Host role or Windows Multipoint Services on the guest, you will need to make sure that a specific Group Policy entry is set to allow use of the default GPU. Using a Group Policy Object applied to the guest (or the Local Group Policy Editor on the guest), navigate to the following Group Policy item: Computer Configuration > Administrator Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment > Use the hardware default graphics adapter for all Remote Desktop Services sessions. Set this value to Enabled, then reboot the VM once the policy has been applied.
Learning has never been so easy!
Hyper

Feb 7th 2019 - An addition from tfl (thx for your comment Tom): 'I am using Hyper-V in Windows 10 and you do not need to do this. WIth this version of Hyper-V, you can simply use the New-Hard Disk feature in the Hyper-V MMC to create a new VHDX. As long as the device has a drive letter, you are good to go. That means you can create a VHDX on a thumb-drive, an external USB disk, and even an SD Card.'

The following instructions refer to the 'old' version of Hyper-V, when things were not as easy as today. (No native VHD-Mounting.)

This is how you get an USB-Drive, connected to the host, to show up in an Hyper-V VM (MS Guest).

This will only work with Harddrives, NOT with CD/DVD, Thumbdrives, printers, usb2serial, smartcardreaders etc.

I've tested this on Hyper-VR2 with running Microsoft-Guests (Servers W2k8 & W2k8R2), i'm sure this will work with other Guest-OS too (Maybe with shut down machine, and mounted as IDE-Device e.g.).

2 Steps total

Step 1: On the Host

Connect your USB-Drive, wait until you can access the Drive in Explorer.

Open up Computer Management console.

Expand Storage, click on Disk Management.

Please be careful here. If you don't know what Diskmanager is good for, or what a Partition is, you should better stop reading right now. Dataloss is possible, you've been warned. ;)

Rightclick on the appropriate Partition(s) in the Graphical View (right lower pane), select 'Change Drive Letter an Paths...', click on Removebutton.

Make sure Driveletter(s) is/are gone.

Rightclick on the Frontrow (where it say's 'Disk 1' e.g.) select 'Offline'.

An addition from JonE (Thx for that Jon):

I was trying to do this using Hyper-V 2012 Core and to offline the USB drive:
1. RDP into the Hyper-V server
2. At the command prompt, type: diskpart
3. Type: list disk
4. Find your USB disk in the list. It should say status is Online
5. Type: select disk # (where 'disk #' is the value under the Disk ### column)
6. Type: offline disk
Now if you type 'list disk' again you should see that the disk has been offlined in the host OS

Step 2: In Hyper-V Manager

You don't have to shut down the VM. (Tested with w2k8 & w2k8r2 Guests)

Rightclick on the Virtual machine you wish to add the USB-Drive to, select 'Settings'.

Click on SCSI-Controller, select 'Disk' in the right Pane, click on 'Add'.

Select the 'Physical Disk' radiobutton, choose the appropriate Drive as seen in Diskmanager on the Host.

It will now appear inside the Virtual Machine.

To unmount the Drive, just go back to the Settings of the VM, click on SCSI-Controller again and remove the mounted Disk.

Hyper-v Server 2019 Sd Card

Don't do it, if you don't know what you're doing. That's about it.

Published: May 14, 2012 · Last Updated: Feb 07, 2019

57 Comments

Hyper-v Server 2019 Iso

  • Pure Capsaicin
    Justin.Davison Jun 15, 2012 at 08:36pm

    Not the most intuitive process in Hyper-V, glad to see a good guide here

  • Tabasco
    The Schwartz Jun 21, 2012 at 02:06pm

    Thanks! This will be quite useful for my laptop Hyper-V test lab.

  • Serrano
    jkladwig Jun 21, 2012 at 04:17pm

    Good post, very useful to know.

    If you need a 'quick' way of getting to stuff on a USB and you
    1) have a VM that is windows based
    2) happen to be using RDP to connect to VM on a 'remote' machine anyways
    3) don't need optimized speeds
    4) your remote desktop policies allow the below

    Try the following:
    1. Start remote desktop client (done this on 6.1 and 7)
    2. Before you connect to VM with RDP go to Options > Local Resources > More button under Lcoal Devices and resources section. Then expand drives and check the USB drive if already plugged into computer OR 'Drives that I plug in later'.
    3. Connect and the drive should show up in the drives list now

    Since over the network it is of course slow to copy to and from. But being able to save these settings in an RDP Profile makes this a one time setup which reduces the steps to 0 for future connections. That is the tradeoff I see between these two methods.

  • Serrano
    Earlthegrey Jun 22, 2012 at 12:32am

    Thank's for your note on the topic jason.

  • Pimiento
    BurrMis1 Jul 19, 2012 at 01:25pm

    as an addendum to jkladwig's method - if you have configured things 'properly' (when I figure that out I can elaborate) putting the thumb drive into a laptop that is connected to the iSCSI vlan you are using for SAN access may allow for much greater transfer speeds - this of course means that you are going to be in the server room, or at least in front of a properly configured network switch at the least...

    But if you need to, then you need to.

  • Pimiento
    Join Oct 3, 2012 at 08:40pm

    @ Earlthegrey : Thanks for the Tip

  • Serrano
    MarkJBL Oct 11, 2012 at 01:48pm

    Brilliant worked a treat, thanks for the information! Spiceworks to the rescue again!

  • Ghost Chili
    Nick42 Dec 19, 2012 at 09:31pm

    Thanks for this!

  • Poblano
    Rick (beiNVENTiV) Jan 30, 2013 at 06:08pm

    Does this work for removing drives and reconnecting new ones? Say, for example, I have to copy a file to three USB drives. Can I do that process, then unplug USB-Drive-A and plug in USB-Drive-B and have it present in the guest OS, or do I have to go through this process every time I plug in a USB drive?

  • Serrano
    Earlthegrey Jan 31, 2013 at 04:32pm

    You have to do it again for each device you wish to copy to.

  • Anaheim
    nogero Feb 18, 2013 at 11:49pm

    I'm running Ws2008R2, If I use the above method by Earlthegrey, would I then be able to dedicate that attached USB disk for Windows Server Backup on the VM?

  • Serrano
    Earlthegrey Feb 19, 2013 at 06:31am

    @nogero: Yes.

  • Pimiento
    Rupesh_systems Feb 20, 2013 at 07:03am

    Thanks. It worked. Good.

  • Thai Pepper
    HAPCAP Apr 17, 2013 at 02:03am

    Good info to know. I just setup my first vm with server 2012 and have been trying to figure out backups.

    Is there any noticeable transfer speed penalty by having the drive connected to the vm?

    Is there any data lost by removing the drive letter/ taking the drive offline? Ideally, I'd like to be able to backup individual files on the vm and then restore them on a separate system, if needed.

  • Serrano
    Earlthegrey Apr 17, 2013 at 05:49am

    I assume the speed is same or better, since you have no VHD between VM and physical Hardware.
    As long as you don't delete the partition, there is no data loss during this process.

Hyper V Server 2019 Sd Cards

  • prev
  • 1
  • 2
  • 3
  • 4
  • next