Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libvir: error : invalid argument: virStorageVolLookupByPath #2

Open
ezPappi opened this issue Jan 29, 2013 · 7 comments
Open

libvir: error : invalid argument: virStorageVolLookupByPath #2

ezPappi opened this issue Jan 29, 2013 · 7 comments

Comments

@ezPappi
Copy link

ezPappi commented Jan 29, 2013

Hi.

I have all my KVM guests installed to LVM disks. Webvirtmgr can see the pool, and list all the guests. But when I'm trying to access them from the menu on the left, I get error 500.
Django says: libvir: error : invalid argument: virStorageVolLookupByPath

And the traceback:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, _callback_args, *_callback_kwargs)

File "/var/www/webvirtmgr/polls/views.py", line 1145, in vm
hdd_image = get_dom_hdd(storages)

File "/var/www/webvirtmgr/polls/views.py", line 1095, in get_dom_hdd
img = conn.storageVolLookupByPath(hdd)

File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3150, in storageVolLookupByPath
if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self)

libvirtError: invalid argument: virStorageVolLookupByPath

This is an issue when a pool is not defined but in my case it is. The /dev/fridge is the volume group where my guests are installed, e.g:
--- Logical volume ---
LV Path /dev/fridge/mail01
LV Name mail01
VG Name fridge
LV UUID ihBj5b-03zN-FcZd-I30o-lmYe-61BS-J0qzYM
LV Write Access read/write
LV Creation host, time ,
LV Status available

open 1

LV Size 10.00 GiB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 6144
    Block device 253:4

Virsh shows the pool as well.
virsh # pool-info fridge
Name: fridge
UUID: a1823e4e-d3ce-4ed5-02d0-847f4a601e98
State: running
Persistent: yes
Autostart: yes
Capacity: 5.46 TiB
Allocation: 5.22 TiB
Available: 239.04 GiB

I can also see the pool in the web interface.

Any idea why this doesn't work?

@retspen
Copy link
Owner

retspen commented Jan 29, 2013

You need your VG "fridge" add to storage pool.

@ezPappi
Copy link
Author

ezPappi commented Jan 29, 2013

It's already in the pool. See the output of virsh pool-info
Additionally:

cat /etc/libvirt/storage/fridge.xml
shows:
http://pastie.org/private/ntdb6lyuaxd3hexb23q

@retspen
Copy link
Owner

retspen commented Jan 29, 2013

VM create in WebVirtMgr or have already been created?

@ezPappi
Copy link
Author

ezPappi commented Jan 29, 2013

They have already been there. I created one Logical volume with webvirtmgr but it put an .img in the name of the volume (something I don' want) so I did not use it for that.

@ezPappi
Copy link
Author

ezPappi commented Jan 29, 2013

Looking at get_img_path function in views.py it seems to want to find .img for volumes.

@retspen
Copy link
Owner

retspen commented Jan 29, 2013

Yes this funciton find only .img. Fix this bug in new release.

@ezPappi
Copy link
Author

ezPappi commented Jan 29, 2013

Any idea when this will be?

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

No branches or pull requests

2 participants