If you are trying to build a bitcoind server with Vagrant, you’ll have problem with synced_folder.
I’m not very sure yet…
You shouldn’t use default synced_folder.
I tried NFS for synced_folder and it worked!!
VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "hashicorp/precise64" config.vm.provision :shell, :path => "bootstrap.sh", privileged: false config.vm.network :private_network, ip: "192.168.33.30" # Original # config.vm.synced_folder "data/", "/home/vagrant/.bitcoin/" # NFS version config.vm.synced_folder "data/", "/home/vagrant/.bitcoin/", type: "nfs" config.vm.provider "virtualbox" do |vb| vb.customize ["modifyvm", :id, "--memory", "1536"] end config.vm.provider "vmware" do |vmw| vmw.customize ["modifyvm", :id, "--memory", "1536"] end end
See Vagrant document for NFS settings.
Other solution from Hasimir
Create a virtual disk on the file/network server.
Get VirtualBox (or VMWare or whatever) to see that.
Mount the disk image as normal.
As far as the VM/OS is concerned it’s just an ordinary drive.
This means you can do other nifty things to such a drive (like encrypt it with LUKS/dm-crypt).
- Bitcoin Core 0.9.2
- Vagrant with VirtualBox (Ubuntu 12.04 64bit on Mac OS X)
- Samba(or file sharing) doesn’t support LevelDB feature. (I guess…)
No, this is LevelDB reporting that an internal system call returned with an error status indicating that an invalid argument was passed.
I assume that the samba filesystem does not offer certain functionality that LevelDB requires of its databases, such a certain types of locking, syncing or mmaping.
When you run bitcoind, you will see the error like…
: Error opening block database. Do you want to rebuild the block database now?
2015-01-10 17:29:50 init message: Loading block index... 2015-01-10 17:29:50 Opening LevelDB in /home/vagrant/.bitcoin/blocks/index 2015-01-10 17:29:50 IO error: /home/vagrant/.bitcoin/blocks/index: Invalid argument
Vagrant File I Used
- bitcoind, LevelDB, vagrant, virtualbox, vmware, samba, bootstrap.dat, blockchain, error