I want use VMM with LVM and qcow2, but it doesn't work

Hello Forum Users,

my Problem is about Virtual Machine Manager and the Storage configuration in a SLES12 environment with KVM/qemu.

I want use the VMM with LVM and the qcow2 format.

My first config is:

A LVM Group with a new volume. If I use this I can use any GB space for the Virtual Machine
I want. But I cannot use the qcow2 format.

My second config is:

I use a ( in German: ) „Dateisystemverzeichnis“ my data space cannot be bigger then 8 GB. But I can use the qcow2 format.

In two scenarios both cases are work.
First: I use the default directory from VMM, or I use a Folder in my /home directory.

My wish is two use my second Hard Disk with many Logical Volumes for many Virtual Machines.

Thank you for read,
Flo

Hi Flo,

while I cannot give any help with the actual question (haven’t used neither SLES12 nor KVM), your last statement triggered a warning:

My wish is two use my second Hard Disk with many Logical Volumes for many Virtual Machines.

Many virtual machines on a single hard disk will cause many iowaits :wink: At least if you run more than a few VMs concurrently.

Back on topic:

But I cannot use the qcow2 format.

So that others can get a better picture of the situation: why can’t you use it? Do you receive an error message, are you using some tool that will not offer an according selection? Since (from what I can tell) using QCOW2 on top of logical volumes should be technically possible, some more details might be helpful.

Regards,
Jens

Hi Jens,

Thank you for your reply.

Your first reply isn’t for my use case. I don’t want to run the Virtual Machines on the same time.
Rather for learning various types of server applications not on the same time.

I don’t use any other tool that can generate an error.

The first config:

If I use LVM in the Menu for create a StorageVolume I have no choice to use qcow2.
And when I choose the same (qcow2) in the last Config Menu again (there is a summary of all points again) I get following error message:

„Installation konnte nicht fertiggestellt werden: <<internal error: exited while connecting to monitor: 2015-02-05T15:46:49.677413Z qemu-system-x86_64: -drive file=/dev/vgDATE/testdate001,if=none,id=drive-virtio-disk0,format=qcow2,cache=unsafe,aio=native:could not open disk image /dev/vgDATE/testdate001:
Image is not in qcow2 format>>

Traceback (most recent call last):
File „/usr/share/virt-manager/virtManager/asyncjob.py“, line 91, in cb_wrapper

callback(asyncjob, *args, **kwargs)
File „/usr/share/virt-manager/virtManager/create.py“, line 1908, in do_install
guest.start_install(meter=meter)
File „/usr/share/virt-manager/virtinst/guest.py“, line 426, in start_install noboot)
File „/usr/share/virt-manager/virtinst/guest.py“, line 490, in create guest
dom = self.conn.createLinux (start_xml or final_xml, 0)
File „/usr/lib64/python2.7/site-packages/libvirt.py“, line 3297, in createLiinux
if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’,conn=self)

The second config:

If I use (In German:) „Dateisystemverzeichnis“ in the Menu for create a StorageVolume I have the choice: qcow2. There is no error message but in the menu I can’t change the Volume size. And I can not set over 7.75 GB.

Maybe I have a chance to do all this in the command line but I have little hope.

Thanks for all,
Flo

Hi Flo,

if I read this correctly, then you’re talking about virtmanager on the host. Oh, and I’m not too familiar with the GUI tools, I usually work with the command line and/or automation tools to generate configs :wink:

QCOW2 is a “format” - so you need to “format” the logical volume in the QCOW2 format. I haven’t toyed with that yet, but it’s worth a try to apply the qemu command right on the LV, instead of a file inside the LV.

What your second approach tries to do in the background, I can only guess: it probably will create a file in the QCOW2 format. Not permitting you to change the volume size (the size of the underlying volume/file system) is expected - from the front end view, the file system is a given and would need to be changed in advance by the admin. That you cannot set a file size above 7.75 GB may be a limit of the file system, is there enough free space? The QCOW2 format will support larger files, it has a 64bit integer representing the image file size.

Regards,
Jens

Hello Jens, thanks for reply,

in the last hours I approximate my search to the command line tool like virsh (a tool for Virtual Machines). I see there are more possibilities. I must read a lot about the topic before I can make a new statement.

Thank you very much,
Flo