[GH-ISSUE #20] lvm2 storage pools are not supported #14

Closed
opened 2026-02-27 16:00:41 +03:00 by kerem · 15 comments
Owner

Originally created by @WhiteWind on GitHub (Feb 7, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/20

When I try to view virtual machine I got error 500.
Log shows: libvir: error : invalid argument: virStorageVolLookupByPath
Disk defined as follows:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/kvmguests/yate'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
Originally created by @WhiteWind on GitHub (Feb 7, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/20 When I try to view virtual machine I got error 500. Log shows: `libvir: error : invalid argument: virStorageVolLookupByPath` Disk defined as follows: ``` <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source dev='/dev/kvmguests/yate'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> ```
kerem closed this issue 2026-02-27 16:00:41 +03:00
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

/dev/kvmguests/yate - the path must be defined as a storage pool in WebVirtMgr

<!-- gh-comment-id:13224580 --> @retspen commented on GitHub (Feb 7, 2013): /dev/kvmguests/yate - the path must be defined as a storage pool in WebVirtMgr
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

http://127.0.0.1/storage/1/kvmguests/ is present and has pool path /dev/kvmguests

<!-- gh-comment-id:13224796 --> @WhiteWind commented on GitHub (Feb 7, 2013): http://127.0.0.1/storage/1/kvmguests/ is present and has pool path /dev/kvmguests
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Add symbol # at beginning of line in file webvirtmgr/polls/view.py, line 1145:
hdd_image = get_dom_hdd(storages) to #hdd_image = get_dom_hdd(storages)

<!-- gh-comment-id:13225356 --> @retspen commented on GitHub (Feb 7, 2013): Add symbol # at beginning of line in file webvirtmgr/polls/view.py, line 1145: hdd_image = get_dom_hdd(storages) to #hdd_image = get_dom_hdd(storages)
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

It works now, but does not show HDD

<!-- gh-comment-id:13227375 --> @WhiteWind commented on GitHub (Feb 7, 2013): It works now, but does not show HDD
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

sudo virsh vol-list 'pool name' - where 'pool name' when contains /dev/kvmguests device. What show ?

<!-- gh-comment-id:13227599 --> @retspen commented on GitHub (Feb 7, 2013): sudo virsh vol-list 'pool name' - where 'pool name' when contains /dev/kvmguests device. What show ?
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

virsh vol-list kvmguests
Name                 Path                                    
-----------------------------------------
dbs                  /dev/kvmguests/dbs                      
hosting              /dev/kvmguests/hosting                  
monitoring           /dev/kvmguests/monitoring               
reserved1            /dev/kvmguests/reserved1                
reserved2            /dev/kvmguests/reserved2                
reserved3            /dev/kvmguests/reserved3                
yate                 /dev/kvmguests/yate
<!-- gh-comment-id:13227712 --> @WhiteWind commented on GitHub (Feb 7, 2013): ``` virsh vol-list kvmguests Name Path ----------------------------------------- dbs /dev/kvmguests/dbs hosting /dev/kvmguests/hosting monitoring /dev/kvmguests/monitoring reserved1 /dev/kvmguests/reserved1 reserved2 /dev/kvmguests/reserved2 reserved3 /dev/kvmguests/reserved3 yate /dev/kvmguests/yate ```
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

You create VM and pool in WebVirtMgr ?

<!-- gh-comment-id:13227859 --> @retspen commented on GitHub (Feb 7, 2013): You create VM and pool in WebVirtMgr ?
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

Нет, я их вручную через XML и virsh создавал.
Or should we continue in English?

<!-- gh-comment-id:13227946 --> @WhiteWind commented on GitHub (Feb 7, 2013): Нет, я их вручную через XML и virsh создавал. Or should we continue in English?
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Проблема заключается в том что у webvirtmgr при создании xml свои параметры и если они не стандартные они просто не парсяться.

<!-- gh-comment-id:13228007 --> @retspen commented on GitHub (Feb 7, 2013): Проблема заключается в том что у webvirtmgr при создании xml свои параметры и если они не стандартные они просто не парсяться.
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

У вас пулы хранилища еще есть ?

<!-- gh-comment-id:13228017 --> @retspen commented on GitHub (Feb 7, 2013): У вас пулы хранилища еще есть ?
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

Есть, дефолтный и NFS'ный. Оба корректно обрабатываются в webvirtmgr.
Вот так объявлен LMV'ный:

<pool type='logical'>
  <name>kvmguests</name>
  <uuid>dff5883a-3193-a654-ecd5-b5de170903f0</uuid>
  <capacity unit='bytes'>89762299904</capacity>
  <allocation unit='bytes'>77905002496</allocation>
  <available unit='bytes'>11857297408</available>
  <source>
    <device path='/dev/disk/by-path/.........'/>
    <name>kvmguests</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/kvmguests</path>
    <permissions>
      <mode>0700</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>
<!-- gh-comment-id:13228074 --> @WhiteWind commented on GitHub (Feb 7, 2013): Есть, дефолтный и NFS'ный. Оба корректно обрабатываются в webvirtmgr. Вот так объявлен LMV'ный: ``` <pool type='logical'> <name>kvmguests</name> <uuid>dff5883a-3193-a654-ecd5-b5de170903f0</uuid> <capacity unit='bytes'>89762299904</capacity> <allocation unit='bytes'>77905002496</allocation> <available unit='bytes'>11857297408</available> <source> <device path='/dev/disk/by-path/.........'/> <name>kvmguests</name> <format type='lvm2'/> </source> <target> <path>/dev/kvmguests</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> ```
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Скинте еще xml виртуалки

<!-- gh-comment-id:13228285 --> @retspen commented on GitHub (Feb 7, 2013): Скинте еще xml виртуалки
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

<domain type='kvm' id='8'>
  <name>yate</name>
  <uuid>a9199efc-a544-2c48-8cef-938e509f5ae2</uuid>
  <memory unit='KiB'>262144</memory>
  <currentMemory unit='KiB'>262144</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='i686' machine='pc-1.0'>hvm</type>
    <boot dev='hd'/>
    <boot dev='cdrom'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>core2duo</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='lahf_lm'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='cx16'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='acpi'/>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/kvmguests/yate'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:bc:f6:96'/>
      <source network='ext500'/>
      <target dev='vnet2'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <interface type='network'>
      <mac address='52:54:00:17:3c:73'/>
      <source network='int30'/>
      <target dev='vnet3'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </interface>
    <interface type='network'>
      <mac address='52:54:00:ea:a7:b9'/>
      <source network='int32'/>
      <target dev='vnet6'/>
      <model type='virtio'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' port='5902' autoport='yes' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='none'/>
</domain>
<!-- gh-comment-id:13228376 --> @WhiteWind commented on GitHub (Feb 7, 2013): ``` <domain type='kvm' id='8'> <name>yate</name> <uuid>a9199efc-a544-2c48-8cef-938e509f5ae2</uuid> <memory unit='KiB'>262144</memory> <currentMemory unit='KiB'>262144</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='i686' machine='pc-1.0'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>core2duo</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='tm2'/> <feature policy='require' name='est'/> <feature policy='require' name='ss'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='ht'/> <feature policy='require' name='ds'/> <feature policy='require' name='lahf_lm'/> <feature policy='require' name='tm'/> <feature policy='require' name='cx16'/> <feature policy='require' name='vmx'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='acpi'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source dev='/dev/kvmguests/yate'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='block' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <interface type='network'> <mac address='52:54:00:bc:f6:96'/> <source network='ext500'/> <target dev='vnet2'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:17:3c:73'/> <source network='int30'/> <target dev='vnet3'/> <model type='virtio'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:ea:a7:b9'/> <source network='int32'/> <target dev='vnet6'/> <model type='virtio'/> <alias name='net2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/3'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/3'> <source path='/dev/pts/3'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <graphics type='spice' port='5902' autoport='yes' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='qxl' vram='65536' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </memballoon> </devices> <seclabel type='none'/> </domain> ```
Author
Owner

@retspen commented on GitHub (Feb 7, 2013):

Обновил

<!-- gh-comment-id:13229638 --> @retspen commented on GitHub (Feb 7, 2013): Обновил
Author
Owner

@WhiteWind commented on GitHub (Feb 7, 2013):

Да, теперь всё правильно

<!-- gh-comment-id:13235140 --> @WhiteWind commented on GitHub (Feb 7, 2013): Да, теперь всё правильно
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#14
No description provided.