Add backward compatibility for kernel vm image 89/20689/1
authorjuraj.linkes <juraj.linkes@pantheon.tech>
Wed, 17 Jul 2019 08:02:01 +0000 (10:02 +0200)
committerJuraj Linkeš <juraj.linkes@pantheon.tech>
Wed, 17 Jul 2019 08:17:12 +0000 (08:17 +0000)
https://gerrit.fd.io/r/#/c/20577/ replaced kvm kernel with custom build
of generic kernel, which would be picked up with '/opt/boot/vmlinuz*'
wildcard and which wouldn't work with this code. Fix this by adding
'-kvm' to the wildcard so that the kvm image is used with this code.

Change-Id: I9e9d978ad7c980d74f88f761b884eca599dee454
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
resources/libraries/python/QemuUtils.py

index 55da28a..707b069 100644 (file)
@@ -208,7 +208,7 @@ class QemuUtils(object):
         self._params.add('fsdev', 'local,id=root9p,path=/,security_model=none')
         self._params.add('device',
                          'virtio-9p-pci,fsdev=root9p,mount_tag=/dev/root')
-        self._params.add('kernel', '$(readlink -m {img}* | tail -1)'.
+        self._params.add('kernel', '$(readlink -m {img}*-kvm | tail -1)'.
                          format(img=self._opt.get('img')))
         self._params.add('append',
                          '"ro rootfstype=9p rootflags=trans=virtio '