Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-02-06 Thread Cole Robinson
On 02/06/2012 12:34 PM, Michael DeHaan wrote:
> 
> On Monday, February 6, 2012 at 11:37 AM, Cole Robinson wrote:
> 
>> On 02/06/2012 10:58 AM, Michael DeHaan wrote:
>>> Cole --
>>>
>>> What's the workaround to auto-start Xen PV's? (or is there not a way?)
>>>
>>> Seems like we could just implement this however needed (if xenpv
 do this
>>> instead
), if virtinstall won't do it for us.
>>
>> The autostarting code could just be conditionally enabled if virt-install is
>> new enough (just a grep of the help output) so that's not the issue.
>>
>> The issue is that current koan code manually passed a kernel + initrd for the
>> PV guest to boot. That's the only install scenario for PV guests AFAICT. And
>> this is only available via the virt-install in a version newer than what's in
>> RHEL5.
> 
> That's also how the virt installs work for everything else in koan, including
> qemu/KVM.
> 
> (Maybe I'm misunderstanding something?)
>  

This is my understanding of the current code.

Xen FV: always does a PXE boot (so guest is actually talking to PXE server):
https://github.com/cobbler/cobbler/blob/master/koan/xencreate.py#L80

Xen PV: Libvirt tells the guest to boot directly off the kernel/initrd pair
specified in profile_data["kernel_local"] and profile_data["initrd_local"]:
https://github.com/cobbler/cobbler/blob/master/koan/xencreate.py#L88

(are those kernel_local + initrd_local values filled in by cobbler or does the
user need to manually specify them?)

QEMU/KVM has two install options:

if profile_data["file"] is present, boot off it like a cdrom:
https://github.com/cobbler/cobbler/blob/master/koan/qcreate.py#L101

if profile_data["install_tree"] is present, pass the URL off to virtinst and
have it use it's tree probing to fetch kernel + initrd:
https://github.com/cobbler/cobbler/blob/master/koan/qcreate.py#L121

My implementation preserves this behavior, but in reality Xen FV and Qemu can
all boot from tree/kernel, cdrom, and pxe. Xen pv can only boot from
tree/kernel (which is the same thing basically).

My suggestion was to adapt xen pv to behave as qemu does with "install_tree".

>>
>> The workaround could be to make PV installs work like qcreate 
>> install_location
>> installs, which is basically the same as direct kernel/initrd boot but you
>> rely on virt-install to pull the kernel/initrd from the install tree. 
> 
> Just trying to make sure this wouldn't break anyone.
> 
> The install tree location isn't actually required in Cobbler, it's only a
> parameter to the kickstart 
 Are you saying we'd have to use the install
> tree method *only* for Xen PV?   If so, that might be an acceptable
> limitation
 if Xen FV or qemu/KVM requires the tree to find the
> kernel/initrd that seems bad to me, because we deal with a lot of arbitrary
> distros that express install tree locations in different ways.
>

If you have a new enough virt-install, you can pass in arbitrary kernel/initrd
path. However current koan has never done that for qcreate, it just passes the
tree location off to virtinst.

In practice, virt-install actually knows how to pull kernel/initrd from
fedora, rhel, opensuse, sles, debian, ubuntu, mandriva/mageia and we regularly
validate this against a test suite so it's historically resilient.
Of course virtinst and cobbler are duplicating functionality here but
hopefully a lot of that will end up in libosinfo over time.

> ks_meta["tree"] gives you this if someone had ran "Cobbler import" previously.
> 
> If we can avoid using that when we don't have to, that would be good
 
> 
>> Since
>> cobbler tracks this info it would probably 'just work' with a tiny patch but
>> someone would need to test. And this has been supported on virt-install
>> command line since probably rhel5.1
> 
> "it" == making autostart work for Xen PV, right?
>  

No, autostart is not the issue here. The issue is getting guests to actually
install. The autostart piece is just recent functionality to cobbler that
currently brok all installs on RHEL5 host. Fixing this would be a fairly
trivial patch on top of current koan or my code.

The more interesting piece is making xen PV installs actually work on RHEL5
where virt-install is not new enough to provide the cli option needed to have
parity with current xen PV installation, which requires passing a local kernel
+ initrd path to boot from.

Sorry if that isn't clear.

Thanks,
Cole
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-02-06 Thread Greg Swift
On Mon, Feb 6, 2012 at 08:05, Michael DeHaan wrote:

> - RHEL5 virt-install doesn't have the --boot option. This is used to
> install
>
> xen PV guests. We could work around this by enabling install_location
> support
> for PV, which xen + virt-install have supported in RHEL5 forever. But not
> sure
> how that meshes with existing deployments getting a cobbler upgrade.
>
>
> Hmm, who is using Xen PV out there?   Speak up if you are.
>
> I'm willing to shoot it.
>
>
still using it, but we can stay with our existing koan and just not upgrade


> - RHEL5 virt-install doesn't had --disk driver_type= for qemu_driver_type
> cobbler option. Not as big of a deal, users just can't specify that value
> on
> RHEL5.
>
>
> I don't think Cobbler users ever specified anything other than the default.
>
>
>
> But in that vein, currently all koan image/qemu/xen guest creation is
> broken
> on any RHEL5 since October, due to unconditional use of guest.set_autostart
> API which isn't in RHEL5.
>
>
> That's interesting as it does seem to confirm that nobody is using it.
>
> Which seems to align with my thoughts that:
>
> (A)  people don't upgrade too often
> (B)  the field is still largely VMware :)
>
> So, yeah
>

hrmph.. well i was about to upgrade to latest in epel (my production
systems are on 2.0.11)

so is this working or broken in 2.2.1 ?
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-02-06 Thread Michael DeHaan
Hmm.

Another blasphemous thought might be to just shell out to the qemu and Xen 
command line tools directly if preserving these options are important. 

Someone would have to do the legwork of making it though :)


On Monday, February 6, 2012 at 3:44 PM, Greg Swift wrote:

> On Mon, Feb 6, 2012 at 08:05, Michael DeHaan  (mailto:michael.deh...@gmail.com)> wrote:
> > - RHEL5 virt-install doesn't have the --boot option. This is used to install
> > > xen PV guests. We could work around this by enabling install_location 
> > > support
> > > for PV, which xen + virt-install have supported in RHEL5 forever. But not 
> > > sure
> > > how that meshes with existing deployments getting a cobbler upgrade.
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > Hmm, who is using Xen PV out there?   Speak up if you are.
> > 
> > I'm willing to shoot it.
> > 
> 
> still using it, but we can stay with our existing koan and just not upgrade
>  
> > > - RHEL5 virt-install doesn't had --disk driver_type= for qemu_driver_type 
> > > cobbler option. Not as big of a deal, users just can't specify that value 
> > > on
> > > RHEL5.
> > > 
> > > 
> > > 
> > 
> > 
> > I don't think Cobbler users ever specified anything other than the default. 
> >  
> > > 
> > > But in that vein, currently all koan image/qemu/xen guest creation is 
> > > broken 
> > > on any RHEL5 since October, due to unconditional use of 
> > > guest.set_autostart
> > > API which isn't in RHEL5.
> > > 
> > > 
> > > 
> > 
> > 
> > That's interesting as it does seem to confirm that nobody is using it. 
> > 
> > Which seems to align with my thoughts that:
> > 
> > (A)  people don't upgrade too often
> > (B)  the field is still largely VMware :)
> > 
> > So, yeah
> 
> hrmph.. well i was about to upgrade to latest in epel (my production systems 
> are on 2.0.11) 
> 
> so is this working or broken in 2.2.1 ?
>  
> 
> ___
> cobbler mailing list
> cobbler@lists.fedorahosted.org (mailto:cobbler@lists.fedorahosted.org)
> https://fedorahosted.org/mailman/listinfo/cobbler
> 
> 


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


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-02-06 Thread Greg Swift
> But in that vein, currently all koan image/qemu/xen guest creation is
>> broken
>> on any RHEL5 since October, due to unconditional use of
>> guest.set_autostart
>> API which isn't in RHEL5.
>>
>>
>> That's interesting as it does seem to confirm that nobody is using it.
>>
>> Which seems to align with my thoughts that:
>>
>> (A)  people don't upgrade too often
>> (B)  the field is still largely VMware :)
>>
>> So, yeah
>>
>
> hrmph.. well i was about to upgrade to latest in epel (my production
> systems are on 2.0.11)
>
> so is this working or broken in 2.2.1 ?
>
>
> just saw André's post... (saying it works if you patch it)
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-02-06 Thread Cole Robinson
On 02/06/2012 03:46 PM, Michael DeHaan wrote:
> Hmm.
> 
> Another blasphemous thought might be to just shell out to the qemu and Xen
> command line tools directly if preserving these options are important.
> 
> Someone would have to do the legwork of making it though :)
> 

Well, like I said before, I'd be okay with changing the patch to preserve the
original code if 'import virtinst' still works, and my new code would be how
koan provisions libvirt VMs on fedora17 and newer. Presumably people on RHEL5
are updating cobbler but not virtinst, so they will be using the same old code
paths.

This would also mean I have to worry less about regressing everyone's systems,
and only regressing for people that are also upgrading their host to another
major OS (say f16->f17)

However I would then recommend yall come up with a timetable of when to drop
the old virtinst code for good, and make the virt-install impl the canonical
way to provision libvirt guests, just to save yourself headaches. That would
give you time to get out ample warnings, announce it loudly, etc.

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


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-02-06 Thread Michael DeHaan
Let's do it now with this release.

Dual-maintaince of separate ways to do it leads to certain paths not being well 
tested, at it sounds like we already have
that problem in some corners.

Folks with issues about what virt-install can't do can then take it up on the 
virt-install lists, and cobbler can just
be (for virtualization) the adapter layer that instructs virt-install what to 
do (obviously keeping the reinstall and config
stuff it does as well).

If bugs arise, we can fix them.

Make it so.


On Monday, February 6, 2012 at 3:51 PM, Cole Robinson wrote:

> On 02/06/2012 03:46 PM, Michael DeHaan wrote:
> > Hmm.
> > 
> > Another blasphemous thought might be to just shell out to the qemu and Xen
> > command line tools directly if preserving these options are important.
> > 
> > Someone would have to do the legwork of making it though :)
> 
> Well, like I said before, I'd be okay with changing the patch to preserve the
> original code if 'import virtinst' still works, and my new code would be how
> koan provisions libvirt VMs on fedora17 and newer. Presumably people on RHEL5
> are updating cobbler but not virtinst, so they will be using the same old code
> paths.
> 
> This would also mean I have to worry less about regressing everyone's systems,
> and only regressing for people that are also upgrading their host to another
> major OS (say f16->f17)
> 
> However I would then recommend yall come up with a timetable of when to drop
> the old virtinst code for good, and make the virt-install impl the canonical
> way to provision libvirt guests, just to save yourself headaches. That would
> give you time to get out ample warnings, announce it loudly, etc.
> 
> - Cole 

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


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-06-28 Thread Msquared
On Mon, Feb 06, 2012 at 09:05:42AM -0500, Michael DeHaan wrote:

> Hmm, who is using Xen PV out there?   Speak up if you are.

I am.  I discovered this discussion thread when I tried

  koan --virt --virt-type=xenpv ...

and it failed with

  'ParaVirtGuest' object has no attribute 'set_autostart'


However, I see Andre mentioned patching start_install() parameters in
xencreate.py to get it working, so I can do that for the moment.

Alternatively, what is the last version of koan that could install Xen PV?
Perhaps I can just roll back koan a couple of versions...

Regards, Msquared...
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-06-28 Thread James Cammarata
On Thu, Jun 28, 2012 at 3:31 AM, Msquared <1.cobb...@msquared.id.au> wrote:
> On Mon, Feb 06, 2012 at 09:05:42AM -0500, Michael DeHaan wrote:
>
>> Hmm, who is using Xen PV out there?   Speak up if you are.
>
> I am.  I discovered this discussion thread when I tried
>
>  koan --virt --virt-type=xenpv ...
>
> and it failed with
>
>  'ParaVirtGuest' object has no attribute 'set_autostart'
>
>
> However, I see Andre mentioned patching start_install() parameters in
> xencreate.py to get it working, so I can do that for the moment.
>
> Alternatively, what is the last version of koan that could install Xen PV?
> Perhaps I can just roll back koan a couple of versions...

There are no current plans to remove that, it is still in the current version.
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-07-11 Thread Orion Poplawski


Apparently with using virt-install, it no longer passes in the kickstart boot 
option, which is a pretty serious regression.  My install attempt:


koan -v --virt-type=qemu --qemu-disk-type=virtio --qemu-net-type=virtio 
--virt-bridge=br0 --system=vmsl6rolling


generated:

- ['virt-install', '--connect', 'qemu:///system', '--name', 'vmsl6rolling', 
'--ram', '512', '--vcpus', '1', '--autostart', '--vnc', '--virt-type', 'qemu', 
'--hvm', '--location', 'http://sl.cora.nwra.com/6rolling/x86_64/os/', 
'--arch', 'x86_64', '--os-variant', 'rhel6', '--disk', 
'path=/dev/mapper/vg_root-vmsl6rolling--disk0,size=10,bus=virtio,driver_type=raw', 
'--network', 'bridge=br0,model=virtio,mac=00:16:3e:63:1b:e1', '--wait', '0', 
'--noautoconsole']


and so no kickstart.  Is this a known issue?  It should pass:


--extra-args="ks=http://cobbler.cora.nwra.com/cblr/svc/op/ks/system/vmsl6rolling 
ksdevice=link kssendmac text"




--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA, Boulder Office  FAX: 303-415-9702
3380 Mitchell Lane   or...@nwra.com
Boulder, CO 80301   http://www.nwra.com


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


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-07-11 Thread James Cammarata
On Wed, Jul 11, 2012 at 3:59 PM, Orion Poplawski  wrote:
>
> Apparently with using virt-install, it no longer passes in the kickstart
> boot option, which is a pretty serious regression.  My install attempt:
>
> koan -v --virt-type=qemu --qemu-disk-type=virtio --qemu-net-type=virtio
> --virt-bridge=br0 --system=vmsl6rolling
>
> generated:
>
> - ['virt-install', '--connect', 'qemu:///system', '--name', 'vmsl6rolling',
> '--ram', '512', '--vcpus', '1', '--autostart', '--vnc', '--virt-type',
> 'qemu', '--hvm', '--location',
> 'http://sl.cora.nwra.com/6rolling/x86_64/os/', '--arch', 'x86_64',
> '--os-variant', 'rhel6', '--disk',
> 'path=/dev/mapper/vg_root-vmsl6rolling--disk0,size=10,bus=virtio,driver_type=raw',
> '--network', 'bridge=br0,model=virtio,mac=00:16:3e:63:1b:e1', '--wait', '0',
> '--noautoconsole']
>
> and so no kickstart.  Is this a known issue?  It should pass:
>
>
> --extra-args="ks=http://cobbler.cora.nwra.com/cblr/svc/op/ks/system/vmsl6rolling
> ksdevice=link kssendmac text"

Can you try --virt-type=kvm? That's a new type introduced recently so
that it will use kernel accelerated qemu. Another user ran into this
and changing the type to kvm fixed it (and made his vm's run faster
too).

There is a definite bug in koan for qemu types right now that appears
to have slipped in with this patch.
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-07-11 Thread Orion Poplawski

On 07/11/2012 03:12 PM, James Cammarata wrote:

On Wed, Jul 11, 2012 at 3:59 PM, Orion Poplawski  wrote:


Apparently with using virt-install, it no longer passes in the kickstart
boot option, which is a pretty serious regression.  My install attempt:

koan -v --virt-type=qemu --qemu-disk-type=virtio --qemu-net-type=virtio
--virt-bridge=br0 --system=vmsl6rolling

generated:

- ['virt-install', '--connect', 'qemu:///system', '--name', 'vmsl6rolling',
'--ram', '512', '--vcpus', '1', '--autostart', '--vnc', '--virt-type',
'qemu', '--hvm', '--location',
'http://sl.cora.nwra.com/6rolling/x86_64/os/', '--arch', 'x86_64',
'--os-variant', 'rhel6', '--disk',
'path=/dev/mapper/vg_root-vmsl6rolling--disk0,size=10,bus=virtio,driver_type=raw',
'--network', 'bridge=br0,model=virtio,mac=00:16:3e:63:1b:e1', '--wait', '0',
'--noautoconsole']

and so no kickstart.  Is this a known issue?  It should pass:


--extra-args="ks=http://cobbler.cora.nwra.com/cblr/svc/op/ks/system/vmsl6rolling
ksdevice=link kssendmac text"


Can you try --virt-type=kvm? That's a new type introduced recently so
that it will use kernel accelerated qemu. Another user ran into this
and changing the type to kvm fixed it (and made his vm's run faster
too).

There is a definite bug in koan for qemu types right now that appears
to have slipped in with this patch.


Okay, with --virt-type=kvm the --extra-args are passed. Didn't change much 
with the libvirt definitions (both were using kvm) except for:



 
-  
+  

But it looks like that should be a win.

--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA, Boulder Office  FAX: 303-415-9702
3380 Mitchell Lane   or...@nwra.com
Boulder, CO 80301   http://www.nwra.com


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


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-07-11 Thread James Cammarata
> Okay, with --virt-type=kvm the --extra-args are passed. Didn't change much
> with the libvirt definitions (both were using kvm) except for:
>
>
>  
> -  
> +  
>
> But it looks like that should be a win.

Yep, kvm should be the preferred option. I'll work on fixing the bug
for those that need good old qemu though.
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] [PATCH 0/5] Port koan from virtinst to virt-install command

2012-07-12 Thread André Gemünd
Hi Msquared,

I'm surprised by that. It should be fixed afaik. Which version are you using?

Greetings
André

- Ursprüngliche Mail -
> On Mon, Feb 06, 2012 at 09:05:42AM -0500, Michael DeHaan wrote:
> 
> > Hmm, who is using Xen PV out there?   Speak up if you are.
> 
> I am.  I discovered this discussion thread when I tried
> 
>   koan --virt --virt-type=xenpv ...
> 
> and it failed with
> 
>   'ParaVirtGuest' object has no attribute 'set_autostart'
> 
> 
> However, I see Andre mentioned patching start_install() parameters in
> xencreate.py to get it working, so I can do that for the moment.
> 
> Alternatively, what is the last version of koan that could install
> Xen PV?
> Perhaps I can just roll back koan a couple of versions...
> 
> Regards, Msquared...


-- 
André Gemünd
Fraunhofer-Institute for Algorithms and Scientific Computing
andre.gemu...@scai.fraunhofer.de
Tel: +49 2241 14-2193
/C=DE/O=Fraunhofer/OU=SCAI/OU=People/CN=Andre Gemuend
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler