<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Elaborating a bit more on the LXC support...<br><br>My idea is to support both system and app containers, but I'm focusing initially on system containers, because they are the most complex. App support would then be trivial.<br><br>I've coded a AnacondaInstaller.py that basically invokes anaconda installing to a directory which would be container root fs. I'm testing a F12 install, which completes sucessfully, but the LXC container initialization is having some quirks, mostly related to device nodes and console/mingetty. I've not implemented any cgroups logic yet, but I do plan on doing that.<br><br>As soon as this is usable, I'll post the code for review.<br><br>Thanks.<br><br>CR.<br><br><div>---<br>Cleber Rodrigues <<a href="mailto:crosa@redhat.com">crosa@redhat.com</a>><br>Solutions Architect - Red Hat, Inc.<br>Mobile: +55 61 9185.3454</div><br><br>----- Mensagem original -----<br>De: "Cole Robinson" <crobinso@redhat.com><br>Para: "Cleber Rosa" <crosa@redhat.com><br>Cc: virt-tools-list@redhat.com<br>Enviadas: Terça-feira, 16 de Fevereiro de 2010 12:47:52 (GMT-0300) Auto-Detected<br>Assunto: Re: [virt-tools-list] ostype in virtinst and libvirt<br><br>On 02/16/2010 09:08 AM, Cleber Rosa wrote:<br>> Folks,<br>> <br>> I've been playing around with python-virtinst, with the primary goal of adding an initial round of LXC support to it.<br>><br><br>Sweet, LXC support would be great.<br><br>> While reading the code, I've found that "os_type" is quite misleading. This is already recognized and one example is this comment in virtinst/Guest.py:<br>> <br>>     # GAH! - installer.os_type = "hvm" or "xen" (aka xen paravirt)<br>>     #        guest.os_type     = "Solaris", "Windows", "Linux"<br>>     # FIXME: We should really rename this property to something else,<br>>     #        change it throughout the codebase for readability sake, but<br>>     #        maintain back compat.<br>> <br>> libvirt also refers to "ostype" all over the place, one example is in conf/capabilities.c:<br>> <br>>     * virCapabilitiesAddGuest:<br>>     * @caps: capabilities to extend<br>>     * @ostype: guest operating system type ('hvm' or 'xen')<br>> <br>> I feel that, even prior to adding LXC support to python-virtinst, I would benefit from learning more about the code while fixing this. I would like to have feedback on a couple of questions:<br>> <br>>    * Should libvirt be targeted also? Would this have any impact on ABI/API stability?<br><br>Like Dan said, this can't be changed for compat reasons<br><br>>    * Has a consensus been formed about alternative names for "ostype", "installer.os_type", "guest.os_type" and the like?<br>> <br><br>I think os_type/ostype should continue to refer to the <os><type> field<br>in the domain XML, and we should change the guest.os_type to<br>'distro_type' (and os_variant to distro_variant). Even though this will<br>eventually be obsoleted by libosinfo integration, it will improve code<br>readability.<br><br>This should be as simple as s/_os_type/_distro_type/g in Guest.py, and<br>and adding<br><br>distro_type = property(get_distro_type, set_distro_type)<br># Back compat<br>get_os_type = get_distro_type<br>set_os_type = set_distro_type<br><br>Probably also want to change virt-install to match.<br><br>Thanks,<br>Cole<br></div></body></html>