kusnier / vagrant-persistent-storage

A Vagrant plugin that creates a persistent storage and attaches it to guest machine.
MIT License
292 stars 68 forks source link

Timed out waiting for devices dev-persistent-persistent.device #97

Open senseysensor opened 5 years ago

senseysensor commented 5 years ago

After guest machine reloading (or halt => up) persistent storage fails to mount anymore and therefore guest OS fails to start. Vagrant freezes on vagrant up command and directly loading via virtualBox freezes as well.

Host system: os x 10.14.4. VirtualBox 6.0.4 (with latest 5 version the same issue). Vagrant version: 2.2.4 vagrant-persistent-storage version: 0.0.45 Guest box: generic/debian9 (version 1.9.8) Vagrantile

  config.vm.box = "generic/debian9"
  config.vm.provision :shell, :path => "general.sh"
  config.vm.provision :shell, :path => "apache.sh"
  config.vm.provision :shell, :path => "rabbit_mq.sh"
  config.vm.provision :shell, :path => "python_modules.sh"
  config.vm.provision :shell, :path => "network_tools.sh"
  #config.vm.provision :shell, :path => "upgrade_all.sh"
  #config.vm.network "public_network", :bridge => 'en0: Ethernet'   # <-- PPTP VPN does not work with NAT...

  config.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--memory", "4096", "--cpus", "4"]
  end
  config.vm.synced_folder "/Users/.../spider/", "/spider/"

  config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true
  config.vm.network "forwarded_port", guest: 5673, host: 5673
  config.vm.network "forwarded_port", guest: 15672, host: 15674
  config.vm.network "forwarded_port", guest: 27019, host: 27019
  config.vm.network "forwarded_port", guest: 3376, host: 3376       # <-- MySQL
  config.vm.network "forwarded_port", guest: 56790, host: 36790
  config.vm.network "forwarded_port", guest: 56787, host: 36787
  config.vm.network "forwarded_port", guest: 80, host: 1881
  config.vm.network "forwarded_port", guest: 6379, host: 16379

  config.persistent_storage.enabled = true
  config.persistent_storage.location = "storage/persistent.vdi"
  config.persistent_storage.size = 7000
  config.persistent_storage.mountname = 'persistent'
  config.persistent_storage.filesystem = 'ext4'
  config.persistent_storage.mountpoint = '/persistent/'
  config.persistent_storage.volgroupname = 'persistent'
end

How to reproduce:

  1. vagrant up --no-provision (everything is ok, guest additions are installed, storage is also created and attached - I can see it on logging into machine)
  2. vagrant reload (machine is not loaded anymore).

This reproduces for me each time.

This is what I see in guest system when connect to it via virtualBox:

Скриншот 2019-04-05 15 28 51
senseysensor commented 5 years ago

I am not sure which causes exactly the issue. To fix after first login I edited file /etc/fstab on guest and commented the last line there: /dev/persistent/persistent /persistent/ ext4 defaults 0 0. But I am still not sure what to do about this.