RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 921480 - virt-install creates sparse logical volumes by default
Summary: virt-install creates sparse logical volumes by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.4
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 953303 (view as bug list)
Depends On: 921387
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-14 10:00 UTC by Jiri Denemark
Modified: 2013-11-21 10:37 UTC (History)
13 users (show)

Fixed In Version: python-virtinst-0.600.0-17.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 921387
Environment:
Last Closed: 2013-11-21 10:37:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1604 0 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2013-11-20 21:39:12 UTC

Description Jiri Denemark 2013-03-14 10:00:10 UTC
+++ This bug was initially created as a clone of Bug #921387 +++

Created attachment 709876 [details]
Output from when it crashes when trying to remove storage pool.

Description of problem:

libvirt lvm storage pool usage seems to be broken.  virt-install can't find the lvm path and libvirtd also seems to crash when you try to undefine it.

Version-Release number of selected component (if applicable):

0.10.2-18.el6.x86_64

How reproducible:
95%

Steps to Reproduce:

 (we have an auto-install that uses /home for a majority of space)

Setup: 
1. cd /tmp
2. yes | sudo lvreduce --size $SIZE --resizefs --force /dev/sys/home
3. sudo lvcreate sys -n vg001 -l 100%FREE 
4. sudo vgcreate vg001 /dev/sys/vg001;
5. sudo service libvirtd start
6. sudo /usr/bin/virsh pool-define-as --name vg001 --type logical --target /dev/vg001
7. sudo /usr/bin/virsh pool-start vg001
8. sudo /usr/bin/virsh pool-autostart vg001
9. sudo /usr/bin/virt-install --name testhost --ram 4096 --disk pool=vg001,size=60 --boot network,hd,menu=on --graphics none --network bridge=br0,mac=52:54:00:34:51:4A   --vcpus 4 --os-variant=rhel6

Actual results:

Attempt to create virtual machine (virt-install):

Starting install...
ERROR    internal error Child process (/sbin/lvchange -aln vg001/testhost.img) unexpected exit status 5:   One or more specified logical volume(s) not found.

XML dump:

<pool type='logical'>
  <name>vg001</name>
  <uuid>820d51e9-42ea-cda8-ba3b-d5b08ee29082</uuid>
  <capacity unit='bytes'>512460062720</capacity>
  <allocation unit='bytes'>0</allocation>
  <available unit='bytes'>512460062720</available>
  <source>
    <device path='/dev/mapper/sys-vg001'/>
    <name>vg001</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/vg001</path>
    <permissions>
      <mode>0755</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

Additional info:

While the bug which prevents libvirt from creating logical volumes with zero allocation is going to be fixed, virt-install should not be doing that by default since it's not expected to work out of the box with LVM.

Comment 3 Martin Kletzander 2013-04-18 09:58:54 UTC
*** Bug 953303 has been marked as a duplicate of this bug. ***

Comment 5 Martin Kletzander 2013-07-16 07:49:04 UTC
Fixed upstream with:

commit 590c8dbebfddb71874de7a98e579264ebae6859f
Author: Martin Kletzander <mkletzan>
Date:   Tue Apr 2 13:51:28 2013 +0200

    Don't support sparse logical volumes

Comment 8 hyao@redhat.com 2013-07-23 06:11:23 UTC
The bug doesn't not reproduce with the following package: 

# rpm -qa libvirt python-virtinst
python-virtinst-0.600.0-17.el6.noarch
libvirt-0.10.2-21.el6.x86_64

Steps: 
Prepare Logical volumn Group pool  named vg001. 
Use virt-install to install a guest:

virt-install --name name --ram 4096 --disk pool=vg001,size=6 --boot cdrom,hd,menu=on --graphics none  --vcpus 4 --os-variant=rhel6


Actual result: 
No error message pops up. Installation process goes on correctly. 

check the image info and not sparse logical volumn is created:
# virsh vol-info /dev/vg001/name.img 
Name:           name.img
Type:           block
Capacity:       6.00 GiB
Allocation:     6.00 GiB

Comment 9 hyao@redhat.com 2013-07-23 06:20:28 UTC
(In reply to hyao from comment #8)
> The bug doesn't not reproduce with the following package: 
> 

The bug doesn't reproduce with the following package:
> # rpm -qa libvirt python-virtinst
> python-virtinst-0.600.0-17.el6.noarch
> libvirt-0.10.2-21.el6.x86_64
> 
> Steps: 
> Prepare Logical volumn Group pool  named vg001. 
> Use virt-install to install a guest:
> 
> virt-install --name name --ram 4096 --disk pool=vg001,size=6 --boot
> cdrom,hd,menu=on --graphics none  --vcpus 4 --os-variant=rhel6
> 
> 
> Actual result: 
> No error message pops up. Installation process goes on correctly. 
> 
> check the image info and not sparse logical volumn is created:
> # virsh vol-info /dev/vg001/name.img 
> Name:           name.img
> Type:           block
> Capacity:       6.00 GiB
> Allocation:     6.00 GiB

Comment 10 errata-xmlrpc 2013-11-21 10:37:12 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.

http://rhn.redhat.com/errata/RHBA-2013-1604.html


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