Added sudo to VBoxManage call, to fix permission denied error when building a VirtualBox image

BUG=None
TEST=Run image_to_vm.sh to build a VirtualBox image for the x86-generic board, confirm image builds successfully

Change-Id: I3ce9aac1eef6dfa695747e92e7d7e75ddd524027
Reviewed-on: https://gerrit.chromium.org/gerrit/12449
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Liam McLoughlin <hexxeh@hexxeh.net>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
This commit is contained in:
Liam McLoughlin 2011-11-29 18:17:26 +00:00 committed by Gerrit
parent aa52807720
commit c9f1dab46e

View File

@ -205,7 +205,7 @@ echo Creating final image
# Convert image to output format # Convert image to output format
if [ "${FLAGS_format}" = "virtualbox" -o "${FLAGS_format}" = "qemu" ]; then if [ "${FLAGS_format}" = "virtualbox" -o "${FLAGS_format}" = "qemu" ]; then
if [ "${FLAGS_format}" = "virtualbox" ]; then if [ "${FLAGS_format}" = "virtualbox" ]; then
VBoxManage convertdd "${TEMP_IMG}" "${FLAGS_to}/${FLAGS_vbox_disk}" sudo VBoxManage convertdd "${TEMP_IMG}" "${FLAGS_to}/${FLAGS_vbox_disk}"
else else
mv ${TEMP_IMG} ${FLAGS_to}/${DEFAULT_QEMU_IMAGE} mv ${TEMP_IMG} ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}
fi fi