ServerCore VirtIO driver install


Go to solution Solved by ghost82,

Recommended Posts

Hi everyone,

 

Currently looking to migrate some of my virtual machines from Hyper V to unraid, looking online it seems I need to install VrtiIO drivers.

 

Has anyone ever done this on ServerCore?

 

I have had a searched of the forums but I cannot find how its being done.

Link to comment
42 minutes ago, ghost82 said:

Have a read at this (it's in spanish, use a translator if needed):

https://www.sysadminsdecuba.com/2021/01/instalacion-de-drivers-virtio-en-windows-server-core/

 

It seems virtio drivers are installed after windows is installed, so configure your vm as "legacy" (no virtio devices), boot, install drivers, change vm settings to use virtio.

 

Hi @ghost82

 

Iam migrating from Hyper V so the VM's are already built and running hyper V, I plan to convert the disks but everywhere I am reading says you need to install the virtio drivers, I can see how to install these on versions of windows that run a gui but server core is a powershell based O\S so has no gui.

 

I assume there is a way to install them via the command line, I am just looking for the commands or syntax of the command, or even if someone else is running servecore, the link you provided might do what I need though so will give it a try when I am home later today!

Link to comment
22 minutes ago, DeekB said:

but everywhere I am reading says you need to install the virtio drivers

Virtio drivers are needed if you use them.

If you use "legacy devices", like sata for vdisk controller, e1000 for network, etc. and you delete all the relevant devices using virtio, your windows core should boot as usual once converted to img or qcow2 to be run on qemu.

Then, if you want to switch to virtio devices (virtio disk controller for vdisk, virtio network, etc) for whatever reason, you can install drivers later, from the link I provided it seems with the pnputil command line, taking drivers from a mounted virtio iso.

Edited by ghost82
  • Like 1
Link to comment
3 hours ago, ghost82 said:

Virtio drivers are needed if you use them.

If you use "legacy devices", like sata for vdisk controller, e1000 for network, etc. and you delete all the relevant devices using virtio, your windows core should boot as usual once converted to img or qcow2 to be run on qemu.

Then, if you want to switch to virtio devices (virtio disk controller for vdisk, virtio network, etc) for whatever reason, you can install drivers later, from the link I provided it seems with the pnputil command line, taking drivers from a mounted virtio iso.

 

Thanks, have converted one of my VM's, I did managed to get it to boot but it has no network when I log in

 

I have managed to load an ISO, when loaded I was able to install the drivers using above command but I sitll dont seem to have any network drivers.

 

when I check the VM Settings for the NIC I have 2 option to choose from (virtio & Virtio-net) 

 

Anytime I load the VM's I get an error stating that no network card is found.

Link to comment
  • Solution
4 minutes ago, DeekB said:

when I check the VM Settings for the NIC I have 2 option to choose from (virtio & Virtio-net)

modify it manually instead of with the gui.

Switch to xml view on your vm settings (top right), find the network block, here an example:

      <interface type='bridge'>
        <mac address='aa:aa:aa:aa:aa:aa'/>
        <source bridge='br1'/>
        <model type='virtio'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
      </interface>

Change model type from virtio or virtio-net to e1000-82545em, save and boot the vm.

 

Post your diagnostics if you have issues.

Edited by ghost82
Link to comment
6 minutes ago, ghost82 said:

modify it manually instead of with the gui.

Switch to xml view on your vm settings (top right), find the network block, here an example:

      <interface type='bridge'>
        <mac address='aa:aa:aa:aa:aa:aa'/>
        <source bridge='br1'/>
        <model type='virtio'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
      </interface>

Change model type from virtio or virtio-net to e1000-82545em, save and boot the vm.

 

Post your diagnostics if you have issues.

 

Genius, thank you very much, it worked.

 

One other thing I noticed and its probably down to some misconfiguration my side is that the VM performance seems poor compared to what I had previously in Hyper V.

 

Just as an example the VM in hyper V had 1 VCPU core, 2GB of ram and it would load up in less than 30 seconds generally.

 

in Unraid I have given the VM 4 VCPU and 4GB of ram but it hangs applying computer settings for around 60 seconds while loading up, any ideas on that one please?

  • Like 1
Link to comment

That is becoming difficult without any data to compare..taking also into account that I know nothing about both windows core and hyper-v :D

First thing to do should be to check the settings in hyper-v and create the same (or near the same) layout in libvirt.

Some optimization in the vm settings may be needed (cpu isolation, cpu pinning, machine type) and maybe also on the host side: recently for example, my kali linux vm, the only one I have on a vdisk (and also on a hdd) became unusable, very slaggish, and only changing vm.dirty_ratio and vm.dirty_background_ratio fixed it.

Did you try to assign 1 cpu / 2 Gb of ram?If the vm is misconfigured assigning more ram/cpus could get things worse.

 

Note that if you change something in the gui your custom config to the xml (like the network type) will be lost and you will need to apply them again manually.

Edited by ghost82
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.