[lxc-devel] [distrobuilder/master] image/lxd: Rename resulting VM image

monstermunchkin on Github lxc-bot at linuxcontainers.org
Fri Feb 21 12:24:10 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 435 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200221/69a54291/attachment.bin>
-------------- next part --------------
From a2867d104eb06ec4804844f8a2c95eb26fbc1e04 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 21 Feb 2020 13:23:14 +0100
Subject: [PATCH] image/lxd: Rename resulting VM image

This renames the resulting VM image to "disk.qcow2" if not unified.

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 image/lxd.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/image/lxd.go b/image/lxd.go
index ddf82bd..429fa44 100644
--- a/image/lxd.go
+++ b/image/lxd.go
@@ -125,7 +125,7 @@ func (l *LXDImage) Build(unified bool, compression string, vm bool) error {
 		}
 	} else {
 		if vm {
-			err = shared.Copy(qcowImage, filepath.Join(l.targetDir, filepath.Base(qcowImage)))
+			err = shared.Copy(qcowImage, filepath.Join(l.targetDir, "disk.qcow2"))
 		} else {
 			// Create rootfs as squashfs.
 			err = shared.RunCommand("mksquashfs", l.sourceDir,


More information about the lxc-devel mailing list