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

Re: [Xen-users] qcow2 and Xen



On Mon, Jul 15, 2019 at 3:07 PM Stefan Malte Schumacher
<stefan.schumacher.netfed@xxxxxxxxx> wrote:
>
> Hello,
>
> we are currently planning to create about 40 new VMs on Debian 10 and there 
> are
> some technology decisions we want to make before starting. We have already 
> decided
> that we will use PVH instead of PV guests. Now we are debating how to store 
> the VMs.
> Until now we have used the traditional approach with a LVM. A colleague 
> showed me some of the things he can do with proxmox and qcow2 and I would 
> like to give qcow2-images a try. We have midterm plans of migrating to a SAN 
> and this would most likely be easier with images instead of a LVM.
>
> I have found out on my own that Xen supports qcow2 in theory, but I still 
> have two questions:
>
> 1) How mature is Xen's support for qcow2 as compared to LVM or raw images?

For qcow2, Xen uses a mode called `qdev`, where an instance of QEMU
itself acts as a disk backend; this means that there should be
absolutely no issues with image compatibility, since it's exactly the
same code reading the image as in upstream QEMU.  Functionally, it
gets tested regularly and so should have no stability issues.

I'm not sure if anyone has been investing in performance -- perhaps
Paul can comment on that.

> 2) How do I set up a new guest with qcow2? The Xen-Tools seem only to support 
> Raw-Images
> and LVM? Surprisingly I have found very little information about both my 
> questions on the WWW, I hope that somebody on this list can provide me with 
> more information.

Unfortunately I'm not familiar with higher-level tools like xen-tools.
It theoretically shouldn't be difficult to extend xen-tools to build
qdisk images.  Below are the commands I have in my own scripts for
creating qcow images:

* Create a disk image:

qemu-img create -f qcow2 "${image}" "${size}"M

* Mount such an image in dom0:

xl block-attach 0 ${blockspec}

Where ${blockspec} is:

"backendtype=qdev,vdev=${dev},format=qcow2,target=${image}"

Then you can use parted to create partitions, and `mount
/dev/${dev}${part}` and populate the filesystem.  (Or not use
partitions if you don't want to.)

After that, the rest of the xen-tools install should Just Work.

Alternately, you could just create the disk as described in the first
step, and boot an installer.

 -George

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.