Skip to content
This repository has been archived by the owner on Jul 29, 2018. It is now read-only.

Subtlety with libvirt provider that is causing quite a bit of misinformation #421

Open
praveenkumar opened this issue Jun 2, 2016 · 1 comment

Comments

@praveenkumar
Copy link
Contributor

praveenkumar commented Jun 2, 2016

Context

There is a small subtlety with the libvirt vagrant provider that many people aren't aware of.

On the first vagrant up the vagrant box will be uploaded to the libvirt storage pool and then used as a backing device for the vm that gets started. So now you have the vagrant box file (lives in the .vagrant.d directory) as well as a file in the libvirt storage pool.

The problem comes about when you remove/re-add a box to a machine. When you remove the box, it removes the box from vagrant but it does not remove the box from the libvirt storage pool. If you subsequently re-add the box (a newer version this time) to vagrant and perform a vagrant up then no box gets uploaded because there is already a "backing image" in libvirt with that name.

What this leads to is people thinking they have the latest version of the CDK/ADB installed, but really using something that is old as dirt.

We need to somehow resolve this in the vagrant-libvirt provider or come up with some other, client side way of verifying things.

Reference: https://www.redhat.com/archives/devtools/2016-June/msg00000.html

Upstream Issue: vagrant-libvirt/vagrant-libvirt#85

Current Workaround

vagrant box remove cdkv2
virsh vol-delete --pool default cdkv2_vagrant_box_image_0.img
vagrant box add ...
@praveenkumar
Copy link
Contributor Author

praveenkumar commented Jun 3, 2016

virsh vol-delete ... might not work with rhel7 as host because of https://bugzilla.redhat.com/show_bug.cgi?id=1293804 issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant