littlehorse1 / qemu-nvme

The LightNVM qemu implementation, based on NVMe

Home Page: http://openchannelssd.readthedocs.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Virtual Open-Channel SSD 2.0

This repository implements support for exposing an NVMe device that implements the Open-Channel 2.0 specification.

Compiling & Installing

Below is a minimal example of the installation process for x86_64, kvm-enabled emulation using libaio for I/O.

git clone https://github.com/OpenChannelSSD/qemu-nvme.git

cd qemu-nvme
./configure --enable-kvm --target-list=x86_64-softmmu --enable-linux-aio --disable-werror --disable-xen --prefix=$HOME/qemu-nvme
make
make install

That'll install the OCSSD enabled qemu binary into $HOME/qemu-nvme.

Configuring the virtual open-channel SSD drive

The device must have a backend file to store its data. Create a backend file by (e.g., 8GB)

dd if=/dev/zero of=ocssd_backend.img bs=1M count=8096

The qemu arguments must be extended with:

-drive file={path to ocssd backend file},id=myocssd,format=raw,if=none \
-device nvme,drive=myocssd,serial=deadbeef,lnum_pu=4,lstrict=1,meta=16,mc=3 \

The full command line could look like the following and creates an ocssd with 4 parallel units:

sudo $HOME/qemu-nvme/bin/qemu-system-x86_64 -m 4G -smp 4 -s \
-drive file={path to vm image},id=diskdrive,format=raw,if=none \
-device virtio-blk-pci,drive=diskdrive,scsi=off,config-wce=off,x-data-plane=on \
-drive file={path to ocssd backend file},id=myocssd,format=raw,if=none \
-device nvme,drive=myocssd,serial=deadbeef,lnum_pu=4,lstrict=1,meta=16,mc=3

A complete list of all options supported by the NVMe device can be found in the source with comments on each option at the top of the file and a list of options and their default values toward the bottom of the file.

In the virtual machine, make sure to install at least Linux kernel 4.17 or latest release candidate.

Current limitations

  • The driver does not support multiple groups. This should however be easy to implement.

About

The LightNVM qemu implementation, based on NVMe

http://openchannelssd.readthedocs.org/en/latest/

License:Other


Languages

Language:C 91.7%Language:C++ 3.0%Language:Python 1.8%Language:Shell 1.0%Language:Haxe 0.8%Language:Assembly 0.6%Language:Perl 0.4%Language:Makefile 0.4%Language:Objective-C 0.3%Language:NSIS 0.0%Language:GDB 0.0%