Vagrant failing code 1 - Read-only file system (RuntimeError)

1,756 views
Skip to first unread message

Al Rocker

unread,
Oct 16, 2017, 10:57:37 AM10/16/17
to Vagrant
I was using Vagrant on a Linux host until about a year ago. Had no major problems then. Now my host is Windows 10 (latest vagrant and Virtual box versions) and I am running Vagrant from within PHP Storm. I am getting some problem each time I run "up" and end with a code 1. Even when trying from scratch with a raw, default initiated Vagrant file via command line I still get the issue. Any help would be much appreciated. Here's the output.


vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
Progress: 90%==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: Vagranttest2_default_1508165455296_30086
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.2.1/lib/net/scp.rb:398:in `await_response_state': scp: /tmp/vagrant-insert-pubkey-1508165525: Read-only file system (RuntimeError)
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.2.1/lib/net/scp.rb:369:in `block (3 levels) in start_command'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/channel.rb:320:in `process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:238:in `block in ev_preprocess'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:529:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:529:in `each_channel'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:238:in `ev_preprocess'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:99:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:99:in `ev_preprocess'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/event_loop.rb:27:in `process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:216:in `process'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `block in loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/session.rb:178:in `loop'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/lib/net/ssh/connection/channel.rb:269:in `wait'
from C:/HashiCorp/Vagrant/embedded/gems/gems/net-scp-1.2.1/lib/net/scp.rb:284:in `upload!'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:291:in `block in upload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:684:in `block in scp_connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:332:in `connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:682:in `scp_connect'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:285:in `upload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/guests/linux/cap/public_key.rb:19:in `block in insert_public_key'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/tempfile.rb:295:in `open'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/guests/linux/cap/public_key.rb:14:in `insert_public_key'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/capability_host.rb:111:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/capability_host.rb:111:in `capability'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/guest.rb:43:in `capability'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:187:in `ready?'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:83:in `block in wait_for_ready'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:106:in `timeout'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/ssh/communicator.rb:60:in `wait_for_ready'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'

Process finished with exit code 1

Alvaro Miranda Aguilera

unread,
Oct 16, 2017, 11:35:36 PM10/16/17
to vagra...@googlegroups.com
Hello

Seems to me the error is coming from the box you are using.

perhaps it run out of space:

/tmp/vagrant-insert-pubkey-1508165525: Read-only file system (RuntimeError)

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/3f7b7bd8-b75f-4629-b198-f3d331792133%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Al Rocker

unread,
Oct 17, 2017, 12:11:43 PM10/17/17
to Vagrant
I thought you might be onto something when you said: "perhaps out of space". I had put VB VMs on a separate disk, but Vagrant boxes were still on my C drive. I have now changed that - plenty of space, but still getting this issue.

These lines before the red errors seems odd;
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 17, 2017, 12:21:24 PM10/17/17
to vagra...@googlegroups.com
Did you check inside the VM

vagrant ssh -c 'df -Ph'

its something related to the VM either running out of space, or /tmp getting read only

sometimes /tmp is from ram, ie half of available ram.

Alvaro.

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f0433abb-0c82-4358-ae01-bfb74c075e1c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Al Rocker

unread,
Oct 17, 2017, 12:31:01 PM10/17/17
to Vagrant
I can't even get into the VM. It's going away before the error occurs. I monitored it in VirtualBox after I called vagrant up. It just vanishes before the errors.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 19, 2017, 3:25:17 AM10/19/17
to vagra...@googlegroups.com
can you share the vagrantfile and the scripts you use in a zip file?



Virusvrij. www.avast.com

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/0ca64955-0728-4ac1-b0de-a9c6be1e570f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Al Rocker

unread,
Oct 19, 2017, 2:30:09 PM10/19/17
to Vagrant
I'm pretty sure the vagrant file is not to blame. Something is actually causing the box to be shut down and then deleted during the up process. I have tried various vagrant files including the untouched init file which is below - all result in the same issue;

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "ubuntu/trusty64"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
end



--
Alvaro

Reply all
Reply to author
Forward
0 new messages