By default virsh use qemu:///session instead of qemu:///system.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
{% extends 'x86.jinja2' %}
-{% set connection_command = 'virsh console --force kvm1' %}
-{% set hard_reset_command = 'virsh reset kvm1' %}
-{% set power_off_command = 'virsh destroy kvm1' %}
-{% set power_on_command = 'virsh start kvm1'' %}
+{% set connection_command = 'virsh --connect qemu:///system console --force kvm1' %}
+{% set hard_reset_command = 'virsh --connect qemu:///system reset kvm1' %}
+{% set power_off_command = 'virsh --connect qemu:///system destroy kvm1' %}
+{% set power_on_command = 'virsh --connect qemu:///system start kvm1' %}
{% set soft_reset_command = 'reboot'}
{% set boot_interface = 'net0'}
{% set kernel_extra_args = 'cpuidle.off=1'}
{% extends 'x86.jinja2' %}
-{% set connection_command = 'virsh console --force kvm2' %}
-{% set hard_reset_command = 'virsh reset kvm2' %}
-{% set power_off_command = 'virsh destroy kvm2' %}
-{% set power_on_command = 'virsh start kvm2'' %}
+{% set connection_command = 'virsh --connect qemu:///system console --force kvm2' %}
+{% set hard_reset_command = 'virsh --connect qemu:///system reset kvm2' %}
+{% set power_off_command = 'virsh --connect qemu:///system destroy kvm2' %}
+{% set power_on_command = 'virsh --connect qemu:///system start kvm2' %}
{% set soft_reset_command = 'reboot'}
{% set boot_interface = 'net0'}
{% set kernel_extra_args = 'cpuidle.off=1'}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+export LIBVIRT_DEFAULT_URI="qemu:///system"
+
tmp=$(mktemp)
virt-install --print-xml \
--name "$1" \