virtualbox iso issue
Posted: Thu Dec 26, 2019 10:38 pm
Hi,
I am still trying to set up the crazyflieVM on my computer that runs UBUNTU 18.04.1 (I posted and solved my own issue yesterday in my previous post)
I did this on another computer a while ago but I never had these issues:
So downloaded Virtualbox and the crazyflie VM file.
When trying to set everything up the README I tried double clicking on the
- createBitcrazeVM.sh
but when I do that this opens up instead of setting up the VM:
#!/bin/bash
PACKER_URL="https://releases.hashicorp.com/packer/0 ... ux_386.zip"
PACKER_FILE1=bitcrazeVM_createVM.json
PACKER_FILE2=bitcrazeVM_provisionVM.json
GCC_ARM_FILE="gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2"
GCC_ARM_URL="https://developer.arm.com/-/media/Files ... C_ARM_FILE"
ECLIPSE_FILE="eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz"
ECLIPSE_URL="http://ftp.halifax.rwth-aachen.de/eclip ... LIPSE_FILE"
ECLIPSE_GNU_ARM_PLUGIN_FILE="ilg.gnuarmeclipse.repository-2.12.1-201604190915.zip"
ECLIPSE_GNU_ARM_PLUGIN_URL="https://github.com/gnuarmeclipse/plug-i ... LUGIN_FILE"
OPENOCD_FILE="gnuarmeclipse-openocd-debian32-0.9.0-201505190955.tgz"
OPENOCD_URL="https://github.com/gnuarmeclipse/openoc ... ENOCD_FILE"
CONTENT_DIR="contentForVM/"
OVA_FILE=BitcrazeVM.ova
#Install packer (only if it's not already installed)
if type "packer" > /dev/null
then
echo "Packer already installed. Continuing..."
else
echo "Packer is not installed. Installing..."
wget $PACKER_URL
unzip packer*.zip -d $HOME/packer
sudo ln -s $HOME/packer/packer /usr/bin/packer
rm packer*.zip
fi
#Download GCC ARM (63MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$GCC_ARM_FILE" ]
then
echo "$CONTENT_DIR$GCC_ARM_FILE found. Continuing..."
else
echo "$CONTENT_DIR$GCC_ARM_FILE not found. Starting download..."
wget -P $CONTENT_DIR $GCC_ARM_URL
fi
#Download Eclipse (182MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$ECLIPSE_FILE" ]
then
echo "$CONTENT_DIR$ECLIPSE_FILE found. Continuing..."
else
echo "$CONTENT_DIR$ECLIPSE_FILE not found. Starting download..."
wget -P $CONTENT_DIR $ECLIPSE_URL
fi
#Download Eclipse GNU ARM plugin (6MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$ECLIPSE_GNU_ARM_PLUGIN_FILE" ]
then
echo "$CONTENT_DIR$ECLIPSE_GNU_ARM_PLUGIN_FILE found. Continuing..."
else
echo "$CONTENT_DIR$ECLIPSE_GNU_ARM_PLUGIN_FILE not found. Starting download..."
wget -P $CONTENT_DIR $ECLIPSE_GNU_ARM_PLUGIN_URL
fi
#Download OpenOCD 0.9 (3MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$OPENOCD_FILE" ]
then
echo "$CONTENT_DIR$OPENOCD_FILE found. Continuing..."
else
echo "$CONTENT_DIR$OPENOCD_FILE not found. Starting download..."
wget -P $CONTENT_DIR $OPENOCD_URL
fi
# Compressing eclipse project files in one tgz
pushd .
echo "Compressing eclipse-project-files.tar.gz"
cd $CONTENT_DIR/eclipse-project-files
tar -czf ../eclipse-project-files.tar.gz *
popd
#Run packer
echo "Running packer..."
export PACKER_LOG=1
#If OVA already exists, skip VM creation step
if [ -f "output-virtualbox-iso/$OVA_FILE" ]
then
echo "OVA file found. Skipping VM creation..."
else
echo "OVA file not found. Starting VM creation..."
export PACKER_LOG_PATH="packerlog_create.txt"
packer build $PACKER_FILE1
fi
echo "Starting VM provisioning..."
export PACKER_LOG_PATH="packerlog_provision.txt"
packer build $PACKER_FILE2
So if I try to start the .SH file from the terminal I do:
./createBitcrazeVM.sh
and the following error arrises:
Packer already installed. Continuing...
contentForVM/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 found. Continuing...
contentForVM/eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz found. Continuing...
contentForVM/ilg.gnuarmeclipse.repository-2.12.1-201604190915.zip found. Continuing...
contentForVM/gnuarmeclipse-openocd-debian32-0.9.0-201505190955.tgz found. Continuing...
~/Desktop/bitcraze-vm-master ~/Desktop/bitcraze-vm-master
Compressing eclipse-project-files.tar.gz
~/Desktop/bitcraze-vm-master
Running packer...
OVA file not found. Starting VM creation...
virtualbox-iso output will be in this color.
==> virtualbox-iso: Retrieving ISO
==> virtualbox-iso: Trying http://archive.ubuntu.com/ubuntu/dists/ ... t/mini.iso
==> virtualbox-iso: Trying http://archive.ubuntu.com/ubuntu/dists/ ... 68847f90da
==> virtualbox-iso: http://archive.ubuntu.com/ubuntu/dists/ ... 68847f90da => /home/edwin/Desktop/bitcraze-vm-master/packer_cache/5e92add049fe67b781c1efd7ded87ca3cc83e35c.iso
==> virtualbox-iso: Starting HTTP server on port 8365
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Error creating hard drive: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
==> virtualbox-iso: Progress state: NS_ERROR_INVALID_ARG
==> virtualbox-iso: VBoxManage: error: Failed to create medium
==> virtualbox-iso: VBoxManage: error: Cannot register the hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' {d430a755-4ad0-4bcc-9b30-54aabde7a8ae} because a hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' with UUID {b899f33f-6ef9-4e43-9bb1-59a1741d4018} already exists
==> virtualbox-iso: VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox
==> virtualbox-iso: VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error creating hard drive: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: NS_ERROR_INVALID_ARG
VBoxManage: error: Failed to create medium
VBoxManage: error: Cannot register the hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' {d430a755-4ad0-4bcc-9b30-54aabde7a8ae} because a hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' with UUID {b899f33f-6ef9-4e43-9bb1-59a1741d4018} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error creating hard drive: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: NS_ERROR_INVALID_ARG
VBoxManage: error: Failed to create medium
VBoxManage: error: Cannot register the hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' {d430a755-4ad0-4bcc-9b30-54aabde7a8ae} because a hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' with UUID {b899f33f-6ef9-4e43-9bb1-59a1741d4018} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
==> Builds finished but no artifacts were created.
Starting VM provisioning...
virtualbox-ovf output will be in this color.
1 error(s) occurred:
* Source file 'output-virtualbox-iso/BitcrazeVM.ova' needs to exist at time of config validation! stat output-virtualbox-iso/BitcrazeVM.ova: no such file or directory
What should I do? I am really confused.
I am still trying to set up the crazyflieVM on my computer that runs UBUNTU 18.04.1 (I posted and solved my own issue yesterday in my previous post)
I did this on another computer a while ago but I never had these issues:
So downloaded Virtualbox and the crazyflie VM file.
When trying to set everything up the README I tried double clicking on the
- createBitcrazeVM.sh
but when I do that this opens up instead of setting up the VM:
#!/bin/bash
PACKER_URL="https://releases.hashicorp.com/packer/0 ... ux_386.zip"
PACKER_FILE1=bitcrazeVM_createVM.json
PACKER_FILE2=bitcrazeVM_provisionVM.json
GCC_ARM_FILE="gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2"
GCC_ARM_URL="https://developer.arm.com/-/media/Files ... C_ARM_FILE"
ECLIPSE_FILE="eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz"
ECLIPSE_URL="http://ftp.halifax.rwth-aachen.de/eclip ... LIPSE_FILE"
ECLIPSE_GNU_ARM_PLUGIN_FILE="ilg.gnuarmeclipse.repository-2.12.1-201604190915.zip"
ECLIPSE_GNU_ARM_PLUGIN_URL="https://github.com/gnuarmeclipse/plug-i ... LUGIN_FILE"
OPENOCD_FILE="gnuarmeclipse-openocd-debian32-0.9.0-201505190955.tgz"
OPENOCD_URL="https://github.com/gnuarmeclipse/openoc ... ENOCD_FILE"
CONTENT_DIR="contentForVM/"
OVA_FILE=BitcrazeVM.ova
#Install packer (only if it's not already installed)
if type "packer" > /dev/null
then
echo "Packer already installed. Continuing..."
else
echo "Packer is not installed. Installing..."
wget $PACKER_URL
unzip packer*.zip -d $HOME/packer
sudo ln -s $HOME/packer/packer /usr/bin/packer
rm packer*.zip
fi
#Download GCC ARM (63MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$GCC_ARM_FILE" ]
then
echo "$CONTENT_DIR$GCC_ARM_FILE found. Continuing..."
else
echo "$CONTENT_DIR$GCC_ARM_FILE not found. Starting download..."
wget -P $CONTENT_DIR $GCC_ARM_URL
fi
#Download Eclipse (182MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$ECLIPSE_FILE" ]
then
echo "$CONTENT_DIR$ECLIPSE_FILE found. Continuing..."
else
echo "$CONTENT_DIR$ECLIPSE_FILE not found. Starting download..."
wget -P $CONTENT_DIR $ECLIPSE_URL
fi
#Download Eclipse GNU ARM plugin (6MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$ECLIPSE_GNU_ARM_PLUGIN_FILE" ]
then
echo "$CONTENT_DIR$ECLIPSE_GNU_ARM_PLUGIN_FILE found. Continuing..."
else
echo "$CONTENT_DIR$ECLIPSE_GNU_ARM_PLUGIN_FILE not found. Starting download..."
wget -P $CONTENT_DIR $ECLIPSE_GNU_ARM_PLUGIN_URL
fi
#Download OpenOCD 0.9 (3MB) (only if it's not already downloaded)
if [ -f "$CONTENT_DIR$OPENOCD_FILE" ]
then
echo "$CONTENT_DIR$OPENOCD_FILE found. Continuing..."
else
echo "$CONTENT_DIR$OPENOCD_FILE not found. Starting download..."
wget -P $CONTENT_DIR $OPENOCD_URL
fi
# Compressing eclipse project files in one tgz
pushd .
echo "Compressing eclipse-project-files.tar.gz"
cd $CONTENT_DIR/eclipse-project-files
tar -czf ../eclipse-project-files.tar.gz *
popd
#Run packer
echo "Running packer..."
export PACKER_LOG=1
#If OVA already exists, skip VM creation step
if [ -f "output-virtualbox-iso/$OVA_FILE" ]
then
echo "OVA file found. Skipping VM creation..."
else
echo "OVA file not found. Starting VM creation..."
export PACKER_LOG_PATH="packerlog_create.txt"
packer build $PACKER_FILE1
fi
echo "Starting VM provisioning..."
export PACKER_LOG_PATH="packerlog_provision.txt"
packer build $PACKER_FILE2
So if I try to start the .SH file from the terminal I do:
./createBitcrazeVM.sh
and the following error arrises:
Packer already installed. Continuing...
contentForVM/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 found. Continuing...
contentForVM/eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz found. Continuing...
contentForVM/ilg.gnuarmeclipse.repository-2.12.1-201604190915.zip found. Continuing...
contentForVM/gnuarmeclipse-openocd-debian32-0.9.0-201505190955.tgz found. Continuing...
~/Desktop/bitcraze-vm-master ~/Desktop/bitcraze-vm-master
Compressing eclipse-project-files.tar.gz
~/Desktop/bitcraze-vm-master
Running packer...
OVA file not found. Starting VM creation...
virtualbox-iso output will be in this color.
==> virtualbox-iso: Retrieving ISO
==> virtualbox-iso: Trying http://archive.ubuntu.com/ubuntu/dists/ ... t/mini.iso
==> virtualbox-iso: Trying http://archive.ubuntu.com/ubuntu/dists/ ... 68847f90da
==> virtualbox-iso: http://archive.ubuntu.com/ubuntu/dists/ ... 68847f90da => /home/edwin/Desktop/bitcraze-vm-master/packer_cache/5e92add049fe67b781c1efd7ded87ca3cc83e35c.iso
==> virtualbox-iso: Starting HTTP server on port 8365
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Error creating hard drive: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
==> virtualbox-iso: Progress state: NS_ERROR_INVALID_ARG
==> virtualbox-iso: VBoxManage: error: Failed to create medium
==> virtualbox-iso: VBoxManage: error: Cannot register the hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' {d430a755-4ad0-4bcc-9b30-54aabde7a8ae} because a hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' with UUID {b899f33f-6ef9-4e43-9bb1-59a1741d4018} already exists
==> virtualbox-iso: VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox
==> virtualbox-iso: VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error creating hard drive: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: NS_ERROR_INVALID_ARG
VBoxManage: error: Failed to create medium
VBoxManage: error: Cannot register the hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' {d430a755-4ad0-4bcc-9b30-54aabde7a8ae} because a hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' with UUID {b899f33f-6ef9-4e43-9bb1-59a1741d4018} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error creating hard drive: VBoxManage error: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: NS_ERROR_INVALID_ARG
VBoxManage: error: Failed to create medium
VBoxManage: error: Cannot register the hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' {d430a755-4ad0-4bcc-9b30-54aabde7a8ae} because a hard disk '/home/edwin/Desktop/bitcraze-vm-master/output-virtualbox-iso/BitcrazeVM.vdi' with UUID {b899f33f-6ef9-4e43-9bb1-59a1741d4018} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBoxWrap, interface IVirtualBox
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
==> Builds finished but no artifacts were created.
Starting VM provisioning...
virtualbox-ovf output will be in this color.
1 error(s) occurred:
* Source file 'output-virtualbox-iso/BitcrazeVM.ova' needs to exist at time of config validation! stat output-virtualbox-iso/BitcrazeVM.ova: no such file or directory
What should I do? I am really confused.