Ask Your Question
0

Problem Creating Guest Images for Trove

asked 2017-06-06 05:29:17 -0500

CDOT gravatar image

I am trying to create a Trove Guest Image using diskimage-builder. To that end, I have acquired diskimage-builder, tripleo-image-elements, and trove-integration from Github. As suggested here, I created a file - img_create.sh with content :

# assign a suitable value for each of these environment
# variables that change the way the elements behave.
export HOST_USERNAME=abcd
export HOST_SCP_USERNAME=abcd
export GUEST_USERNAME=abcd
export CONTROLLER_IP=10.0.0.89
export PATH_DISKIMAGEBUILDER=/root/trove/diskimage-builder/diskimage_builder
export TROVESTACK_SCRIPTS=/root/trove/trove-integration/scripts
export PATH_TRIPLEO_ELEMENTS=/root/trove/tripleo-image-elements
#export SERVICE_TYPE
#export PATH_TROVE
#export ESCAPED_PATH_TROVE
export SSH_DIR=/home/abcd/.ssh
export GUEST_LOGDIR=/var/log/trove/
export ESCAPED_GUEST_LOGDIR='\/var\/log\/trove\/'
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
export DATASTORE_PKG_LOCATION=""
#export BRANCH_OVERRIDE

# you typically do not have to change these variables
export ELEMENTS_PATH=$TROVESTACK_SCRIPTS/files/elements
export ELEMENTS_PATH+=:$PATH_DISKIMAGEBUILDER/elements
export ELEMENTS_PATH+=:$PATH_TRIPLEO_ELEMENTS/elements
export DIB_APT_CONF_DIR=/etc/apt/apt.conf.d
export DIB_CLOUD_INIT_ETC_HOSTS=true
local QEMU_IMG_OPTIONS=$(! $(qemu-img | grep -q 'version 1') && echo "--qemu-img-options compat=0.10")

# run disk-image-create that actually causes the image to be built
#${PATH_DISKIMAGEBUILDER}/bin/disk-image-create -a amd64 -o "${VM}" \
#    -x ${QEMU_IMG_OPTIONS} ${DISTRO} ${EXTRA_ELEMENTS} vm \
#    cloud-init-datasources ${DISTRO}-guest ${DISTRO}-${SERVICE_TYPE}

disk-image-create -a amd64 \
-o ubuntu_mysql.qcow2 -x \
--qemu-img-options compat=0.10 ubuntu vm cloud-init-datasources \
ubuntu-guest ubuntu-mysql

When I run sh img_crreate.sh, I get this after a certain period :

+ source /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/die
++ export -f die
+ BRANCH_OVERRIDE=default
++ basename default
+ ADD_BRANCH=default
+ REQUIREMENTS_FILE=/files/requirements/ubuntu-requirements-default.txt
+ '[' -n /tmp/dib_build.SoVGU0HO/hooks ']'
+ '[' -e /files/requirements/ubuntu-requirements-default.txt ']'
+ die 'Requirements not found'
+ local exitcode=1
+ set +o xtrace
Requirements not found

The process comnpletes and no .qcow2 file is created. However, when I simply run disk-image-create -a amd64 -o ubuntu.qcow2 ubuntu vm, the execution proceeds smoothly and, at the end, ubuntu.qcow2 is created and it runs in guestfish.

How do I proceed ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-06-28 05:45:27 -0500

amrith gravatar image

A subsequent question seems to indicate that you got around this and built an image. Is this still a problem you are facing?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-06-06 05:29:17 -0500

Seen: 307 times

Last updated: Jun 28 '17