From: Jonathan Rajotte Date: Mon, 19 Nov 2018 21:10:26 +0000 (-0500) Subject: Use system libvirt session instead of user X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0bff60fb7ea5debc26fce47d6dcdd2f78512e6c3;p=lttng-ci.git Use system libvirt session instead of user By default virsh use qemu:///session instead of qemu:///system. Signed-off-by: Jonathan Rajotte --- diff --git a/lava/devices/kvm1.jinja2 b/lava/devices/kvm1.jinja2 index d78a57f..a0c57f4 100644 --- a/lava/devices/kvm1.jinja2 +++ b/lava/devices/kvm1.jinja2 @@ -1,8 +1,8 @@ {% 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'} diff --git a/lava/devices/kvm2.jinja2 b/lava/devices/kvm2.jinja2 index 3f57c3d..6bda083 100644 --- a/lava/devices/kvm2.jinja2 +++ b/lava/devices/kvm2.jinja2 @@ -1,8 +1,8 @@ {% 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'} diff --git a/lava/kvm/generate_kvm_virsh.sh b/lava/kvm/generate_kvm_virsh.sh index ab5511b..9becc91 100755 --- a/lava/kvm/generate_kvm_virsh.sh +++ b/lava/kvm/generate_kvm_virsh.sh @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +export LIBVIRT_DEFAULT_URI="qemu:///system" + tmp=$(mktemp) virt-install --print-xml \ --name "$1" \