[Spacewalk-list] Attempting to create a KVM using kickstart via Spacewalk

Stephen Herr sherr at redhat.com
Tue Jan 6 15:18:51 UTC 2015


Hi Alan,

What version of Spacewalk are you using? If less that Spacewalk 2.2 I 
strongly recommend you upgrade, several bugs were fixed related to 
making virtual guest provisioning work. See 
https://bugzilla.redhat.com/show_bug.cgi?id=1109276 for example. Prior 
to Spacewalk 2.2 the arch setting is not set properly by Spacewalk and 
it's ignored and guests are always created with the same CPU 
architecture as the host. In 2.2 the arch setting is should be set 
properly and followed. You can update it for this kickstart profile 
through the cobbler command line, but if you change anything about the 
profile and save the changes in the Spacewalk webui then the arch should 
be updated.

In order for virsh console to work you must define a tty console in the 
extra kernel args. I don't remember off the top of my head how to do 
that, but that's one path to explore. Something that would probably be 
easier is to debug your guest kickstarting on a host that you have 
physical access to (and that has a monitor), and use virt-viewer or 
virt-manager to view the guest's console.

I'm also interested in what version of koan you have on the host and 
what version of cobbler you're running on the Spacewalk server.

-Stephen

On 12/31/2014 11:27 AM, Alan Pittman wrote:
> Hi,
>   Hopefully everyone had a good holiday. I'm not expecting any replies until after the first of the year. :)
>
>   I am trying to set up a Spacewalk kickstart build of a KVM guest and I'm not getting verify far. Not knowing what the problem is prevents me from doing a successful Google search to find any answers, so I am hoping someone on the list can help.
>
> I am using the Quick Start Guide for Spacewalk (kickstart) found on the wiki page and referenced the Satellite 5.5 Reference Guide.
>
> I successfully created a kickstart channel and profile and I am trying the use koan as suggested towards the end of the instructions. The problem is that once koan starts and begins the domain creation,  it disconnects and tells me that I have to reconnect to the console. Here's the output:
>
> Starting install...
> Retrieving file .treeinfo...                             | 3.3 kB     00:00 ...
> Retrieving file vmlinuz...                               | 7.2 MB     00:00 ...
> Retrieving file initrd.img...                            |  57 MB     00:00 ...
> Creating domain...                                       |    0 B     00:00
> Domain installation still in progress. You can reconnect to
> the console to complete the installation process.
>
> So I do reconnect:
>
> [root at srhelvs21 ~]# virsh console sccrxa21-vm
> Connected to domain sccrxa21-vm
> Escape character is ^]
>
> But then nothing happens. The session is locked. I can't get a response if I hit enter or any of the keys. I can't even break out at this point.
>
> So at this point I'm stuck. I have no idea what's going on, so I don't know if I have any configuration issues or what.
>
> In case someone is interested, here's my complete koan script:
> #!/bin/bash
>
> /usr/bin/koan --server=pspwks20.publix.com  \
>           --virt \
>           --virt-name sccrxa23-vm \
>           --virt-path /kvm/sccrxa23 \
>           --profile=rhel6-64bit-ccrx-ks-profile:1:SpacewalkDefaultOrganization \
>           --nogfx
>
> And here is the output that koan generates before it begins the build process:
>
> - looking for Cobbler at http://pspwks20.publix.com:80/cobbler_api
> - reading URL: http://pspwks20.publix.com/cblr/svc/op/ks/profile/rhel6-64bit-ccrx-ks-profile:1:SpacewalkDefaultOrganization
> install_tree: http://pspwks20.publix.com/ks/dist/ccrx-kvm-guest
> - ['rpm', '-q', 'virt-install']
> - ['rpm', '-q', 'python-virtinst']
> libvirtd (pid  5605) is running...
> - ['virt-install', '--version']
> - ['qemu-img', 'create', '-f', 'raw', '/kvm/sccrxa23/sccrxa23-vm-disk0', '3G']
> Formatting '/kvm/sccrxa23/sccrxa23-vm-disk0', fmt=raw size=3221225472
> - adding disk: /kvm/sccrxa23/sccrxa23-vm-disk0 of size 3 (driver type=raw)
> - ['virt-install', '--connect', 'qemu:///system', '--name', 'sccrxa23-vm', '--ram', '512',
>   '--vcpus', '1', '--autostart', '--nographics', '--virt-type', 'qemu', '--machine', 'pc', '--hvm',
> '--extra-args=ksdevice=link lang= console=ttyS0,115200 text ks=http://pspwks20.publix.com/cblr/svc/op/ks/profile/rhel6-64bit-ccrx-ks-profile:1:SpacewalkDefaultOrganization serial kssendmac ',
> '--location', 'http://pspwks20.publix.com/ks/dist/ccrx-kvm-guest/',
>   '--arch', 'i386', '--os-variant', 'generic26', '--disk', 'path=/kvm/sccrxa23/sccrxa23-vm-disk0,size=3,format=raw',
>   '--network', 'bridge=br0', '--wait', '0', '--noautoconsole']
>
> There are a few things I would like to change, but I can't figure out where to make the changes. These options are:
> '--arch', 'i386', <<<< - this should be x86_64
>   '--os-variant', 'generic26' <<<<- this should be rhel6
>
> Any help in pointing me in the right direction would be appreciated.
>
> Alan
>
> Remember, Unix is user friendly. It’s very selective about who its friends are.
>
>
>
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
>




More information about the Spacewalk-list mailing list