{"id":13905697,"url":"https://github.com/kusnier/vagrant-persistent-storage","last_synced_at":"2025-05-14T18:02:54.299Z","repository":{"id":5333076,"uuid":"6518408","full_name":"kusnier/vagrant-persistent-storage","owner":"kusnier","description":"A Vagrant plugin that creates a persistent storage and attaches it to guest machine.","archived":false,"fork":false,"pushed_at":"2025-01-19T20:11:28.000Z","size":154,"stargazers_count":290,"open_issues_count":16,"forks_count":68,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T19:24:52.033Z","etag":null,"topics":["disk","persistent","persistent-storage","storage","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kusnier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-03T10:31:31.000Z","updated_at":"2025-04-04T07:31:35.000Z","dependencies_parsed_at":"2023-12-15T20:08:23.565Z","dependency_job_id":"f1d5a95c-5c19-40a3-b243-793d185b4144","html_url":"https://github.com/kusnier/vagrant-persistent-storage","commit_stats":{"total_commits":169,"total_committers":32,"mean_commits":5.28125,"dds":0.3254437869822485,"last_synced_commit":"58ceb93d145d7e79ff3c71c34f8ab92aa74070f1"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusnier%2Fvagrant-persistent-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusnier%2Fvagrant-persistent-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusnier%2Fvagrant-persistent-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kusnier%2Fvagrant-persistent-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kusnier","download_url":"https://codeload.github.com/kusnier/vagrant-persistent-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198452,"owners_count":22030964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disk","persistent","persistent-storage","storage","vagrant","virtualbox"],"created_at":"2024-08-06T23:01:21.575Z","updated_at":"2025-05-14T18:02:50.730Z","avatar_url":"https://github.com/kusnier.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Vagrant::Persistent-Storage\n\nA Vagrant plugin that creates a persistent storage and attaches it to guest machine.\n\nRequires Virtualbox 5/6\n\n## Installation\n\n    $ vagrant plugin install vagrant-persistent-storage\n\n## Usage\n\nAfter installing you can set the location and size of the persistent storage.\n\nThe following options will create a persistent storage with 5000 MB, named mysql,\nmounted on /var/lib/mysql, in a volume group called 'myvolgroup'\n```ruby\nconfig.persistent_storage.enabled = true\nconfig.persistent_storage.location = \"~/development/sourcehdd.vdi\"\nconfig.persistent_storage.size = 5000\nconfig.persistent_storage.mountname = 'mysql'\nconfig.persistent_storage.filesystem = 'ext4'\nconfig.persistent_storage.mountpoint = '/var/lib/mysql'\nconfig.persistent_storage.volgroupname = 'myvolgroup'\n```\n\nWith `config.persistent_storage.mountoptions` you can change the mount options (default: defaults).\nAn example which sets `prjquota` option with xfs.\n```ruby\nconfig.persistent_storage.mountname    = 'xfs'\nconfig.persistent_storage.filesystem   = 'xfs'\nconfig.persistent_storage.mountpoint   = '/mnt/xfs'\nconfig.persistent_storage.mountoptions = ['defaults', 'prjquota']\n```\n\nDevice defaults to `/dev/sdb`. For boxes with multiple disks, make sure you increment the drive:\n```ruby\nconfig.persistent_storage.diskdevice = '/dev/sdc'\n```\n\nIf you are using LVM and you would prefer to use the disk rather than a partition, you can set the following configuration:\n```ruby\nconfig.persistent_storage.partition = false\n```\n\nWhen you expect a lot of writes in the disk (the case for `/home` mountpoints) it is recommended to change the disk variant to `Fixed` (fixed allocation) instead of the default `Standard` (dyanamic allocation). The tested types are `Standard` (default) and `Fixed`.\n```ruby\nconfig.persistent_storage.variant    = 'Fixed'\n```\n\nIf you want to pass a list of options to the underlying `VboxManage\nstorageattach` call, you can use the `config.persistent_storage.attachoptions`\noption. For instance, if you want to enable TRIM support:\n\n```ruby\nconfig.persistent_storage.mountoptions = ['defaults', 'discard']\nconfig.persistent_storage.attachoptions = ['--discard', 'on']\n```\n\nEvery `vagrant up` will attach this file as hard disk to the guest machine.\nA `vagrant destroy` will detach the storage to avoid deletion of the storage by vagrant.\nA `vagrant destroy` generally destroys all attached drives. See [VBoxManage unregistervm --delete option][vboxmanage_delete].\n\nThe disk is initialized and added to it's own volume group as specfied in the config;\nthis defaults to 'vagrant'. An ext4 filesystem is created and the disk mounted appropriately,\nwith entries added to fstab ... subsequent runs will mount this disk with the options specified.\n\n## Windows Guests\n\nWindows Guests must use the WinRM communicator by setting `vm.communicator = 'winrm'`.  An additional option is provided to\nallow you to set the drive letter using:\n\n```ruby\nconfig.persistent_storage.drive_letter = 'Z'\n```\n\nOptions that are irrelevent to Windows are ignored, such as `mountname`, `filesystem`, `mountpoint` and `volgroupname`.\n\n## How Is The Storage Created?\n\nBased on the configuration provided, during a `vagrant up` a bash script is generated and uploaded to `$tmpdir/disk_operations_#{mnt_name}.sh` (Linux) or `disk_operations_#{mnt_name}.ps1` (Windows).  If the box has not been previously provisioned the script is executed on a `vagrant up`.  To force the script to be executed again you can run `vagrant provision` or if you have halted the box, `vagrant up --provision`.\n\nThe outcome of the script being run is placed in the home drive of the vagrant user in a file called `disk_operation_log.txt`.\n\n## Optional settings\n\n```ruby\nconfig.persistent_storage.part_type_code = '82'\n```\n\n## Troubleshooting\n\nIf your box is not using LVM you must set `config.persistent_storage.use_lvm = false`.\n\n## Supported Providers\n\n* Only the VirtualBox provider is supported.\n\n## Contributors\n\n* [madAndroid](https://github.com/madAndroid)\n* [Jeremiah Snapp](https://github.com/jeremiahsnapp)\n* [Hiroya Ito](https://github.com/hiboma)\n* [joshuata](https://github.com/joshuata)\n* [Ciprian Zaharie](https://github.com/bucatzel)\n* [aishahalim](https://github.com/aishahalim)\n* [Dick Tang](https://github.com/dictcp)\n* [dsmaher](https://github.com/dsmaher)\n* [Marsup](https://github.com/Marsup)\n* [k2s](https://github.com/k2s)\n* [vvavrychuk](https://github.com/vvavrychuk)\n* [Lars Hupfeldt Nielsen](https://github.com/lhupfeldt)\n* [Chen Yu Pao](https://github.com/windperson)\n* [Kris Reese](https://github.com/ktreese)\n* [Henry N.](https://github.com/HenryNe)\n* [fredleger](https://github.com/fredleger)\n* [Sebastian Wendel](https://github.com/sourceindex)\n* [Ben Phegan](https://github.com/BenPhegan)\n* [Philipp Schrader](https://github.com/philsc)\n* [Alex Tomkins](https://github.com/tomkins)\n* [Marcin Wolny](https://github.com/mwolny)\n* [Adam Huffman](https://github.com/verdurin)\n* [caio2k](https://github.com/caio2k)\n* [Francesco](https://github.com/cisco87)\n* [Dimitris Aragiorgis](https://github.com/dimara)\n* [Symaxion](https://github.com/Symaxion)\n* [Alex Pyrgiotis](https://github.com/apyrgio)\n* [qdetweiler](https://github.com/qdetweiler)\n* [Jacob Christensen](https://github.com/jakex10sen)\n* [roccotigger](https://github.com/roccotigger)\n\n## TODO\n\n* There's Always Something to Do\n* Add more options (controller, port, etc.)\n\n\n[vboxmanage_delete]: http://www.virtualbox.org/manual/ch08.html#vboxmanage-registervm \"VBoxManage registervm / unregistervm\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkusnier%2Fvagrant-persistent-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkusnier%2Fvagrant-persistent-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkusnier%2Fvagrant-persistent-storage/lists"}