Red Hat Bugzilla – Bug 432174
virt-viewer should honor VIRSH_DEFAULT_CONNECT_URI
Last modified: 2008-04-02 15:55:25 EDT
Description of problem:
Currently it is convenient to set VIRSH_DEFAULT_CONNECT_URI if you are using
qemu/kvm instead of Xen to save some typing while using virsh. For virt-viewer
you still have to type the connect uri for every single action on the command
line making it rather inconvenient to use.
I'd propose to honor the environment variable as it is set for virsh already.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. export VIRSH_DEFAULT_CONNECT_URI="qemu:///system"
2. virsh list # (lists all domains)
3. virt-viewer DOMAIN # (fails as it tries to connect to Xen)
Fails to contact Qemu.
Should use environment variable and connect to Qemu.
The latest version of libvirt has the generic LIBVIRT_DEFAULT_URI environment
variable. If the env var is not set it will also automaticaly probe for a
connection instead of assuming Xen.