diff --git a/Vagrantfile b/Vagrantfile index 903004608..da6fb719d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -39,8 +39,8 @@ Vagrant.configure(2) do |config| config.vm.provider "virtualbox" do |vb| vb.name = "Armbian Builder" - # comment this to disable the VirtualBox GUI - vb.gui = true + # uncomment this to enable the VirtualBox GUI + #vb.gui = true # Tweak these to fit your needs. #vb.memory = "8192" diff --git a/config-vagrant.conf b/config-vagrant.conf index 0af7bf13f..bf0481941 100644 --- a/config-vagrant.conf +++ b/config-vagrant.conf @@ -6,17 +6,25 @@ # remove "vagrant" from the command line since "vagrant-guest" will be passed instead shift -# TODO: copy the command line into a new config file on guest +# check and install vagrant-disksize +if ! grep -q '^vagrant-disksize' <(vagrant plugin list); then + display_alert "Trying to install vargant-disksize plugin" + vagrant plugin install vagrant-disksize +fi + display_alert "Building and running the Vagrant box" vagrant up -# TODO: add docs about private key and conversions - display_alert "SSH config for the Vagrant box" - vagrant ssh-config -display_alert "Use 'vagrant halt' to stop the box" +display_alert "Trying to connect using SSH" + +IFS=' ' vagrant ssh -c "cd armbian; sudo ./compile.sh vagrant-guest $*" + +display_alert "Press to halt the Vagrant box" +read +vagrant halt # don't need to proceed further on the host exit 0