[zfs-discuss] best practice to pass zfs volume to qemu/kvm

Alex Braunegg alex.braunegg at gmail.com
Mon Feb 15 18:00:15 EST 2016


When I create a zvol to pass to Xen I use the following:

 

/sbin/zfs create -s -b 128K -V <size> <pool_name>/<zvol_parent>/<guest_name>/disk_sda

 

This creates:

 

                /dev/zvol/<pool_name>/<zvol_parent>/<guest_name>/disk_sda

 

Which can be used in the Xen configuration

 

I then create a disk label on this zvol to make it useable:

 

                /sbin/parted -s /dev/zvol/<pool_name>/<zvol_parent>/<guest_name>/disk_sda mklabel msdos

 

Hope this helps.

 

Best regards,

 

Alex

 

 

From: zfs-discuss [mailto:zfs-discuss-bounces at list.zfsonlinux.org] On Behalf Of thibaut noah via zfs-discuss
Sent: Tuesday, 16 February 2016 9:50 AM
To: zfs-discuss at kopka.net
Cc: zfs-discuss at list.zfsonlinux.org
Subject: Re: [zfs-discuss] best practice to pass zfs volume to qemu/kvm

 

I created my pool with zpool create mirror disk 1 disk2 mirror disk3 disk4.
I checked if i had something at /dev/zvol and nothing shows up

 

2016-02-15 23:37 GMT+01:00 thibaut noah <thibaut.noah at gmail.com>:

I didn't create a zvol, i just created my pool with all the disks and put all my datas in it, can i create a zvol on top of it or will i have to move datas to do this?

 

2016-02-15 23:28 GMT+01:00 Gregor Kopka <zfs-discuss at kopka.net>:

just hand /dev/zvol/<poolname>/<path to zvol> to your VM manager and be done with it.

Gregor

 

Am 15.02.2016 um 23:21 schrieb thibaut noah via zfs-discuss:

Hello, i have a 6tB zfs volume and i'm looking for the best way to pass it to my guest os (which is windows 10). 

I read the oracle documentation http://docs.oracle.com/cd/E19604-01/821-0406/usingzfswithvirtualdisks/index.html but i'm not sure if this is the best way to do this.
My main concern is if i'll have to do manipulations every time i want to fire the vm.
Would like some advice on this please

 

_______________________________________________
zfs-discuss mailing list
zfs-discuss at list.zfsonlinux.org
http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20160216/185b9bf0/attachment-0001.html>


More information about the zfs-discuss mailing list