Bug 1146869 - virt-manager should show disk info for guest with disk type volume
Summary: virt-manager should show disk info for guest with disk type volume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-26 09:37 UTC by tingting zheng
Modified: 2015-03-05 10:07 UTC (History)
5 users (show)

Fixed In Version: virt-manager-1.1.0-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:07:16 UTC
Target Upstream Version:


Attachments (Terms of Use)
screensnot of disk info from virt-manager GUI (101.32 KB, image/png)
2014-09-26 09:37 UTC, tingting zheng
no flags Details
Screenshot-2 (636.08 KB, image/png)
2014-10-09 07:21 UTC, zhoujunqin
no flags Details
Screenshot-3 (584.10 KB, image/png)
2014-10-09 07:22 UTC, zhoujunqin
no flags Details
Screenshot-4 (582.58 KB, image/png)
2014-10-09 07:23 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0427 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-03-05 14:38:46 UTC

Description tingting zheng 2014-09-26 09:37:56 UTC
Created attachment 941502 [details]
screensnot of disk info from virt-manager GUI

Description
virt-manager should show disk info for guest with disk type volume

Version:
virt-v2v-1.27.53-1.1.el7.x86_64
libguestfs-1.27.53-1.1.el7.x86_64

libvirt-1.2.8-3.el7.x86_64
virt-manager-0.10.0-20.el7.noarch - Due to bug 1138372 causes latest virt-manager GUI shows abnormal,I use this version of virt-manager.


How reproducible:
100%

Steps to Reproduce:
1.On rhel7,libvirt/qemu-kvm have support for disk type volume,prepare a guest with disk type volume.
# virsh dumpxml rhel6.6-tzheng
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='rhel6.6.img'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>

2.Launch virt-manager,click the guest,open->show virtual hardware details->disk.
There is nothing shows in "Source path" and "Storage size",refer to the sreenshot.

Actual results:
There is nothing shows in "Source path" and "Storage size" from virt-manager GUI for guest with disk type volume.

Expected results:
"Source path" and "Storage size" show correctly from virt-manager GUI.

Additional info:

Comment 2 Giuseppe Scrivano 2014-09-26 13:32:18 UTC
patch series sent upstream:

https://www.redhat.com/archives/virt-tools-list/2014-September/msg00247.html

Comment 3 Giuseppe Scrivano 2014-09-26 14:28:36 UTC
pushed upstream:

commit 5e8f35f5e6d2f86a6846e3725885980eb51a5eae
Author: Giuseppe Scrivano <gscrivan>
Date:   Fri Sep 26 15:25:14 2014 +0200

    virt-manager, details: fix path and size for disk type='volume'
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1146869
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>

commit cce582719528a9f664e2064fe662ba7fa34dbb24
Author: Giuseppe Scrivano <gscrivan>
Date:   Fri Sep 26 15:24:34 2014 +0200

    virtinst: add support for disk type="volume"
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>

Comment 6 zhoujunqin 2014-10-09 07:20:17 UTC
Try to verify with new build:
virt-manager-1.1.0-4.el7.noarch

steps:
1. Prepare a guest with disk type volume.
# virsh dumpxml rhel6.5-2
...
    <disk type='volume' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source pool='default' volume='juzhou-rhel6.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>

2.Launch virt-manager,click the guest,open->show virtual hardware details->disk.
Check items "Source path" and "Storage size" showing:
(Details see Screenshot-2)

3. Try to delete guest rhel6.5-2 via virt-manager.
(Details see Screenshot-3)
Choose delete img file together (Details see Screenshot-4)

Result: Guest can be deleted with no error, but img file always existing.

# ls /var/lib/libvirt/images/juzhou-rhel6.img
/var/lib/libvirt/images/juzhou-rhel6.img

I think img file should be deleted and there is something wrong with "Source path", please help check and move this bug from ON_QA to ASSIGNED.

Comment 7 zhoujunqin 2014-10-09 07:21:11 UTC
Created attachment 945209 [details]
Screenshot-2

Comment 8 zhoujunqin 2014-10-09 07:22:41 UTC
Created attachment 945211 [details]
Screenshot-3

Comment 9 zhoujunqin 2014-10-09 07:23:33 UTC
Created attachment 945212 [details]
Screenshot-4

Comment 10 Giuseppe Scrivano 2014-10-09 07:34:27 UTC
I don't think the img file should be deleted as I see the manually configured storage pool like just a reference to a volume  It seems correct to me to delete just the reference (by undefining the VM) instead of removing also the volume that is pointed to.

Comment 11 tingting zheng 2014-10-09 07:53:20 UTC
(In reply to Giuseppe Scrivano from comment #10)
> I don't think the img file should be deleted as I see the manually
> configured storage pool like just a reference to a volume  It seems correct
> to me to delete just the reference (by undefining the VM) instead of
> removing also the volume that is pointed to.

From virt-manager GUI,we can choose whether delete the img file or not.For this kind of disk,if we choose delete img file when delete guest,the image is still there.BTW,we can use 
virsh undefine $guest --remove-all-storage to undefine and delete this kind of guest.

# virsh undefine vm1 --remove-all-storage
Domain vm1 has been undefined
Volume 'hda'(sdl-test-sda) removed.

Comment 14 zhoujunqin 2014-11-03 08:40:06 UTC
Try to verify this issue with new build:
virt-manager-1.1.0-5.el7.noarch

steps:
1. Prepare a guest with disk type volume.
# virsh dumpxml test-rhel6-second  |grep -A6 disk
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='test-rhel6-second-sda'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

2.Launch virt-manager,click the guest,open->show virtual hardware details->disk.
Check items "Source path" and "Storage size" showing:
Source path: test-rhel6-second-sda
Storage size: 8.00GiB

3. Try to delete guest test-rhel6-second via virt-manager.

Result: Guest can be deleted with no error, and img file deleted together.
# ls /var/lib/libvirt/images/test-rhel6-second-sda
ls: cannot access /var/lib/libvirt/images/test-rhel6-second-sda: No such file or directory

Seen above steps and Comment 10 and Comment 11, move this bug from ON_QA to VERIFIED.

Comment 16 errata-xmlrpc 2015-03-05 10:07:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0427.html


Note You need to log in before you can comment on or make changes to this bug.