Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code, fix guestinfo data paths #166

Merged
merged 2 commits into from
Feb 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions images/capi/hack/image-govc-cloudinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ fi

export GOVC_VM="${1-}"

create_snapshot() {
snapshots="$(govc snapshot.tree)"
if [[ ${snapshots} = *${1-}* ]]; then
echo "image-govc-cloudinit: skip snapshot '${1-}'; already exists"
else
echo "image-post-cloudinit: create snapshot '${1-}'"
vmrun snapshot "${VMX_FILE}" "${1-}"
fi
}

cd "$(dirname "${BASH_SOURCE[0]}")/.."

# If the VM has a "new" snapshot then revert to it and delete all other
Expand All @@ -69,8 +59,8 @@ echo "image-govc-cloudinit: initializing cloud-init data"
govc vm.change \
-e "guestinfo.userdata.encoding=base64" \
-e "guestinfo.metadata.encoding=base64" \
-e "guestinfo.userdata='$(base64 -w0 <build/images/cloudinit/user-data)'" \
-e "guestinfo.metadata='$(base64 -w0 <build/images/cloudinit/meta-data)'"
-e "guestinfo.userdata='$(base64 -w0 <cloudinit/user-data)'" \
-e "guestinfo.metadata='$(base64 -w0 <cloudinit/meta-data)'"

echo "image-govc-cloudinit: creating snapshot 'cloudinit'"
govc snapshot.create cloudinit