[CentOS] qeum on centos 8 with nvme disk

Alessandro Baggi

alessandro.baggi at gmail.com
Mon Oct 14 07:40:26 UTC 2019


On 13/10/19 20:56, Jerry Geis wrote:
>> 6 hours are too much. First of all you need to check your nvme
>> performace (dd can help? dd if=/dev/zero of=/test bs=1M count=10000 andd
>> see results. If you want results more benchmark oriented you could try
>> bonnie++ as suggested by Jerry).
> 
>> Other this, have you got kvm module loaded and enabled cpu
>> virtualization option in the BIOS?
> 
>> If yes, have you got created the VM using --accelerate?
> 
>> Have you tried another distro on VM?
> 
> 
> I mounted the partition under C7.7 and ran the nvme test. Pretty much
> came back in seconds for 10G test.
> 
>   dd if=/dev/zero of=test bs=1M count=10000
> 10000+0 records in
> 10000+0 records out
> 10485760000 bytes (10 GB) copied, 5.45451 s, 1.9 GB/s
> 
> Yes kvm_intel is loaded as a module.
> 
> I am using the "-hda /dev/nvme0n1" when I run qemu.... I'm thinking this
> works find for my other "img" files - but does not work for "well" for my
> physical NVME.
> What is the correct argument perhaps to use for running a physical NVME
> disk as a qemu guest ??
> 
> Thanks,
> 
> Jerry
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
> 

Hi Jerry,
I never used a block device as disk devices on my vms. From virt-install 
(I use it) man pages from --disk section:

path
                A path to some storage media to use, existing or not. 
Existing media can be a file or block device.

                Specifying a non-existent path implies attempting to 
create the new storage, and will require specifying a
                'size' value. Even for remote hosts, virt-install will 
try to use libvirt storage APIs to automatically create
                the given path.

                If the hypervisor supports it, path can also be a 
network URL, like http://example.com/some-disk.img . For
                network paths, they hypervisor will directly access the 
storage, nothing is downloaded locally.


So you can try like: virt-install -n NAME -r mem --vcpus=N --accelerate 
--os-type=X --os-variant=X --disk path=/dev/nvme0n1[pN] ...and so on.

It should run without problem.

I added [pN] because you can use also a partition other than entire 
nvme0n1. I don't know if any type of option would be needed for a 
particular type of device like nvme.


hope that helps.

Alessandro.



More information about the CentOS mailing list