Xcage Posted August 20, 2021 Share Posted August 20, 2021 (edited) Hi all, I am experiencing real bad disk speeds on win10 VMs - AS SSD Benchmark even the sequential test stutters and is never above 80-90mbps. the VMs were originally copied from real WIN10 Machines using disk2VHD , then converted to qcow2 and those boot only with seabios with primaryVdisk bus set to SATA (ive 3 images like that , different sizes, all with performance issues) i tested them with separate disks be that SSD or NVME the performance is horrible. (i did install Virtio drivers) i did test and created new VM just now with OVMF and i440 and primary vdisk bus Virtio and the performance there is about 80-85% of bare metals speeds on NVME drive. attached 2 xmls one of freshly installed VM which works fine but doesnt help because i would need to rebuild the VM and its an issue and XML of a slow VM which i ran from the same Cache NVME but using seabios q3.5 and primary vdisk bus as SATA is there a way to fix the performance ? or maybe a way to convert them to work with OVMF and VirtIO because it feels like drivers issue Freshly installed fast XML.txt slow XML.txt 1ctower-diagnostics-20210820-1358.zip Edited October 22, 2021 by Xcage added diagnostics Quote Link to comment
ghost82 Posted August 20, 2021 Share Posted August 20, 2021 2 hours ago, Xcage said: or maybe a way to convert them to work with OVMF and VirtIO because it feels like drivers issue First make backups as it may end with unbootable and corrupted vdisk. I would try to convert the vdisk from legacy (bios) to uefi: microsoft has an utility: MBR2GPT This will convert the partition table from mbr to gpt with a uefi partition. Once you have the uefi partition you can change from seabios to ovmf. Leave the disk as sata for now and try to boot. Once you boot you can try to change from sata to virtio. Quote Link to comment
Xcage Posted August 20, 2021 Author Share Posted August 20, 2021 (edited) 5 hours ago, ghost82 said: I would try to convert the vdisk from legacy (bios) to uefi: microsoft has an utility: MBR2GPT THX! now i know how to convert that. so i did that but the speed is the same, how would i convert that to use Virtio bus? would that even help? UEFI - Sata Vbus Seabios - Sata Vbus Fresh Install -OVMF Virtio Edited August 20, 2021 by Xcage Quote Link to comment
ghost82 Posted August 20, 2021 Share Posted August 20, 2021 37 minutes ago, Xcage said: so i did that but the speed is the same, how would i convert that to use Virtio bus? ok first step completed. I tried this step so I was sure about the instructions. I didn't try the last step, so take it as a suggestion, at least that was what I would do if I were you. First of all, backup (vm template and virtual boot disk)! Then, add a new ide cd-rom to the vm pointing to the virtio iso disk (freely downloadable), which contains all the virtio drivers. Add a new virtio disk, but leave the boot disk as sata. Boot the vm and install the virtio drivers for the new added disk. Do not reboot or shutdown. Now you could think that switching the boot disk from sata to virtio would work, but it seems (from what I'm reading in internet) that it's not the case for win 10 vms. A user suggest (after you installed the virtio drivers for the new disk): 1. Open cmd as admin and type: bcdedit /set {current} safeboot minimal This is to boot next time in safe mode 2. Shutdown the vm and make the changes to the vm template to switch the boot disk from sata to virtio 3. Boot the vm and enter safe mode Once booted in safe mode it is reported that all boot-start drivers will be enabled and loaded, including the virtio driver. Since there is now a miniport installed to use it, the kernel will now make it part of the drivers that are to be loaded on boot and not disable it again. 4. Reset the bcedit settings to not boot again in safe mode, but in normal mode: bcdedit /deletevalue {current} safeboot I hope it will work without too many headache.. 1 Quote Link to comment
Solution ghost82 Posted August 20, 2021 Solution Share Posted August 20, 2021 (edited) Another way could be injecting the virtio driver in this way: 0. switch the boot disk from sata to virtio in the vm 1. add to the vm 2 cd rom drives: the win 10 installation iso and the virtio iso 2. boot from the win 10 cd rom and get a cmd from the repair mode option 3. load the driver (assuming e: is the virtio cd rom drive): drvload e:\viostor\w10\amd64\viostor.inf A new drive will be mounted (your virtio boot disk, assuming f:) 4. use DISM to inject the virtio controller driver: dism /image:f:\ /add-driver /driver:e:\viostor\w10\amd64\viostor.inf Edited August 20, 2021 by ghost82 Quote Link to comment
Xcage Posted August 20, 2021 Author Share Posted August 20, 2021 (edited) First of all Thanks for the help , appreciate the time and effort regarding the backups - i have all of them, AND the original Windows machines, so that shouldn't be an issue. i did try to change to Virtio, also i tried to dism /image:f:\ /add-driver /driver:e:\viostor\w10\amd64\viostor.inf well i actually tried to dism /image:F:\ /add-driver /Driver:E:\ /Recurse for all drivers but dism didnt work , granted it was other VM image , but the principal stays the same, those VMs werent and will not be getting windows updates, those production machines with certain software installed that each windows update is a potential to break them. Going to try bcdedit be back with update Edited August 20, 2021 by Xcage Quote Link to comment
Xcage Posted August 21, 2021 Author Share Posted August 21, 2021 12 hours ago, ghost82 said: Now you could think that switching the boot disk from sata to virtio would work, but it seems (from what I'm reading in internet) that it's not the case for win 10 vms. > What i did was add VirtIO 10G disk, > boot the VM > add the drivers manually (installed viostor.inf) then checked disks via disk management , and saw Uninitialized disk which would mean that windows sees it , but doesn't actually needs to use it , therefore permanent driver addition wouldn't be necessary( from my understanding of windows) > so i initialized the disk , so its now connected as UNallocated space. > Restart via regular windows restart, checked if the disk is there after restart (which would mean that the drivers are still loaded on boot by windows and it didn't discard them) and it was there. > Then i created a new VM with OVMF , i440 and the same disk i used , but this time with VirtIO bus. everything like u would regularly do. booted the VM and it "just" worked. Checked the performance (attached) and i was right , VirtIO drivers are much better for NVME disks performance (twice better from my testing) So its all working now , and thanks for tremendous help! took me half a day to sort it out but i learned alot in the process too hope it will help some1 who stumbles upon this maybe some time later. on my way there i learned how to resize disks, change formats, take snapshots , copy stuff using terminal commands, learned to shrink , fix Windows recovery partition, change MBR to GPT 2 Quote Link to comment
shpitz461 Posted August 3, 2022 Share Posted August 3, 2022 On 8/20/2021 at 2:56 PM, ghost82 said: 1. Open cmd as admin and type: bcdedit /set {current} safeboot minimal ... 4. Reset the bcedit settings to not boot again in safe mode, but in normal mode: bcdedit /deletevalue {current} safeboot Thanks, this fixed my Windows 11 VM performance passing an ADATA SX8200PNP 1TB NVMe: Quote Link to comment
Recommended Posts
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.