Re: PATCH: Graphical options for koan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, Michael. I didn't see your thread on --nogfx. My patches were applicable to koan-0.6.3-3 - not GIT (which likely contained your new code).

In any event, I would highly recommend that you revert the default console policy to text, since this will work for practically every end-user environment. VNC requires dependencies that not all users will have or /should/ have in order to use koan.

Regards,

- A.

Adam Rosenwald wrote:
Michael,

I've noticed that the default graphical console display has changed in koan-0.6.3-3 (I had previously been using v0.6.2-2). The default display is now set to "vnc".

The default console setting for python-virtinst is None. This is a good choice for a default, since /everyone/ (even those not using X every time they deploy virtuals) can view the console. The following patches push console policy to the user and defaults the console to text in the event a "-g --graphics" switch is not found.

===BEGIN app.py PATCH===
--- app.py.orig    2008-01-05 05:12:15.000000000 +0000
+++ app.py    2008-01-05 05:07:45.000000000 +0000
@@ -148,6 +148,10 @@
    p.add_option("-T", "--virt-type",
                 dest="virt_type",
                 help="virtualization install type (xenpv,qemu)")
+    p.add_option("-g", "--graphics",
+                 dest="is_graphics",
+                 action="store_true",
+                 help="use vnc console instead of text console")

    (options, args) = p.parse_args()

@@ -168,6 +172,7 @@
        k.live_cd           = options.live_cd
        k.virt_path         = options.virt_path
        k.virt_type         = options.virt_type
+        k.is_graphics       = options.is_graphics

        if options.virt_name is not None:
            k.virt_name          = options.virt_name
@@ -222,6 +227,7 @@
        self.virt_name         = None
        self.virt_type         = None
        self.virt_path         = None
+        self.is_graphics       = None

    #---------------------------------------------------

@@ -882,24 +888,26 @@
        pd = profile_data
        self.load_virt_modules()

-        arch                = self.safe_load(pd,'arch','x86')
-        kextra              = self.calc_kernel_args(pd)
-        (uuid, create_func) = self.virt_choose(pd)
-
-        virtname            = self.calc_virt_name(pd)
-
-        ram                 = self.calc_virt_ram(pd)
-
-        vcpus               = self.calc_virt_cpus(pd)
-        path_list           = self.calc_virt_path(pd, virtname)
-        size_list           = self.calc_virt_filesize(pd)
-        disks               = self.merge_disk_data(path_list,size_list)
+        arch                    = self.safe_load(pd,'arch','x86')
+        kextra                  = self.calc_kernel_args(pd)
+        (uuid, create_func)     = self.virt_choose(pd)
+        (graphics, create_func) = self.virt_choose(pd)
+
+        virtname                = self.calc_virt_name(pd)
+
+        ram                     = self.calc_virt_ram(pd)
+
+        vcpus                   = self.calc_virt_cpus(pd)
+        path_list               = self.calc_virt_path(pd, virtname)
+        size_list               = self.calc_virt_filesize(pd)
+ disks = self.merge_disk_data(path_list,size_list)

        results = create_func(
                name          =  virtname,
                ram           =  ram,
                disks         =  disks,
                uuid          =  uuid,
+                graphics      =  graphics,
                extra         =  kextra,
                vcpus         =  vcpus,
                profile_data  =  profile_data,      @@ -923,13 +931,14 @@

    def virt_choose(self, pd):
        if self.virt_type == "xenpv":
-            uuid    = self.get_uuid(self.calc_virt_uuid(pd))
+            graphics = self.is_graphics
+            uuid     = self.get_uuid(self.calc_virt_uuid(pd))
            import xencreate
-            creator = xencreate.start_paravirt_install
+            creator  = xencreate.start_paravirt_install
        elif self.virt_type == "qemu":
-            uuid    = None
+            uuid     = None
            import qcreate
-            creator = qcreate.start_install
+            creator  = qcreate.start_install
        else:
raise InfoException, "Unspecified virt type: %s" % self.virt_type
        return (uuid, creator)
===END app.py PATCH===

===BEGIN xencreate.py PATCH===
--- xencreate.py.orig    2008-01-05 05:12:30.000000000 +0000
+++ xencreate.py    2008-01-05 05:03:20.000000000 +0000
@@ -47,6 +47,7 @@
uuid=None, extra=None, vcpus=None, + graphics=None,
                           profile_data=None, arch=None):


@@ -56,7 +57,8 @@
    guest.set_name(name)
    guest.set_memory(ram)
    guest.set_vcpus(vcpus)
-#    guest.set_graphics("vnc")
+    if graphics:
+        guest.set_graphics("vnc")
    if uuid is not None:
        guest.set_uuid(uuid)
===END xencreate.py PATCH===


Regards,

- Adam.


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux