[lxc-devel] [lxd/master] shared/simplestreams: Fix VM image preference

stgraber on Github lxc-bot at linuxcontainers.org
Mon Apr 20 03:22:22 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200419/e367b0cb/attachment.bin>
-------------- next part --------------
From 70ef794665903ea77b31bfe39f51465974e9fb43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sun, 19 Apr 2020 23:21:58 -0400
Subject: [PATCH] shared/simplestreams: Fix VM image preference
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 shared/simplestreams/sort.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/shared/simplestreams/sort.go b/shared/simplestreams/sort.go
index 3883dbe690..a620c7e305 100644
--- a/shared/simplestreams/sort.go
+++ b/shared/simplestreams/sort.go
@@ -23,6 +23,10 @@ func (a sortedImages) Less(i, j int) bool {
 		if a[i].Properties["type"] == "squashfs" {
 			return true
 		}
+
+		if a[i].Properties["type"] == "disk-kvm.img" {
+			return true
+		}
 	}
 
 	if a[i].Properties["os"] == a[j].Properties["os"] {


More information about the lxc-devel mailing list