7

I am running into troubles when performing an update through apt-get on a virtual machine bootstrapped using Vagrant.

In particular, I have a working configuration (vagrantfile, puppet manifest, and whatsoever). However I need now to add an apt-get update, and the following cases make the VM enter the "aborted" state:

  1. Through puppet, an exec block running apt-get update as root, during provisioning.
  2. Through poor man's provisioner, a .sh script containingapt-get -y update as alternative provisioner.
  3. sudo apt-get update on the console of the VM when provisioned without problems (as said, existing configuration is working)

I suspect it is not related to puppet, as I remember it happened some other time when I was not using it. I hoped that, if it was a known bug, it would have been fixed by updating... especially since I am not using anything esoteric. However googling doesn't give anything! (Am I the only one using ubuntu on vagrant and wanting to update package list?)

The systems on which this happens are Archbang 3.19.3-3-ARCH i686 and (just to be sure it's not because I messed with Linux) Windows 8.1 pro 64bit - both are running Vagrant 1.7.2/Virtualbox 4.3.26 r98988

The boxes are respectively ubuntu/trusty32 and ubuntu/trusty64 and it happens with both version 20150427.0.0 and 20150609.0.9

Thank you for your help

(also side question, I am unsure if I should ask here, on serverfault, or superuser)

linuxbandit
  • 2,362
  • 1
  • 14
  • 13
  • Possible duplicate of [Vagrant provision not working](http://stackoverflow.com/questions/29406602/vagrant-provision-not-working) – Railslide Oct 26 '15 at 09:21
  • @Railslide thanks, but the problem is different - in ANY way I try the update, my machine aborts. In the question you mentioned, a guy tries the update in a non-interactive way and it hangs for waiting input – linuxbandit Dec 11 '15 at 10:17
  • Do apt logs say anything useful? They should be located in `/var/log/apt/` – Railslide Dec 11 '15 at 10:34
  • @JaysonMinard do you have the same issue if you do not provision the VM and just run `sudo apt-get update` from the console ? – Frederic Henri Oct 11 '17 at 14:01
  • Two things, make sure the VM is not running out of space, sometimes that crashes the VM. Next, open VirtualBox, select the VM corresponding to your Vagrant project and the Right click and choose `Show Log`. Copy and past complete logs on https://pastebin.com and share the link in the question – Tarun Lalwani Oct 14 '17 at 06:03
  • Those are old versions of vagrant and virtualbox... I'd try updating them before digging in to this too much if I were you. – Peter Brittain Oct 14 '17 at 15:15

1 Answers1

0

Try with 'sudo apt-get -y update' and it will auto confirm apt-get command.

Olivier Meurice
  • 554
  • 8
  • 17
  • Thanks, I edited my question. The problem happens in any case that I try update -even interactive- so it is not about the missing flag and about waiting for my input – linuxbandit Dec 11 '15 at 10:18