[Spacewalk-list] [Spacewalk 2.3] [CentOS7] Provisioning VMs through Spacewalk making VMs as QEMU

Mriswithe mriswithe at gmail.com
Fri Aug 7 04:22:17 UTC 2015


To preface this, I hit a couple different errors along the way here I
wanted to bring up and see if I am missing something, or if I need to file
a bug, or there is one and I can't find it. Also just to note, I understand
the difference between QEMU and KVM here, these are being made as QEMU
non-hardware virtual machines as opposed to proper KVM VMs. The system is a
PE2950 III and is more than capable of running VMs, it is not a hardware
limitation.

VM of CentOS7 with Spacewalk 2.3 installed with cobbler and the rest. I
have my KVM host registered to the Spacewalk server, the KVM host is also
CentOS7. The virtualization tab shows up, I am able to provision new VMs,
they push to the KVM host and start installing. The installs are
successful. Unfortunately the installs take 90+ minutes because the VMs are
being requested with --virt-type qemu

I synced the CentOS7 packages and trees initially using
spacewalk-common-channels, had to renamed the repository as the name had
parenthesis in it, and defining the distribution, if the tree path had
parenthesis, it would remove them when attempting to save. Also, the
default label is not acceptable, but more easily fixed. The tree path
required a change to the repository name, then another sync, then manual
removal of the old tree path.

I created a kickstart profile, the profile has Virtualization type "KVM
Virtualized Guest" selected. This is going to be kickstarted on KVM. I
don't see a good text way to dump my kickstart config and also show the
virtualization I have chosen. Cobbler though has the profile for this:

# cobbler profile dumpvars --name
CentOS_7-KVM:1:SpacewalkDefaultOrganization | grep -i virt_type
default_virt_type : kvm
virt_type : qemu

Also the system's config itself:

# cobbler system dumpvars --name node2.internal.mriswithe.com:1:test_machine
| grep -i virt_type
default_virt_type : kvm
virt_type : qemu

Of note at this point, is that koan will fail to run if I am running the
current version of virt-install. I am running:

virt-install-0.10.0-20.el7.noarch

Whereas the current is:

virt-install-1.1.0-12.el7.noarch

If I do not run the older version of virt-install, the rhn_check process
will error and provisioning will show as failed on the Spacewalk side. see
this function/method:

https://github.com/cobbler/koan/blob/master/koan/app.py#L731-L741


And this is what I see from an rhn_check -v on the KVM host after trimming
out some irrelevant info:

- reading URL:
http://spacewalk.internal.mriswithe.com/cblr/svc/op/ks/system/node2.internal.mriswithe.com:1:test_machine
install_tree: http://spacewalk.internal.mriswithe.com/ty/J42MEZYS
- ['/usr/bin/virt-install', '--version']
- ['virt-install', '--version']
- ['virt-install', '--os-variant', 'list']
- ['osinfo-query', 'os']
- ['qemu-img', 'create', '-f', 'raw',
'/var/lib/libvirt/images/test_machine', '3G']
Formatting '/var/lib/libvirt/images/test_machine', fmt=raw size=3221225472
- adding disk: /var/lib/libvirt/images/test_machine of size 3 (driver
type=raw)
- ['virt-install', '--connect', 'qemu:///system', '--name', 'test_machine',
'--ram', '1024', '--vcpus', '1', '--autostart', '--vnc', '--virt-type',
'qemu', '--machine', 'pc', '--hvm', '--location', '
http://spacewalk.internal.mriswithe.com/ty/J42MEZYS/', '--extra-args=ks=
http://spacewalk.internal.mriswithe.com/cblr/svc/op/ks/system/node2.internal.mriswithe.com:1:test_machine
ksdevice=link kssendmac lang= text ', '--arch', 'x86_64', '--os-variant',
'rhel7', '--disk',
'path=/var/lib/libvirt/images/test_machine,size=3,format=raw', '--network',
'bridge=bridge0.300,mac=00:16:3e:3b:d0:ba', '--wait', '0',
'--noautoconsole']


Note, it does go on to create the VM, but that is irrelevant. The install
will complete, after roughly 95 minutes. If I create a VM and just pxe boot
it with a MAC that a system has been created with, it will install in under
10 minutes start to finish.

The settings I am seeing here and unable to change after hours of google
and documentation and just brute force searching the filesystem (and a
small amount of spelunking in the database).

 '--virt-type', 'qemu'
 '--disk', 'path=/var/lib/libvirt/images/test_machine,size=3,format=raw'

I would like to use proper KVM hardware virtualization, and the QCOW format
for my storage.

To show the difference here, this is the machine Spacewalk/Koan made:

# virsh dumpxml test_machine| grep domain\ type
<domain type='qemu' id='15'>

while this is one made in virt-manager:

# virsh dumpxml made_in_virt_manager | grep domain\ type
<domain type='kvm' id='16'>

Is there somewhere where I can define these settings so that it doesn't
assume settings I don't want?

Thanks,
Mriswithe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150806/0526ce46/attachment.htm>


More information about the Spacewalk-list mailing list