FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 01-05-2008, 04:34 AM
Adam Rosenwald
 
Default PATCH: Graphical options for koan

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@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 01-05-2008, 04:53 AM
Adam Rosenwald
 
Default PATCH: Graphical options for koan

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@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 01-07-2008, 02:06 PM
Michael DeHaan
 
Default PATCH: Graphical options for koan

Adam Rosenwald wrote:
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).


Correct. 0.6.4, which has a release up on the testing section of the
download URL, has the --nogfx flag.


Since that is not dependent on Cobbler's 0.7.x features that can be
released in the coming weeks, so we don't need a 0.6.3 1/2 release.




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@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


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

Thread Tools




All times are GMT. The time now is 01:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org