Drop vhdutil dependency, use qemu-img
The vhdutil utility is completely dead; the whole subsystem it relies on was removed with [1] so it's not even vaguely possible to keep it up-to-date. I took the .raw images on a nb and used the qemu-img there (so Xenial) and generated some VPC images; uploaded them to rackspace and the all seemed to boot fine. If there was a problem, maybe it's been fixed on either the qemu or RAX side in the previous few years. Thus swith to qemu-img to generate the vhd images too. [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=5c883cf036cf5ab8b1b79390549e2475f7a568dd Change-Id: I3099d2ebb958370fcec623087a093b2c8dbdc6c4
This commit is contained in:
parent
1e08be004b
commit
a3e9e7f89e
@ -100,10 +100,6 @@ function show_options () {
|
|||||||
echo
|
echo
|
||||||
echo "NOTE: At least one distribution root element must be specified."
|
echo "NOTE: At least one distribution root element must be specified."
|
||||||
echo
|
echo
|
||||||
echo "NOTE: If using the VHD output format you need to have a patched version of vhd-util installed for the image"
|
|
||||||
echo " to be bootable. The patch is available here: https://github.com/emonty/vhd-util/blob/master/debian/patches/citrix"
|
|
||||||
echo " and a PPA with the patched tool is available here: https://launchpad.net/~openstack-ci-core/+archive/ubuntu/vhd-util"
|
|
||||||
echo
|
|
||||||
echo "Examples:"
|
echo "Examples:"
|
||||||
if [ "$IS_RAMDISK" == "0" ]; then
|
if [ "$IS_RAMDISK" == "0" ]; then
|
||||||
echo " ${SCRIPTNAME} -a amd64 -o ubuntu-amd64 vm ubuntu"
|
echo " ${SCRIPTNAME} -a amd64 -o ubuntu-amd64 vm ubuntu"
|
||||||
@ -269,8 +265,8 @@ for X in ${!IMAGE_TYPES[@]}; do
|
|||||||
IMAGE_TYPES+=('tar')
|
IMAGE_TYPES+=('tar')
|
||||||
;;
|
;;
|
||||||
vhd)
|
vhd)
|
||||||
if ! type vhd-util > /dev/null 2>&1; then
|
if ! type qemu-img > /dev/null 2>&1; then
|
||||||
echo "vhd output format specified but no vhd-util executable found."
|
echo "vhd output format specified but no qemu-img executable found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -147,12 +147,7 @@ function compress_and_save_image () {
|
|||||||
$DIB_GZIP_BIN -9 < $IMAGE_NAME.tar > $1-new
|
$DIB_GZIP_BIN -9 < $IMAGE_NAME.tar > $1-new
|
||||||
rm $IMAGE_NAME.tar
|
rm $IMAGE_NAME.tar
|
||||||
elif [ "$IMAGE_TYPE" == "vhd" ]; then
|
elif [ "$IMAGE_TYPE" == "vhd" ]; then
|
||||||
cp $TMP_IMAGE_PATH $1-intermediate
|
qemu-img convert $TMP_IMAGE_PATH -O vpc -o subformat=dynamic $1-new
|
||||||
vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate
|
|
||||||
vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new
|
|
||||||
# The previous command creates a .bak file
|
|
||||||
rm $1-intermediate.bak
|
|
||||||
OUT_IMAGE_PATH=$1-new
|
|
||||||
else
|
else
|
||||||
echo "Converting image using qemu-img convert"
|
echo "Converting image using qemu-img convert"
|
||||||
qemu-img convert ${COMPRESS_IMAGE:+-c} -f raw -O $IMAGE_TYPE $EXTRA_OPTIONS $TMP_IMAGE_PATH $1-new
|
qemu-img convert ${COMPRESS_IMAGE:+-c} -f raw -O $IMAGE_TYPE $EXTRA_OPTIONS $TMP_IMAGE_PATH $1-new
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Generation of VHD (VPC/Microsoft Virtual PC/Rackspace) images is
|
||||||
|
now done via qemu-img, rather than the externally patched
|
||||||
|
``vhdutil`` package which is no longer maintained.
|
Loading…
Reference in New Issue
Block a user