Bug 1029493 - Provisioning of RHEL7 virt guest on RHEL7 host fails
Provisioning of RHEL7 virt guest on RHEL7 host fails
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephen Herr
Red Hat Satellite QA List
Depends On: 1038821
Blocks: sat560-triage 1042363
  Show dependency treegraph
Reported: 2013-11-12 08:32 EST by Jiří Mikulka
Modified: 2014-10-06 09:46 EDT (History)
3 users (show)

See Also:
Fixed In Version: koan-2.0.7-41 spacewalk-koan-2.0.1-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1042363 (view as bug list)
Last Closed: 2014-01-10 15:25:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiří Mikulka 2013-11-12 08:32:17 EST
Description of problem:
Provisioning of RHEL7 virtual (KVM) guest on RHEL7 host fails with traceback because of missing python modules.

Version-Release number of selected component (if applicable):
Satellite: Satellite 5.6
host: RHEL-7.0-20131111.1 Server x86_64

How reproducible:

Steps to Reproduce:
1. sync RHEL7 channel to Satellite
2. register RHEL7 to the Satellite, add Virtualization entitlement
3. create RHEL7 virtual kickstart
4. schedule provisioning of RHEL7 virtual guest on registered RHEL7 host
5. on RHEL7 host run `rhn_check -vvv`
6. check the output

Actual results:
D: handle_action actionid = 41, version = 2
D: do_call kickstart_guest.initiate('<RHEL7 host>', '<satellite>:1:<virt-guest>', 'qemu', 10, '<virt-guest>', 512, 1, 3, 'virbr0', '/var/lib/libvirt/images/<virt-guest>', ' '){'cache_only': None}
- looking for Cobbler at http://<RHEL7 host>/cobbler_api
- reading URL: http://ib<RHEL7 host>/cblr/svc/op/ks/system/<satellite>:1:<virt-guest>
install_tree: http://<RHEL7 host>/ty/MbMww5qC
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/koan/app.py", line 1185, in load_virt_modules
    import xencreate
  File "/usr/lib/python2.7/site-packages/koan/xencreate.py", line 35, in <module>
    import virtinst
ImportError: No module named virtinst
no virtualization support available, install python-virtinst?
D: Sending back response(1, 'Virtual kickstart failed. Koan error.', {'koan': 'no virtualization support available, install python-virtinst?'})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}

Expected results:
RHEL7 KVM virtual guest is provisioned properly

Additional info:
looking into RHEL7 tree, there's no python-virtinst package (in RHEL7 base channel), while in RHEL5/6 the package is included in base channel
Comment 1 Stephen Herr 2013-11-21 09:45:46 EST
In RHEL 7 the python-virtinst packages has been merged into the virt-install rpm (built by the virt-manager package). We will have to update koan to look in the right place for it.
Comment 2 Stephen Herr 2013-11-21 15:56:53 EST
In RHEL 5 and 6 we depend on a package that has been in the base RHEL repo named python-virtinst. Python-virtinst is what koan calls out to to actually do the virtual machine creation if you are installing a virt guest on a host. It has to be updated to maintain compatibility with qemu and xen and whatever else. Python-virtinst provides both a python module (that koan calls) and a command-line tool that uses it.

In RHEL 7 they are no longer going to be providing python-virtinst, but have moved to the virt-install rpm. More importantly than the name change, they are no longer providing access to the python module. Upstream koan has tried to adapt by shelling out and issuing command-line commands, but at the expense of basicly rewriting about half of how koan works. They have also done so really badly; there's no way that upstream koan will function on RHEL 7 as it currently stands. It's still littered with references to the now-unavailable virtinst module.

In order to get koan fully working on RHEL 7 we will have to fix a bunch of stuff upstream, and then update our koan to work the same way. This will not be just a small bug fix though, closer to a 50% rewrite of koan, so we will need to test it thoroughly.
Comment 3 Stephen Herr 2013-11-22 18:43:38 EST
I have updated koan so that it can work on RHEL 7. It was still not working on my RHEL 7 host, but I think that was because libvirtd was broken, not our packages (error message about not finding a qemu://system driver).

Please see if you can make it work, and once libvirtd is fixed test koan a lot, especially in the area of having koan install vitual guests. That entire section of koan has been re-written. The updated koan packages should function on RHEL 5 and 6 too, not just RHEL 7, so be sure to test them there as well.

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