From 502f4c4aaadbced9771f14fca920fd29d8b180cb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 17 Apr 2017 17:45:59 +0000 Subject: [PATCH] builders: armv7 VM: copy kernel only when VM is shutdown --- tasks/virt_instance_create.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/virt_instance_create.yml b/tasks/virt_instance_create.yml index 7120ae6788..c72bc45ce8 100644 --- a/tasks/virt_instance_create.yml +++ b/tasks/virt_instance_create.yml @@ -30,7 +30,7 @@ - name: ARMv7 copy the kernel out shell: "virt-builder --get-kernel {{ volgroup }}/{{ inventory_hostname }} --output /var/lib/libvirt/images/ | awk -F/ '{print $NF}' > /var/lib/libvirt/images/{{ inventory_hostname }}-details.txt" delegate_to: "{{ vmhost}}" - when: inventory_hostname.startswith('buildvm-armv7') + when: inventory_hostname.startswith('buildvm-armv7') and inventory_hostname not in result.list_vms tags: - armv7-kernel @@ -38,14 +38,14 @@ shell: "virt-cat -a {{ volgroup }}/{{ inventory_hostname }} /boot/extlinux/extlinux.conf | grep -m1 append | sed -e 's/append //'" delegate_to: "{{ vmhost}}" register: host_cmdline - when: inventory_hostname.startswith('buildvm-armv7') + when: inventory_hostname.startswith('buildvm-armv7') and inventory_hostname not in result.list_vms tags: - armv7-kernel - name: ARMv7 update the virt parameters - virt_boot: domain={{ inventory_hostname }} kernel="/var/lib/libvirt/images/vmlinuz-4.10.8-200.fc25.armv7hl+lpae" initrd="/var/lib/libvirt/images/initramfs-4.10.8-200.fc25.armv7hl+lpae.img" cmdline={{ host_cmdline.stdout }} + virt_boot: domain={{ inventory_hostname }} kernel="/var/lib/libvirt/images/vmlinuz-4.10.10-200.fc25.armv7hl+lpae" initrd="/var/lib/libvirt/images/initramfs-4.10.10-200.fc25.armv7hl+lpae.img" cmdline={{ host_cmdline.stdout }} delegate_to: "{{ vmhost }}" - when: inventory_hostname.startswith('buildvm-armv7') + when: inventory_hostname.startswith('buildvm-armv7') and inventory_hostname not in result.list_vms tags: - armv7-kernel