Bug 615239

Summary: virt-install can not recognize image file of qcow2 format when mount nfs share directory to /mnt
Product: Red Hat Enterprise Linux 6 Reporter: Johnny Liu <jialiu>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: llim, xen-maint, yoyzhang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-06 18:10:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
guest-virtinstall log file none

Description Johnny Liu 2010-07-16 09:14:19 UTC
Description of problem:
Use virt-install to install a guest with an existing image file of qcow2 format which is on a nfs share directory, the qcow2 format is not recognized.

# virsh dumpxml <guest-name>
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/win2008r2-64-virtio.qcow2'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
...

That will caused guest failed to boot up.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-15.el6.x86_64
kernel-2.6.32-49.el6.x86_64
qemu-kvm-0.12.1.2-2.95.el6.x86_64
qemu-img-0.12.1.2-2.95.el6.x86_64
selinux-policy-3.7.19-29.el6.noarch
libselinux-2.0.94-1.el6.x86_64
libselinux-utils-2.0.94-1.el6.x86_64
selinux-policy-targeted-3.7.19-29.el6.noarch
libselinux-python-2.0.94-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Modify the following lines in /etc/libvirt/qemu.conf
user = "root"
group = "root"
dynamic_ownership = 0
2. Set nfs sebool vaule,
# setsebool -P virt_use_nfs 1
# getsebool -a|grep virt
virt_use_comm --> off
virt_use_fusefs --> off
virt_use_nfs --> on
virt_use_samba --> off
virt_use_sysfs --> off
virt_use_usb --> on
3. Mount nfs share directory
# mount 10.66.90.113:/vol/xenimage/yimwang/ /mnt
4. Use virt-install to install a guest with an existing image file of qcow2 format:
# virt-install -n xx -r 512 -f /mnt/win2008r2-64-virtio.qcow2 --import

Actual results:
Guest failed to start with the following error:
Booting from Hard Disk...
Boot failed: not a bootable disk

Dump domain xml, found that the disk format is setting to "raw"
# virsh dumpxml xx
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/win2008r2-64-virtio.qcow2'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
...

After I manually edit the format to "qcow2", the guest is booted up successfully.
...
      <driver name='qemu' type='qcow2' cache='none'/>
...

Expected results:
Guest should be started successfully.

Additional info:
In step 3, if I mount the nfs share directory to /var/lib/libvirt/images/, the guest is booted up successfully.

Comment 1 Johnny Liu 2010-07-16 09:16:05 UTC
Created attachment 432328 [details]
guest-virtinstall log file

Comment 2 Johnny Liu 2010-07-16 09:17:55 UTC
python-virtinst version:
python-virtinst-0.500.3-5.el6.noarch

Comment 4 RHEL Program Management 2010-07-16 09:38:11 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 Cole Robinson 2010-08-06 18:10:04 UTC
Sounds like this is basically 620456

*** This bug has been marked as a duplicate of bug 620456 ***