qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [SPDK] How to setup a QEMU system disk by using SPDK?


From: Wang, ChenX
Subject: Re: [Qemu-block] [SPDK] How to setup a QEMU system disk by using SPDK?
Date: Wed, 6 Jun 2018 08:40:22 +0000

Hi,  Bob

 

I have try to boot the os by QEMU UEFI, but failed, following is my qemu command:

. /qemu-system-x86_64 -smbios type=0,uefi=on -smp 8 -m 1024 -net user,hostfwd=tcp::10020-:22 \

-net nic -chardev socket,id=char0,path=vhost.0 -device vhost-user-blk-pci,chardev=char0,num-queues=4,bootindex=0  --enable-kvm

 

Would you be willing to share your commands and some tips for QEMU UEFI? Thanks so much. J

 

Thanks,

Chen

 

From: SPDK [mailto:address@hidden On Behalf Of Harris, James R
Sent: Wednesday, June 6, 2018 2:14 AM
To: Bob Chen <address@hidden>; Storage Performance Development Kit <address@hidden>; Cao, Gang <address@hidden>; qemu block <address@hidden>
Subject: Re: [SPDK] How to setup a QEMU system disk by using SPDK?

 

 

 

From: Bob Chen <address@hidden>
Date: Monday, June 4, 2018 at 10:47 PM
To: Storage Performance Development Kit <address@hidden>, "Cao, Gang" <address@hidden>, James Harris <address@hidden>, qemu block <address@hidden>
Subject: Re: [SPDK] How to setup a QEMU system disk by using SPDK?

 

 

[…]

 


I suspect this is because all SPDK logical volumes are exposed with 4KB logical block size.  IIRC, Seabios legacy boot doesn’t support 4KB logical block devices.  UEFI boot should work but we don’t have automated tests set up for that yet.

 

I will have a try for UEFI boot-loader. 

 


I think SPDK logical volumes could be exposed with 512 byte logical block size, if the underlying block device has a 512 byte logical block size.  Using 4KB LBA simplified the implementation a bit and all metadata has to use 4KB for atomicity.  But talking with Ben we don’t see any reason 512 byte for read/write/unmap operations wouldn’t work.  We may have to use feature bits though so that this change in behavior only applies to newly created logical volumes.

Bob – I’m curious if you can boot your VM with the SPDK logical volume as a secondary disk?

 

 Yes, we could. Although we were able to see the device in the VM, that disk with the guest OS inside still couldn't be mounted. Seemed like read-only or corrupted.

 

Because SPDK by far does not provide a method to import or export volume metadata to a external file, we came up with this thought and managed to copy data by `dd` and nbd. Not very straight forward...

 

 

Good news, UEFI works! Now Qemu can boot on the SPDK system disk successfully.

 

What we are expecting next is a more portable way to import/export volume.

 

 

Thanks for the update!  Would you be willing to add a section to the SPDK vhost doc (doc/vhost.md) with some tips for QEMU UEFI boot?

 

Regarding import/export – what kind of method do you have in mind?  I agree that a more straight forward method is warranted.

 

-Jim


reply via email to

[Prev in Thread] Current Thread [Next in Thread]