Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No space left on 32bit Vagrant Box #11

Open
festradasolano opened this issue Jun 4, 2015 · 1 comment
Open

No space left on 32bit Vagrant Box #11

festradasolano opened this issue Jun 4, 2015 · 1 comment
Labels

Comments

@festradasolano
Copy link
Contributor

I don't know if this issue is already fixed, but I'm going to expose it.

After completely downloading and starting the 32bit VM, I got the following error in the end:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cat /tmp/vagrant-network-interfaces.pre /tmp/vagrant-network-entry /tmp/vagrant-network-interfaces.post > /etc/network/interfaces
Stdout from the command:
Stderr from the command:
stdin: is not a tty
cat: write error: No space left on device

I fixed it with the following steps:

  • Shutdown the VM:
    youruser@yourpc:~$ vagrant halt

  • Run VM from VirtualBox GUI and log as:
    User: vagrant Password: vagrant

  • Check disk space usage. Look that it shows 100% of Use% for /dev/sda1
    vagrant@coursera-sdn:~$ df -h

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        40G   40G     0 100% /
    ...
    ...
    vagrant         290G   47G  243G  17% /vagrant/
    
  • Remove an EMPTY file created (I'm still wondering why?)
    vagrant@coursera-sdn:~$ sudo rm /EMPTY

  • Check disk space usage again. Loos that Use% for /dev/sda1 is not 100%.
    vagrant@coursera-sdn:~$ df -h

    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1        40G  1.7G   37G   5% /
    ...
    ...
    vagrant         290G   47G  243G  17% /vagrant/
    
  • Set network interfaces. As the root user, edit /etc/network/interfaces file and save it.
    vagrant@coursera-sdn:~$ sudo nano /etc/network/interfaces

    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
    # Host-only interface
    auto eth1
    iface eth1 inet static
        address         192.168.0.100
        netmask         255.255.255.0
        network         192.168.0.0
        broadcast       192.168.0.255
    
  • Shutdown the VM.
    vagrant@coursera-sdn:~$ sudo shutdown -h now

  • Start VM again with vagrant in the Coursera-SDN directory. Check SSH and shared folder.
    youruser@yourpc:~/git/Coursera-SDN$ vagrant up
    youruser@yourpc:~/git/Coursera-SDN$ vagrant ssh
    vagrant@coursera-sdn:~$ ls /vagrant/
    README.md README.md~ Vagrantfile Vagrantfile~ assignments setup

@feamster feamster added the VM label Jun 28, 2015
@Fuzzyma
Copy link

Fuzzyma commented Aug 4, 2016

Maybe one followed this guide to create a new box.

According to the guide you should execute this commands:

sudo dd if=/dev/zero of=/EMPTY bs=1M
sudo rm -f /EMPTY

That writes zeros into every free sector. That should make compression of the box easier.
Maybe the creator of the box forgot to run the second command leaving a big file on the vm which takes every free disk space (That actually just happened to myself).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants