Cole Robinson | 7 May 22:29
Picon
Favicon

[PATCH] virtinst: Use openAuth to support SASL and PolicyKit

The attached patch changes the virt-* cli tools to use the libvirt
openAuth function for opening connections. This allows using PolicyKit
and SASL auth with the tools.

polkit-auth is forced to run in cli mode, so no graphical dialog will be
launched. I've thought about having the --prompt flag play a role here,
but since the use cases this fulfills did not previously work, there
shouldn't be any chance of breaking existing uses.

Thanks,
Cole
# HG changeset patch
# User Cole Robinson <crobinso@...>
# Date 1241723712 14400
# Node ID 0c58ccf22773e2906853f3ac95fb3cc9ceaa158d
# Parent  2ac98205eb469857ea4110125502eab23dd8e24f
Allow PolicyKit and SASL authentication.

Use openAuth when opening the initial connection: allows PolicyKit and
SASA username/password auth.

diff -r 2ac98205eb46 -r 0c58ccf22773 virtinst/cli.py
--- a/virtinst/cli.py	Thu May 07 13:47:49 2009 -0400
+++ b/virtinst/cli.py	Thu May 07 15:15:12 2009 -0400
@@ -117,6 +117,7 @@
     print _("Exiting at user request.")
     sys.exit(0)

(Continue reading)

Guido Günther | 8 May 11:55
Gravatar

[PATCH] virt-install: allow to set nic model

Hi,
attached patch allows to set the nic model when running virt-install
via:

 --network=network:default,model=virtio

The argument parsing in get_network_opts is a bit overkill at the moment
but this way we can add mac=... more easily later.
Cheers,
 -- Guido
Attachment (nic_model.diff): text/x-diff, 5820 bytes
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Guido Günther | 8 May 16:49
Gravatar

[PATCH] virt-manager: set proper parents for dialogs

Hi,
the attached patch is a first attempt to make virt-manager better usable
under tiling window managers like awesome[1]. The problem is that
virt-manager opens dialogs without a parent set (like passing NULL as
the first argument of gtk_message_dialog_new). This patch is a first
attempt on fixing that for some of them. This way dialogs like the about
dialog get displayed in the middle of the main window instead of
floating. Does this look like the right thing to do? 
Cheers,
 -- Guido

[1] http://awesome.naquadah.org/
Attachment (parent_dialogs.diff): text/x-diff, 4378 bytes
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Cole Robinson | 11 May 20:12
Picon
Favicon

Re: [PATCH] virt-manager: set proper parents for dialogs

Guido Günther wrote:
> Hi,
> the attached patch is a first attempt to make virt-manager better usable
> under tiling window managers like awesome[1]. The problem is that
> virt-manager opens dialogs without a parent set (like passing NULL as
> the first argument of gtk_message_dialog_new). This patch is a first
> attempt on fixing that for some of them. This way dialogs like the about
> dialog get displayed in the middle of the main window instead of
> floating. Does this look like the right thing to do? 
> Cheers,
>  -- Guido
> 

I can't claim to know the ins and outs of gtk, but this seems like the
correct thing to do, and if it solves actual problems then I'm all for it.

> # HG changeset patch
> # User Guido Günther <agx@...>
> # Date 1241793452 -7200
> # Node ID 357e834adb137baf32276d013188230eb14c73de
> # Parent  5b61bd10a66b91d40ad5652a8f39b14273175292
> Add a proper parent to dialogs.
> 
> diff -r 5b61bd10a66b -r 357e834adb13 src/virtManager/about.py
> --- a/src/virtManager/about.py	Thu May 07 19:22:33 2009 +0100
> +++ b/src/virtManager/about.py	Fri May 08 16:37:32 2009 +0200
> @@ -43,9 +43,10 @@
>              "on_vmm_about_response": self.close,
>              })
>  
(Continue reading)

Cole Robinson | 11 May 20:41
Picon
Favicon

Re: [PATCH] virt-install: allow to set nic model

Guido Günther wrote:
> Hi,
> attached patch allows to set the nic model when running virt-install
> via:
> 
>  --network=network:default,model=virtio
> 
> The argument parsing in get_network_opts is a bit overkill at the moment
> but this way we can add mac=... more easily later.
> Cheers,
>  -- Guido
> 

Cool! Applied now:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virtinst--devel/rev/ea0fe33e53a8

- Cole
Cole Robinson | 11 May 20:48
Picon
Favicon

Re: RFC: virt-manager: Redesigned 'New VM' wizard

Guido Günther wrote:
> On Mon, Mar 02, 2009 at 07:50:28PM +0000, Daniel P. Berrange wrote:
>> On Mon, Mar 02, 2009 at 08:12:03PM +0100, Guido G?nther wrote:
>>> Hi Cole,
>>> this all looks great.
>>> On Fri, Feb 27, 2009 at 05:50:15PM -0500, Cole Robinson wrote:
>>>> The summary section is pretty straight forward, no surprises here.
>>>> The 'Advanced Options' section encompasses networking, hypervisor, and
>>>> architecture options. The hypervisor and arch defaults were explained above.
>>> An option to select disk (scsi, ide, virtio) and network adapter model
>>> (e1000, ...) as advanced options would be great (still defaulting to
>>> virtio if supported via the osdict) since there are some OSes that don't
>>> support all hardware out of the box and there are kvm/qemu versions that
>>> have problems with certain adapter types.
>> If there are combinations of OS,Disk that don't work IMHO we should
>> improve the OS type metadata so we don't use them. Choice of specific
>> hardware models is something we really want to keep out of the new VM
>> wizard, because the end user really isn't in a position to have the
>> knowledge to make suitable choices.
> Sometimes it's not an issue of the guest but of the hypervisor like
> missing PXE roms[1]. Attached is a patch Andreas Unterkircher that adds
> NIC model selection to the advanced options of the vm wizard (some code
> could probably be shared with vmmAddHardware).
> Cheers,
>  -- Guido
> 
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521091
> 

Ideally this is the type of issue the OS metadata should still be able
(Continue reading)

Cole Robinson | 11 May 20:52
Picon
Favicon

Re: RFC: virt-manager: Redesigned 'New VM' wizard

Cole Robinson wrote:
> Guido Günther wrote:
>> On Mon, Mar 02, 2009 at 07:50:28PM +0000, Daniel P. Berrange wrote:
>>> On Mon, Mar 02, 2009 at 08:12:03PM +0100, Guido G?nther wrote:
>>>> Hi Cole,
>>>> this all looks great.
>>>> On Fri, Feb 27, 2009 at 05:50:15PM -0500, Cole Robinson wrote:
>>>>> The summary section is pretty straight forward, no surprises here.
>>>>> The 'Advanced Options' section encompasses networking, hypervisor, and
>>>>> architecture options. The hypervisor and arch defaults were explained above.
>>>> An option to select disk (scsi, ide, virtio) and network adapter model
>>>> (e1000, ...) as advanced options would be great (still defaulting to
>>>> virtio if supported via the osdict) since there are some OSes that don't
>>>> support all hardware out of the box and there are kvm/qemu versions that
>>>> have problems with certain adapter types.
>>> If there are combinations of OS,Disk that don't work IMHO we should
>>> improve the OS type metadata so we don't use them. Choice of specific
>>> hardware models is something we really want to keep out of the new VM
>>> wizard, because the end user really isn't in a position to have the
>>> knowledge to make suitable choices.
>> Sometimes it's not an issue of the guest but of the hypervisor like
>> missing PXE roms[1]. Attached is a patch Andreas Unterkircher that adds
>> NIC model selection to the advanced options of the vm wizard (some code
>> could probably be shared with vmmAddHardware).
>> Cheers,
>>  -- Guido
>>
>> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521091
>>
> 
(Continue reading)

Daniel P. Berrange | 11 May 23:07
Picon
Favicon

Re: [PATCH] virt-manager: set proper parents for dialogs

On Mon, May 11, 2009 at 02:12:15PM -0400, Cole Robinson wrote:
> Guido Günther wrote:
> > Hi,
> > the attached patch is a first attempt to make virt-manager better usable
> > under tiling window managers like awesome[1]. The problem is that
> > virt-manager opens dialogs without a parent set (like passing NULL as
> > the first argument of gtk_message_dialog_new). This patch is a first
> > attempt on fixing that for some of them. This way dialogs like the about
> > dialog get displayed in the middle of the main window instead of
> > floating. Does this look like the right thing to do? 
> > Cheers,
> >  -- Guido
> > 
> 
> I can't claim to know the ins and outs of gtk, but this seems like the
> correct thing to do, and if it solves actual problems then I'm all for it.

This seems to pass in the main manager window to each of virt-manager's
other windows, and uses that as the parent of the about dialog. I don't
see how this will work in scenarios where the main manager window is 
not visible. If using gnome-terminal, for example with many terminals
open, the window simply gets shown above the window I select Help->About
from, and if you select 'Help -> About' from many windows, it just opens
one new instance each time. I think this is simpler than trying to keep
a singleton about window and making it track the manager window.

Daniel
--

-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
(Continue reading)

Daniel P. Berrange | 11 May 23:10
Picon
Favicon

Re: RFC: virt-manager: Redesigned 'New VM' wizard

On Mon, May 11, 2009 at 02:52:45PM -0400, Cole Robinson wrote:
> Cole Robinson wrote:
> > Guido Günther wrote:
> >> On Mon, Mar 02, 2009 at 07:50:28PM +0000, Daniel P. Berrange wrote:
> >>> On Mon, Mar 02, 2009 at 08:12:03PM +0100, Guido G?nther wrote:
> >>>> Hi Cole,
> >>>> this all looks great.
> >>>> On Fri, Feb 27, 2009 at 05:50:15PM -0500, Cole Robinson wrote:
> >>>>> The summary section is pretty straight forward, no surprises here.
> >>>>> The 'Advanced Options' section encompasses networking, hypervisor, and
> >>>>> architecture options. The hypervisor and arch defaults were explained above.
> >>>> An option to select disk (scsi, ide, virtio) and network adapter model
> >>>> (e1000, ...) as advanced options would be great (still defaulting to
> >>>> virtio if supported via the osdict) since there are some OSes that don't
> >>>> support all hardware out of the box and there are kvm/qemu versions that
> >>>> have problems with certain adapter types.
> >>> If there are combinations of OS,Disk that don't work IMHO we should
> >>> improve the OS type metadata so we don't use them. Choice of specific
> >>> hardware models is something we really want to keep out of the new VM
> >>> wizard, because the end user really isn't in a position to have the
> >>> knowledge to make suitable choices.
> >> Sometimes it's not an issue of the guest but of the hypervisor like
> >> missing PXE roms[1]. Attached is a patch Andreas Unterkircher that adds
> >> NIC model selection to the advanced options of the vm wizard (some code
> >> could probably be shared with vmmAddHardware).
> >> Cheers,
> >>  -- Guido
> >>
> >> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521091
> >>
(Continue reading)

Guido Günther | 12 May 01:04
Gravatar

Re: [PATCH] virt-manager: set proper parents for dialogs

On Mon, May 11, 2009 at 10:07:09PM +0100, Daniel P. Berrange wrote:
> This seems to pass in the main manager window to each of virt-manager's
> other windows, and uses that as the parent of the about dialog. I don't
> see how this will work in scenarios where the main manager window is 
> not visible. If using gnome-terminal, for example with many terminals
How would that be possible? It seems the about dialog can only be called
from the main window (or did I miss something?). Other dialogs that can
be opened from different menus certainly do need more care.

> open, the window simply gets shown above the window I select Help->About
> from, and if you select 'Help -> About' from many windows, it just opens
> one new instance each time. I think this is simpler than trying to keep
> a singleton about window and making it track the manager window.
I do agree iff the dialog in question can be spawned from more than one
window. The main purpose of the patch was to get an idea if using
set_transient_for is the right thing to do.
Cheers,
 -- Guido

Gmane