Users/Groups Permissions

--_000_9cd67cf34aaa42f180fe29c2fc2e9fd9ooegvat_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi! Still new to oVirt and got another question: I have many Windows and Linux VMs and created for each the Windows and Linu= x machines two Usergroups (limited and admins). Now I want to grant the groups according permissions to according VMs. How = can I do this without clicking through every VM manually (e.g. by mark seve= ral vms in the UI and manage their permissions or via CLI)? Many thanks in advance, Markus Schaufler, MSc Amt der O=F6. Landesregierung Direktion Pr=E4sidium Abteilung Informationstechnologie Referat ST3 Server A-4021 Linz, K=E4rntnerstra=DFe 16 Tel.: +43 (0)732 7720 - 13138 Fax: +43 (0)732 7720 - 213255 email: markus.schaufler@ooe.gv.at<mailto:markus.schaufler@ooe.gv.at> Internet: www.land-oberoesterreich.gv.at<http://www.land-oberoesterreich.gv= .at/> DVR: 0069264 Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschlie= =DFlich Informationszwecken. Rechtsg=FCltige Erkl=E4rungen d=FCrfen =FCber dieses Medium nur an das offi= zielle Postfach it.post@ooe.gv.at<mailto:it.post@ooe.gv.at> =FCbermittelt w= erden. --_000_9cd67cf34aaa42f180fe29c2fc2e9fd9ooegvat_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 1"> <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-fareast-language:EN-US;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} span.E-MailFormatvorlage17 {mso-style-type:personal-compose; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri",sans-serif; mso-fareast-language:EN-US;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 2.0cm 70.85pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"DE-AT" link=3D"#0563C1" vlink=3D"#954F72"> <div class=3D"WordSection1"> <p class=3D"MsoNormal">Hi!<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">Still new to oVirt and got another question:<o:p></o= :p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">I have many Windows and Linux VMs and created for ea= ch the Windows and Linux machines two Usergroups (limited and admins). <o:p></o:p></p> <p class=3D"MsoNormal">Now I want to grant the groups according permissions= to according VMs. How can I do this without clicking through every VM manu= ally (e.g. by mark several vms in the UI and manage their permissions or vi= a CLI)?<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">Many thanks in advance,<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><b><span lang=3D"DE" s= tyle=3D"font-size:10.0pt;font-family:"Arial",sans-serif;color:bla= ck;mso-fareast-language:DE-AT">Markus Schaufler, MSc</span></b><span lang= =3D"DE" style=3D"font-size:10.0pt;font-family:"Arial",sans-serif;= color:black;mso-fareast-language:DE-AT"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span lang=3D"DE" styl= e=3D"font-size:6.0pt;font-family:"Times New Roman",serif;color:#1= F497D;mso-fareast-language:DE-AT"><o:p> </o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span lang=3D"DE" styl= e=3D"font-size:8.0pt;font-family:"Arial",sans-serif;color:black;m= so-fareast-language:DE-AT">Amt der O=F6. Landesregierung<br> Direktion Pr=E4sidium<o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span lang=3D"DE" styl= e=3D"font-size:8.0pt;font-family:"Arial",sans-serif;color:black;m= so-fareast-language:DE-AT">Abteilung Informationstechnologie<o:p></o:p></sp= an></p> <p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt;text-autospace:none"><= span lang=3D"DE" style=3D"font-size:8.0pt;font-family:"Arial",san= s-serif;color:black;mso-fareast-language:DE-AT">Referat ST3 Server<o:p></o:= p></span></p> <p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt;text-autospace:none"><= span lang=3D"DE" style=3D"font-size:8.0pt;font-family:"Arial",san= s-serif;color:black;mso-fareast-language:DE-AT">A-4021 Linz, K=E4rntnerstra= =DFe 16</span><span lang=3D"DE" style=3D"font-size:4.0pt;font-family:"= Arial",sans-serif;color:purple;mso-fareast-language:DE-AT"><o:p></o:p>= </span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><b><span style=3D"font= -size:8.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast= -language:DE-AT">Tel.:</span></b><span style=3D"font-size:8.0pt;font-family= :"Arial",sans-serif;color:purple;mso-fareast-language:DE-AT">&nbs= p; </span><span style=3D"font-size:8.0pt;font-family:"Arial",sans-se= rif;color:black;mso-fareast-language:DE-AT">+43 (0)732 7720 – 131= 38</span><span style=3D"font-size:8.0pt;font-family:"Arial",sans-= serif;color:#1F497D;mso-fareast-language:DE-AT"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><b><span style=3D"font= -size:8.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast= -language:DE-AT">Fax:</span></b><span style=3D"font-size:8.0pt;font-family:= "Arial",sans-serif;color:purple;mso-fareast-language:DE-AT"> = ; </span><span style=3D"font-size:8.0pt;font-family:"Arial",sans-se= rif;color:black;mso-fareast-language:DE-AT">+43 (0)732 7720 - 213255<o:= p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><b><span lang=3D"EN-US= " style=3D"font-size:8.0pt;font-family:"Arial",sans-serif;color:g= ray;mso-fareast-language:DE-AT">email:</span></b><span lang=3D"EN-US" style= =3D"font-size:8.0pt;font-family:"Arial",sans-serif;color:purple;m= so-fareast-language:DE-AT"> </span><span lang=3D"EN-US" style=3D"font-size:8.0pt;font-family:"Aria= l",sans-serif;color:#1F497D;mso-fareast-language:DE-AT"><a href=3D"mai= lto:markus.schaufler@ooe.gv.at"><span style=3D"color:#0563C1">markus.schauf= ler@ooe.gv.at</span></a></span><span lang=3D"EN-US" style=3D"font-size:8.0p= t;font-family:"Times New Roman",serif;color:#1F497D;mso-fareast-l= anguage:DE-AT"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><b><span style=3D"font= -size:8.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast= -language:DE-AT">Internet:</span></b><span style=3D"font-size:8.0pt;font-fa= mily:"Arial",sans-serif;color:blue;mso-fareast-language:DE-AT"> </span><span lang=3D"EN-US" style=3D"font-size:8.0pt;font-family:"Aria= l",sans-serif;color:#1F497D;mso-fareast-language:DE-AT"><a href=3D"htt= p://www.land-oberoesterreich.gv.at/"><span lang=3D"DE-AT" style=3D"color:bl= ue">www.land-oberoesterreich.gv.at</span></a></span><span style=3D"font-siz= e:8.0pt;font-family:"Times New Roman",serif;color:#1F497D;mso-far= east-language:DE-AT"><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><b><span lang=3D"DE" s= tyle=3D"font-size:8.0pt;font-family:"Arial",sans-serif;color:gray= ;mso-fareast-language:DE-AT">DVR:</span></b><span lang=3D"DE" style=3D"font= -size:8.0pt;font-family:"Arial",sans-serif;color:purple;mso-farea= st-language:DE-AT"> </span><span lang=3D"DE" style=3D"font-size= :8.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-lan= guage:DE-AT">0069264</span><span lang=3D"DE" style=3D"font-size:8.0pt;font-= family:"Arial",sans-serif;color:purple;mso-fareast-language:DE-AT= "><o:p></o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span lang=3D"DE" styl= e=3D"font-size:4.0pt;font-family:"Arial",sans-serif;color:purple;= mso-fareast-language:DE-AT"><o:p> </o:p></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span lang=3D"DE" styl= e=3D"font-size:8.0pt;font-family:"Arial",sans-serif;mso-fareast-l= anguage:DE-AT">Der Austausch von Nachrichten mit o.a. Absender via e-mail d= ient ausschlie=DFlich Informationszwecken.<br> Rechtsg=FCltige Erkl=E4rungen d=FCrfen =FCber dieses Medium nur an das offi= zielle Postfach <a href=3D"mailto:it.post@ooe.gv.at"><span style=3D"color:windowtext">it.po= st@ooe.gv.at</span></a> =FCbermittelt werden.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"mso-fareast-language:DE-AT"><o:p>&nbs= p;</o:p></span></p> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> </body> </html> --_000_9cd67cf34aaa42f180fe29c2fc2e9fd9ooegvat_--

On 03/05/2018 10:42 AM, Markus.Schaufler@ooe.gv.at wrote:
Hi!
Still new to oVirt and got another question:
I have many Windows and Linux VMs and created for each the Windows and Linux machines two Usergroups (limited and admins).
Now I want to grant the groups according permissions to according VMs. How can I do this without clicking through every VM manually (e.g. by mark several vms in the UI and manage their permissions or via CLI)?
You can use our Python SDK, please see below example: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/assign_pe... Or you can use Ansible if you are familiar with it: http://docs.ansible.com/ansible/latest/ovirt_permissions_module.html#example... The playbook would look like: --- - hosts: localhost connection: local vars: username: admin@internal password: thepassowrd insecure: True url: https://ovirt.example.com/ovirt-engine/api tasks: - name: Obtain SSO token ovirt_auth: url: "{{ url }}" username: "{{ username }}" password: "{{ password }}" insecure: "{{ insecure }}" - name: Add permissions to user ovirt_permissions: auth: "{{ ovirt_auth }}" user_name: user2 authz_name: internal-authz object_type: vm object_name: "{{ item }}" role: UserVmManager with_items: - myvm1 - myvm2 - myvm3 - name: Revoke SSO token ovirt_auth: state: absent ovirt_auth: "{{ ovirt_auth }}"
Many thanks in advance,
*Markus Schaufler, MSc*
Amt der Oö. Landesregierung Direktion Präsidium
Abteilung Informationstechnologie
Referat ST3 Server
A-4021 Linz, Kärntnerstraße 16
*Tel.:*+43 (0)732 7720 – 13138
*Fax:*+43 (0)732 7720 - 213255
*email:*markus.schaufler@ooe.gv.at <mailto:markus.schaufler@ooe.gv.at>
*Internet:*www.land-oberoesterreich.gv.at <http://www.land-oberoesterreich.gv.at/>
*DVR:*0069264
Der Austausch von Nachrichten mit o.a. Absender via e-mail dient ausschließlich Informationszwecken. Rechtsgültige Erklärungen dürfen über dieses Medium nur an das offizielle Postfach it.post@ooe.gv.at <mailto:it.post@ooe.gv.at> übermittelt werden.
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (2)
-
Markus.Schaufler@ooe.gv.at
-
Ondra Machacek