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 589665 - virt-install cannot add whole disk to guest easily via storage APIs
Summary: virt-install cannot add whole disk to guest easily via storage APIs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 655920
TreeView+ depends on / blocked
 
Reported: 2010-05-06 16:01 UTC by Vivek Goyal
Modified: 2011-06-10 03:37 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:45:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0636 0 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2011-05-18 17:55:48 UTC

Description Vivek Goyal 2010-05-06 16:01:30 UTC
Description of problem:

I tried exporting a whole disk (/dev/sdb) to guest but virt-manager does not
allow that until and unless one partitions the disk (create volumes).

I think one should be able to export the whole disk and not create the partitions on the disk. (might help with alignment issues sometimes).

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2010-05-06 17:25:19 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Cole Robinson 2010-12-13 22:28:18 UTC
Fixed upstream:

http://hg.fedorahosted.org/hg/python-virtinst/rev/560f4d9015c0

Comment 5 Cole Robinson 2011-01-14 22:12:18 UTC
Fix built in python-virtinst-0.500.5-1.el6

Comment 7 Min Zhan 2011-01-18 12:11:40 UTC
Hi Cole,

I cannot reproduce this bug with virt-manager-0.8.4-8.el6.noarch,libvirt-0.8.7-2.el6.x86_64,python-virtinst-0.500.3-7.el6.noarch.

In virt-manager, I install a guest with storage setting as /dev/sdb (no partition) by cdrom. I don't see any error message when i set /dev/sdb as storage. And Everything is ok except using all space for installation. Then create a partition, an error display that not enough space on that disks. Actually I only allocate 20G of 500G for it. 

And I update the python-virtinst to python-virtinst-0.500.5-1.el6. Same behavior happens.

Actually I do not understand what 'export /dev/sdb to guest' means.please help to confirm this method is ok or not. Thanks

mzhan

Comment 8 Cole Robinson 2011-01-21 20:33:23 UTC
Sorry for the confusion. To reproduce this issue, you want to set /dev/sdb as a 'disk' storage pool. To do this, from the main virt-manager window

Edit->Host Details->Storage->'+'
Choose a 'disk' type pool
Set the source to /dev/sdb

Then try to create a new guest, and at the storage step, manually enter the path
/dev/sdb. virt-manager should throw an error. You actually might not get an error if you are running virt-manager as root, but I'm not sure.

With the newer packages, this scenario should work fine. Let me know if you have any more questions.

Comment 10 Cole Robinson 2011-02-03 17:37:23 UTC
hmm, are you running virt-manager/virt-install as root? if so, try running as your regular user or virt-manager connected remotely with virt-manager --connect qemu+ssh://root@localhost/system

Comment 11 Min Zhan 2011-02-17 09:46:15 UTC
yes, i run virt-manager as root before.

Now I try with 
- connected remotely with virt-manager --connect qemu+ssh://root@localhost/system
- run as regular user

But Still no error message pop-up in virt-manager. Guest can be installed with storage /dev/sdb. Please have a look. Thanks

Environment:
# uname -a
Linux dhcp-92-51.nay.redhat.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
qemu-kvm-0.12.1.2-2.113.el6.x86_64
libvirt-0.8.1-27.el6.x86_64
virt-manager-0.8.4-8.el6.noarch
python-virtinst-0.500.3-7.el6.noarch

Steps:
1. Use virt-manager create disk pool. 
# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
default              active     yes       
disk                 active     yes     

# virsh pool-dumpxml disk
<pool type='disk'>
  <name>disk</name>
  <uuid>f0a56a5a-3be1-08f3-37c6-07e35e47c8d1</uuid>
  <capacity>500107862016</capacity>
  <allocation>0</allocation>
  <available>500107861504</available>
  <source>
    <device path='/dev/sdb'>
    <freeExtent start='512' end='500107862016'/>
    </device>
    <format type='bsd'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

2. Create a new guest using http, make sure the storage is /dev/sdb.
# virsh dumpxml <guest>
...
 <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/sdb'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <interface type='network'>
...

Comment 12 Cole Robinson 2011-03-08 22:52:39 UTC
Here's how I reproduced with virt-install:

# rpm -Uvh --force --nodeps http://download.devel.redhat.com/brewroot/packages/python-virtinst/0.500.3/7.el6/noarch/python-virtinst-0.500.3-7.el6.noarch.rpm

(this is the only storage pool)
# sudo virsh pool-define-as --type disk --source-dev /dev/sda --name diskpool --target /dev

# sudo virsh pool-start diskpool

# sudo virt-install --name disktest --ram 64 --pxe --noautoconsole --disk path=/dev/sda
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/dev/sda'

# sudo yum update python-virtinst

# sudo virt-install --name disktest --ram 64 --pxe --noautoconsole --disk path=/dev/sda

Unfortunately that last step now hits a different error involving storage size, which I'm working on a fix for now :(

Comment 13 Min Zhan 2011-03-09 02:49:17 UTC
(In reply to comment #12)

Hi Cole,

I think comment #12 is the same as the comment #9 scenario 1. I also can reproduce this bug with virt-install in older python-virtinst package, but can not with virt-manager:(

Also seems a new issue display with new python-virtinst, please check comment #9 scenario 2.

Please give some suggestion about bug reproduce with virt-manager. Thanks

Comment 14 Cole Robinson 2011-03-09 14:37:24 UTC
I was able to reproduce with virt-manager. Additionally install

http://download.devel.redhat.com/brewroot/packages/virt-manager/0.8.4/8.el6/noarch/virt-manager-0.8.4-8.el6.noarch.rpm

Make sure the disk pool is started. Try to install a new guest, choose 'import existing disk', manually enter /dev/sda, see the error

Size must be specified for non existent volume path '/dev/sda'

Hope that helps.

Comment 15 Cole Robinson 2011-03-09 15:56:38 UTC
Since this needs an additional fix, and since all the changed code is in virtinst, reassigning.

Comment 16 Cole Robinson 2011-03-10 16:38:31 UTC
Fixed in python-virtinst-0.500.5-2.el6

Comment 18 Vivian Bian 2011-03-11 02:15:26 UTC
Verified PASS with python-virtinst-0.500.5-2.el6.noarch

# virt-install -n xxs -r 1024 -f /dev/sdb -l
http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-5-Server/U5/i386/os/
--debug

Could install the guest with /dev/sdb storage which has not partition successfully

Comment 20 errata-xmlrpc 2011-05-19 13:45:11 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0636.html


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