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

Re: [virt-tools-list] Add Connection to Virt-Manager 100% from CLI?



On 04/06/2011 10:48 AM, Decker, Schorschi wrote:
> Anyone investigate or develop a program or tool to add KVM host connections to
> Virt-Manager 100% without use of the GUI?  We want to automate Virt-Manager
> configuration and the one gap we see, is no way to add a KVM host connection
> to Virt-Manager without some interactive action/task required.  This makes
> population of KVM host connections impossible via 100% automation.  Just hate
> to dig into the API, and re-invent the wheel if someone has done this?  A
> source code example would be nice of how to do it?  Not at libvirt or
> virt-manager API guru.
> 
>  
> 
> Schorschi

virt-manager uses gconf to store this value, so you can use gconf cli tools to
accomplish this.

To have virt-manager start populated with the uris xen:/// and qemu:///system,
use the command

gconftool-2 --set --type list --list-type string
/apps/virt-manager/connections/uris [xen:///,qemu:///system]

To then have virt-manager autostart qemu:///system on app startup, do

gconftool-2 --set --type list --list-type string
/apps/virt-manager/connections/autoconnect [qemu:///system]

Hope that helps,
Cole


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