adrahon / vagrant-kvm

This project is dead, please use vagrant-libvirt instead! A Vagrant 1.4+ plugin that adds a KVM provider to Vagrant, allowing Vagrant to control and provision KVM/QEMU VM.
MIT License
366 stars 60 forks source link

Remove support for raw image #76

Closed adrahon closed 10 years ago

adrahon commented 10 years ago

Now there's support for qcow2 images (and they're the default), is there any point supporting raw images? Removing support would simplify the image handling code.

jhoblitt commented 10 years ago

I think the box format details being consistent for kvm is more important than the image type. That said, I don't think qcow2 really has any advantage over sparse raw files and at least historically, raw has had better performance. The later is also what libvirt on el6.x creates by default, I assume for performance issues but I haven't don't any extensive testing. I use sparse raw in production as RH has chosen that as the default. However, I believe openstack is defaulting to qcow2 because it's snapshotting support offers a startup time advantage(?). It's easy to mount a raw image on a loopback device but I just checked and guestfish does (now|always?) support qcow2 images.

jhoblitt commented 10 years ago

Think about it some more, I think qcow2 with backing files would probably be the best option as that would theoretically speed up "vagrant up" for cached boxes.

adrahon commented 10 years ago

@miurahr implemented support for qcow2 with backing file (backing files fit the base box model quite well), so it's just a matter of switching to qcow2 by default here https://github.com/adrahon/vagrant-kvm/blob/master/lib/vagrant-kvm/action/import.rb#L15

I'm now proposing we just drop the raw image support as qcow2 is widely supported (including by libguestfs as you said). Could you try using qcow2 in your Vagrant environment and see if there's any issue?

p0deje commented 10 years ago

I've been using RAW for pretty long time and then, when we've faced limited disk space I've started using qcow2 and then backed qcow2. The last one resulted in 20-30% performance degrade. If anyone using vagrant-kvm cares about performance, he would prefer to use RAW. Also, it's not that hard to support this file type, so I would leave it as is.

miurahr commented 10 years ago

I'm prefer to keep an option for users to select image format, leaving it as is. We can set an image type and user can select it according to each pros/cons.

As @p0deje said, backed qcow2 has advantage to speed up vagrant up , but running performance become degrade. qcow2 does not have a significant difference in disk space than raw with sparse support.

It would be necessary to explain it well in document.

adrahon commented 10 years ago

OK, I'll close this and we'll have to explain it better in the documentation.