From dfaf7077e7da03e459b2b609f951f37b61941263 Mon Sep 17 00:00:00 2001 From: sudeeshjohn Date: Mon, 24 May 2021 13:43:04 +0530 Subject: [PATCH] Fixing the template and increasing the default image size --- cmd/image/qcow2ova/prep/templates.go | 4 ++-- cmd/image/qcow2ova/qcow2ova.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/image/qcow2ova/prep/templates.go b/cmd/image/qcow2ova/prep/templates.go index 5f55c917..c82baa67 100644 --- a/cmd/image/qcow2ova/prep/templates.go +++ b/cmd/image/qcow2ova/prep/templates.go @@ -26,7 +26,7 @@ set -o errexit set -o nounset set -o pipefail -mv /etc/resolv.conf /etc/resolv.conf.orig | true +mv /etc/resolv.conf /etc/resolv.conf.orig || true echo "nameserver 9.9.9.9" | tee /etc/resolv.conf {{if eq .Dist "rhel"}} subscription-manager register --force --auto-attach --username={{ .RHNUser }} --password={{ .RHNPassword }} @@ -75,7 +75,7 @@ subscription-manager clean # Remove the ibm repositories used for the rsct installation rpm -e ibm-power-repo-*.noarch -mv /etc/resolv.conf.orig /etc/resolv.conf | true +mv /etc/resolv.conf.orig /etc/resolv.conf || true touch /.autorelabel ` diff --git a/cmd/image/qcow2ova/qcow2ova.go b/cmd/image/qcow2ova/qcow2ova.go index 12c0b514..53575bde 100644 --- a/cmd/image/qcow2ova/qcow2ova.go +++ b/cmd/image/qcow2ova/qcow2ova.go @@ -246,7 +246,7 @@ func init() { Cmd.Flags().StringVar(&pkg.ImageCMDOptions.ImageName, "image-name", "", "Name of the resultant OVA image") Cmd.Flags().StringVar(&pkg.ImageCMDOptions.ImageURL, "image-url", "", "URL or absolute local file path to the .gz image") Cmd.Flags().StringVar(&pkg.ImageCMDOptions.ImageDist, "image-dist", "", "Image Distribution(supported: rhel, centos, coreos)") - Cmd.Flags().Uint64Var(&pkg.ImageCMDOptions.ImageSize, "image-size", 8, "Size (in GB) of the resultant OVA image") + Cmd.Flags().Uint64Var(&pkg.ImageCMDOptions.ImageSize, "image-size", 11, "Size (in GB) of the resultant OVA image") Cmd.Flags().Int64Var(&pkg.ImageCMDOptions.TargetDiskSize, "target-disk-size", 120, "Size (in GB) of the target disk volume where OVA will be copied") Cmd.Flags().StringVar(&pkg.ImageCMDOptions.RHNUser, "rhn-user", "", "RedHat Subscription username. Required when Image distribution is rhel") Cmd.Flags().StringVar(&pkg.ImageCMDOptions.RHNPassword, "rhn-password", "", "RedHat Subscription password. Required when Image distribution is rhel")