Michael DeHaan wrote:
Ronald J. Yacketta wrote:
  
Michael DeHaan wrote:
    
Ronald J. Yacketta wrote:
  
      
Hello,

Thanks Michael for setting me straight on my previous inquiry 
regarding '--rebuild-self' , I have sorted that out and now am having 
a bit of a spat getting fully unattended koan --virt installs working.
    
        
Most likely you need to use a profile that has a xen kernel distro as 
it's parent, not a non-xen one.

If you created your distributions/profiles with "cobbler import" 
originally, you should have something like a Fedora-9-xen distro available.

  
      
Unfortunately we are unable to use 'cobbler import' as we currently 
maintain several repos for various releases of FC, CentoS etc. Running 
a 'cobbler import' would in theory duplicate the repositories. We are 
considering NFS mounting the repositories onto the Cobbler server at a 
later date to allow us to 'cobbler import'.
    

Ah, but that in fact works!

cobbler import --name=all-my-distros --mirror=/mnt/mynfsshare 
--available-as=nfs://mynfsserver:/mynfsroot
  
I can not refute that :) unfortunately due to our repo setup exporting it via nfs is not a valid option at this time (symlinks are not happy with nfs ;) )

Skipping the import chat (for the time being) is there anything wrong with the following configuration that would cause "koan --vert" to throw the exception (
creating domain: (2, 'Invalid kernel', 'xc_dom_find_loader: no loaderfound\\n')")) posted earlier while "virt--install" (using the same install location and kickstart) runs fine?

commands for reference:
# virt-install --paravirt -f /var/lib/xen/images/f8guest1 -s 5 -r 1024 -n FC8-virt-inst --vnc -x ks=http://[CobblerServer]/cblr/svc/op/ks/profile/fc8-ks -l http://[RepoServer]/f8


# koan --vert --server=[CoberServer] --profile=fc8-ks --virt-name=f8guest1 
# cobbler distro report --name=fc8
distro               : fc8
breed                : redhat
os version           :
architecture         : i386
initrd               : /var/tftpboot/fc8/initrd.img
kernel               : /var/tftpboot/fc8/vmlinuz
kernel options       : {}
post kernel options  : {}
ks metadata          : {}
owners               : ['admin']

# cobbler repo report --name=fc8-repo
repo             : fc8-repo
arch             :
createrepo_flags : -c cache
keep updated     : True
mirror           : http://[RepoServer]
/f8
mirror locally   : False
owners           : ['admin']
priority         : 99
rpm list         :
yum options      : {}

# cobbler profile report --name=fc8-ks
profile              : fc8-ks
distro               : fc8
dhcp tag             : default
kernel options       : {}
post kernel options  : {}
kickstart            : /etc/cobbler/fc8.ks
ks metadata          : {}
owners               : ['admin']
repos                : ['fc8-repo']
server               : <<inherit>>
virt bridge          : xenbr0
virt cpus            : 1
virt file size       : 5
virt path            :
virt ram             : 1024
virt type            : xenpv



That imports everything on the NFS share, assuming the root of the NFS 
share is as given, and all relative paths and so forth are calculated 
after that.  Available as also does http and ftp.

Also, as a terminology item, these are "install trees" not "repos".   
Install trees have components that can be used as repos, but contain 
additional data.

Repos in cobbler are for things like updates or extra packages, like 
epel, etc.

  
(when using KVM on VT capable hardware, the need for this difference 
goes away, as it does not need special kernels -- same for fullvirt Xen, 
though this requires PXE to deploy and may not be suitable for all 
environments -- koan still works, but it assumes your cobbler server is 
also serving up PXE -- and
also requires VT hardware -- for most folks, xen paravirt is still suitable)

--Michael

  
      
Am I missing a difference between koan --vert (xenpv) and virt--installl --paravirt?

I run the following fine without issue (fully automated)

virt-install --paravirt -f /var/lib/xen/images/f9guest1 -s 5 -r 1024 -n FC9-virt-inst --vnc -x ks=http://[CobblerServer]/cblr/svc/op/ks/profile/fc9 -l http://[RepoServer]/f9

but a 
koan --vert --server=[CoberServer] --profile=fc9 --virt-name=f9guest1 

fails in that PXE boot starts and throws up the menu as if there was no .ks .


-Ron
  
    
running the koan command as follows:
[@bs2-2 ~]# koan --virt --server=[CobblerServerName] --profile=fc9 
--virt-name=Cobbler-FC9
- reading URL: http://[CobblerServerName]/cblr/svc/op/ks/profile/fc9
install_tree: http://[RepoServerName]/f9
libvirtd (pid 2079) is running...
downloading initrd initrd.img to /var/lib/xen/initrd.img
url=http://[CobblerServerName]/cobbler/images/fc9/initrd.img
- reading URL: http://[CobblerServerName]/cobbler/images/fc9/initrd.img
downloading kernel vmlinuz to /var/lib/xen/vmlinuz
url=http://[CobblerServerName]/cobbler/images/fc9/vmlinuz
- reading URL: http://[CobblerServerName]/cobbler/images/fc9/vmlinuz
libvir: Xen Daemon error : GET operation failed:
libvir: Xen Daemon error : GET operation failed:
libvir: Xen Daemon error : POST operation failed: (xend.err "Error 
creating domain: (2, 'Invalid kernel', 'xc_dom_find_loader: no loader 
found\\n')")
<class 'libvirt.libvirtError'>
virDomainCreateLinux() failed POST operation failed: (xend.err "Error 
creating domain: (2, 'Invalid kernel', 'xc_dom_find_loader: no loader 
found\\n')")
  File "/usr/lib/python2.5/site-packages/koan/app.py", line 165, in main
    k.run()
   File "/usr/lib/python2.5/site-packages/koan/app.py", line 373, in run
    self.virt()
   File "/usr/lib/python2.5/site-packages/koan/app.py", line 644, in virt
    return self.net_install(after_download)
   File "/usr/lib/python2.5/site-packages/koan/app.py", line 563, in 
net_install
    after_download(self, profile_data)
   File "/usr/lib/python2.5/site-packages/koan/app.py", line 642, in 
after_download
    self.virt_net_install(profile_data)
   File "/usr/lib/python2.5/site-packages/koan/app.py", line 920, in 
virt_net_install
    bridge        =  self.virt_bridge
   File "/usr/lib/python2.5/site-packages/koan/xencreate.py", line 
165, in start_install
    guest.start_install()
   File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 
813, in start_install
    return self._do_install(consolecb, meter)
   File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 
834, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
   File "/usr/lib/python2.5/site-packages/libvirt.py", line 573, in 
createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', 
conn=self)




I also dropped back and did a virt-install (xenpv) using the same 
fc9.ks and everything worked fine.
[~]# virt-install --paravirt -f /var/lib/xen/images/Cobbler-FC9 -s 5 -r 1024 -n Cobbler-FC9 --vnc -l http://[RepoServerName]/f9 -x ks=http://[CobblerServerName]/cblr/svc/op/ks/profile/fc9

Here is the distro and profile setup that I have been working with :

[~]# cobbler distro report --name=fc9
distro               : fc9
breed                : redhat
os version           :
architecture         : i386
initrd               : /var/tftpboot/fc9/initrd.img
kernel               : /var/tftpboot/fc9/vmlinuz
kernel options       : {}
post kernel options  : {}
ks metadata          : {}
owners               : ['admin']

[~]# cobbler profile report --name=fc9
profile              : fc9
distro               : fc9
dhcp tag             : default
kernel options       : {}
post kernel options  : {}
kickstart            : /etc/cobbler/fc9.ks
ks metadata          : {}
owners               : ['admin']
repos                : []
server               : <<inherit>>
virt bridge          : xenbr0
virt cpus            : 1
virt file size       : 5
virt path            :
virt ram             : 1024
virt type            : xenfv




------------------------------------------------------------------------

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
  
    
        
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
  
      
------------------------------------------------------------------------

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
  
    

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler