From owner-freebsd-hackers@freebsd.org Fri Mar 23 15:42:22 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CA6CF528F8 for ; Fri, 23 Mar 2018 15:42:22 +0000 (UTC) (envelope-from kamisouckova@gmail.com) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2607A721 for ; Fri, 23 Mar 2018 15:42:21 +0000 (UTC) (envelope-from kamisouckova@gmail.com) Received: by mail-io0-f179.google.com with SMTP id o4so15647125iod.3 for ; Fri, 23 Mar 2018 08:42:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6zE8kPI7A0ALjnQfaiji4OMZVfQOAFZYdn0uXeBwZQE=; b=lAjM4+jbBjcuaNL7QG3yie34yMta7/p9TBTLc09kgt+ydjywfUHJ1tqJ2kdlsgloi2 JI6hEX+qovUyKrdlSQ+RUj6UhCIjuG6Sa+7Bonusaw35XKrKMBZkRAPUfrudpnbxIKm8 d52RRrQ6FMhvlIP8qriwBHR9LTaVK+GdLyYxzooAh6DF13SFFeN7B4HpVUHEkqVE/naK CsvwPDKiTWS+dZ4tQlITi9auDjmoX3al6DZ99rz6FcFiwjD9j0Pkd2a11z3Cw+t64aLu lsHn8gFVClkQCmGQJOAD1G70fIEEo3TGkpZkPXaukVgakHwAGtKn5E9DeuPjPhCHk6yW Qkwg== X-Gm-Message-State: AElRT7HsCGdgxncmRjBXqdaQLp9tVWI2FyjP4hsNfcL166YcE1uN/oLK a+uyVx2rKelccsfLVx9lJAdhBf52ECcMeM/Y/fPaeQ== X-Google-Smtp-Source: AIpwx4+gRc4EfO0ijL9aWWUZi0kcm/X5l3b35vgE3zhhvx6Vk+7glAeosYC0nJ3xepYg5dsgh/zTRpIug5OK/arFu6Q= X-Received: by 10.107.101.7 with SMTP id z7mr1675655iob.198.1521819735241; Fri, 23 Mar 2018 08:42:15 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?S2FtaWxhIFNvdcSNa292w6E=?= Date: Fri, 23 Mar 2018 15:42:04 +0000 Message-ID: Subject: Easiest way to get a small VM disk image? To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 15:42:22 -0000 Hello, I want to build an OpenNebula[1]-compatible VM image of FreeBSD 11.1. One requirement for my use case is that the image should initially be small (not as in "take up little physical space", but as in "the size of the virtual disk as visible in the VM should be small". Specifically, I want the virtual disk size to be no more than 3GB (which should not be a problem, as the default installation of FreeBSD takes a lot less than 3G). The VM images available in the official downloads have a virtual size of 20GB. Therefore I need to somehow build my own image (or shrink the existing ones). Here are the approaches I have thought about: - Create and partition an empty disk image, rsync the contents of the official image into it. Problems: AFAIK requires a FreeBSD host to build (in order to be able to create a UFS filesystem); requires juggling around with loopback mounts and such. Probably still the most feasible option, but I am not sure, which is why I'm asking. - Create an empty image, boot it in a VM and install from an installation ISO. Problem: not sure how to automate; might not get 1:1 parity with the official VM image - Somehow shrink the existing image. Problem: How? - Find out how the official images are built and do that with a smaller size. This is where this list comes in :-) Which (of these, or any other) is the easiest way to get a small image? Thanks a lot! Kamila [1] https://opennebula.org/