
5 Mar
2007
5 Mar
'07
6:22 p.m.
The current vshInit function in virsh tries some dodgy heuristics to see if it should connect readonly or read/write to the hypervisor. Unfortunately these heuristics fail, eg. when you have a root-owned system-wide qemud, and a user trying to run virsh as non-root. This patch removes the heuristics and replaces them with a simple -r | --readonly flag on the command line. If omitted, we try to connect read/write, otherwise we try to connect readonly. Note that this doesn't affect the "connect" command in the shell, which still has its own --readonly flag that is completely separate from this new global flag. Rich.