Michael DeHaan wrote:
Bryan Kearney wrote:
> As part of adding the ability to deploy images in Cobbler via koan and
> virt-image I did a quick mapping between the Cobbler Image metadata and
> the metadata in the virt-image xml file. The mapping is below. I have 4
> issues which I believe need to be addressed in the image metadata.
>
> Current code (deploys with no networks) can be seen here at [1]
>
> -- bk
>
>
> Mapping
> =======
> Cobbler :: Virt-Image-XML :: Notes
> CobblerImage.name :: image.name :: Overridden at command line
>
Additionally if not overriden on the command line, it's a combination of
the object name and the date.
> CobblerImage.arch :: None :: Need to translate this since virt-image
> seems to use i686 not i386
>
I'd say go ahead and do that.
> CobblerImage.file :: image.domain.boot.drive | image.storage.disk@file
> :: What is lost is the ability to denote boot drives
>
Drives or partitions? If it's just drives, the first one in the list
could be the boot drive, no?
Which list. Can I have more then one entry in the CobblerImage.file
attribute? If so, how is it seperated?
> CobblerImage.parent :: None :: Not needed as this is internal cobbler logic
> CobblerImage.depth :: None :: Not needed as this is internal cobbler logic
> CobblerImage.owners :: None :: Not needed as this is internal cobbler logic
>
Agreed.
> CobblerImage.virt_ram :: image.domain.devices.memory ::
> CobblerImage.virt_file_size :: None ::
> CobblerImage.virt_path :: :: See issue 3
> CobblerImage.virt_cpus :: image.domain.devices.vcpu ::
> CobblerImage.virt_type :: image.domain.boot@type |
> image.domain.boot.os.loader@dev :: See Issue 4
> CobblerImage.virt_bridge :: :: See issue 1
> CobblerImage.xml_file :: None :: No need to store the file, virt-image
> is called directlry
>
Yep, I've been wanting to remove this, this is related to an earlier
attempt to implement this.
> CobblerImage.image_type :: virt-clone :: May need to break this down
> once we resolve the issues below
> CobblerImage.breed, :: None ::
> CobblerImage.os_version, :: None ::
>
>
> Issues
> ======
> 1) Cobbler supports one bridge while the virt-image.xml can support
> denoting more then one interface.
>
Cobbler supports any number of bridges, one per interface. You need to
define a system object.
If you look at xencreate.py and qcreate.py, you can see how this is handled.
So, in this case I dont think I want to create a system object. The
virt-image data defines that "This image requires N network interfaces"
it is at provisioning time this is turned into bridges, or direct
connections. I would like to be able to deinf the number of nics in in
the CobblerImage type.
> 2) How to specify more then one file, and which one is a boot drive.
>
Currently we can specify more than one virt-disk, though the syntax is a
bit kludgy.
Basically you just specify multiple --virt-paths, with each value being
comma seperated. Internally, I believe this is stored as an array.
--virt-path=VolGroup00,VolGroup01 is an example of how you could use two
LVM partitions for a virtual machine.
--virt-path=/opt/images,/opt/images is another example
In the case of using the paths cobbler will name them using the name of
the virtual machine image and the disk number, so that they do not collide.
See the question above, since I will have f raw file already, can I do
this in the file attribute?
> 2.1) In addition, how to model a disk as hda, hdb, etc
>
I'd be tempted to just use the order here. (Also everything should be
/dev/sda now in newer kernels)
> 2.2) How to model a disk as system, user, scratch
>
I don't understand this part, can you elaborate? They don't just show up
as physical disks?
The metadata allows for the delivery of scratch files. I do not know if
it is used much. Let me reach out to David on this one.
> 3) Should the image be copied? I believe so, and then perhaps virt_path
> is used
>
Absolutely needs to be copied. The --file values are going to be NFS
sources (just like installer ISO's), but unlike installer ISOs we need
to ensure each machine gets it's own storage or the tool won't be very
effective. Definitely want to use --virt-path for this.
> 4) Virt-image supports defining pygub with a kernel and initrd. There is
> no way to model this in the image data
>
I'm not sure I understand why virt-image would want to do this. It seems
like it would rather want to boot off the disk images and we'd use
regular koan (as before) to do kernel+initrd installs.
I assume this /might/ be for replacing the kernel+initrd before booting
the image though this seems to be a slightly weird use case because it
doesn't treat the virtual system like a physical system -- you could
also just yum update the kernel, no?
Again, the virt-image data lets me bundle this as a transportable item.
If the goal is to push the image data into cobbler, and hten back out, I
would need a place to store this.
>
> Defined at install time, not in metadata
> ========================================
> image.domain.devices.graphics
>
>
>
This is the "use VNC or not"? With KVM, you have to use VNC, otherwise
you have no console.
We could, if needed, look at adding this to cobbler
profiles/images/systems as an option and then replace koan's --nogfx
with --graphics=0/1 if absolutely needed, though in general I'd say
leave it on all the time.
Most people will be using the image options with KVM, and to disable the
KVM console makes it relatively useless -- there is no "virsh" analog
set up by default.
> Optional: Not Mapped
> ====================
> image.name@version
> image.name@release
> image.label
> image.description
> image.boot.features.pae
> image.boot.features.acpi
> image.boot.features.apic
> image.storage.disk@size
> image.storage.disk@format
> image.storage.disk.checksum
>
>
> [1]
http://github.com/bkearney/koan/tree/devel
>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler