{"id":25690162,"url":"https://github.com/mweisel/fortigate-vagrant-libvirt","last_synced_at":"2025-02-24T22:16:35.633Z","repository":{"id":51141713,"uuid":"349568018","full_name":"mweisel/fortigate-vagrant-libvirt","owner":"mweisel","description":"A Packer template for creating a Fortinet FortiGate Vagrant box for the libvirt provider.","archived":false,"fork":false,"pushed_at":"2022-06-20T00:36:28.000Z","size":7,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-22T23:46:50.410Z","etag":null,"topics":["fortigate","libvirt-provider","packer-template","vagrant-box"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/mweisel.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}},"created_at":"2021-03-19T22:14:32.000Z","updated_at":"2024-02-12T11:10:02.000Z","dependencies_parsed_at":"2022-09-05T01:01:33.135Z","dependency_job_id":null,"html_url":"https://github.com/mweisel/fortigate-vagrant-libvirt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Ffortigate-vagrant-libvirt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Ffortigate-vagrant-libvirt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Ffortigate-vagrant-libvirt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mweisel%2Ffortigate-vagrant-libvirt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mweisel","download_url":"https://codeload.github.com/mweisel/fortigate-vagrant-libvirt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240564597,"owners_count":19821422,"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":["fortigate","libvirt-provider","packer-template","vagrant-box"],"created_at":"2025-02-24T22:16:35.140Z","updated_at":"2025-02-24T22:16:35.626Z","avatar_url":"https://github.com/mweisel.png","language":"HCL","readme":"\u003cimg alt=\"Vagrant\" src=\"https://img.shields.io/badge/vagrant%20-%231563FF.svg?\u0026style=for-the-badge\u0026logo=vagrant\u0026logoColor=white\"/\u003e\n\n# Fortinet FortiGate Vagrant box\n\nA Packer template for creating a Fortinet FortiGate Vagrant box for the [libvirt](https://libvirt.org) provider.\n\n## Prerequisites\n\n  * [Fortinet](https://support.fortinet.com) account\n  * [Git](https://git-scm.com)\n  * [Packer](https://packer.io) \u003e= 1.70\n  * [libvirt](https://libvirt.org)\n  * [QEMU](https://www.qemu.org)\n  * [Vagrant](https://www.vagrantup.com) \u003e= 2.2.10, != 2.2.16\n  * [vagrant-libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt)\n\n## Steps\n\n0\\. Verify the prerequisite tools are installed.\n\n\u003cpre\u003e\n$ \u003cb\u003ewhich git unzip packer libvirtd qemu-system-x86_64 vagrant\u003c/b\u003e\n$ \u003cb\u003evagrant plugin list\u003c/b\u003e\nvagrant-libvirt (0.9.0, global)\n\u003c/pre\u003e\n\n1\\. Log in and download the _FortiGate for KVM platform_ package from [Fortinet](https://docs.fortinet.com/document/fortigate-private-cloud/7.2.0/kvm-administration-guide/706376/about-fortigate-vm-on-kvm). Save the file to your `Downloads` directory.\n\n2\\. Extract the disk image file to the `/var/lib/libvirt/images` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003ecd $HOME/Downloads\u003c/b\u003e\n$ \u003cb\u003esudo unzip -d /var/lib/libvirt/images FGT_VM64_KVM-v7.2.0.F-build1157-FORTINET.out.kvm.zip\u003c/b\u003e\n\u003c/pre\u003e\n\n3\\. Modify the file ownership and permissions. Note the owner may differ between Linux distributions.\n\n\u003e Ubuntu 18.04\n\n\u003cpre\u003e\n$ \u003cb\u003esudo chown libvirt-qemu:kvm /var/lib/libvirt/images/fortios.qcow2\u003c/b\u003e\n$ \u003cb\u003esudo chmod u+x /var/lib/libvirt/images/fortios.qcow2\u003c/b\u003e\n\u003c/pre\u003e\n\n\u003e Arch Linux\n\n\u003cpre\u003e\n$ \u003cb\u003esudo chown libvirt-qemu:libvirt-qemu /var/lib/libvirt/images/fortios.qcow2\u003c/b\u003e\n$ \u003cb\u003esudo chmod u+x /var/lib/libvirt/images/fortios.qcow2\u003c/b\u003e\n\u003c/pre\u003e\n\n4\\. Create the `boxes` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003emkdir -p $HOME/boxes\u003c/b\u003e\n\u003c/pre\u003e\n\n5\\. Clone this GitHub repo and _cd_ into the directory.\n\n\u003cpre\u003e\n$ \u003cb\u003egit clone https://github.com/mweisel/fortigate-vagrant-libvirt\u003c/b\u003e\n$ \u003cb\u003ecd fortigate-vagrant-libvirt\u003c/b\u003e\n\u003c/pre\u003e\n\n6\\. Packer _build_ to create the Vagrant box artifact. Supply the FortiOS version number for the `version` variable value.\n\n\u003cpre\u003e\n$ \u003cb\u003epacker build -var 'version=7.2.0' fortigate.pkr.hcl\u003c/b\u003e\n\u003c/pre\u003e\n\n7\\. Copy the Vagrant box artifact to the `boxes` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003ecp ./builds/fortinet-fortigate-7.2.0.box $HOME/boxes/\u003c/b\u003e\n\u003c/pre\u003e\n\n8\\. Copy the box metadata file to the `boxes` directory.\n\n\u003cpre\u003e\n$ \u003cb\u003ecp ./src/fortigate.json $HOME/boxes/\u003c/b\u003e\n\u003c/pre\u003e\n\n9\\. Change the current working directory to `boxes`.\n\n\u003cpre\u003e\n$ \u003cb\u003ecd $HOME/boxes\u003c/b\u003e\n\u003c/pre\u003e\n\n10\\. Substitute the `HOME` placeholder string in the box metadata file.\n\n\u003cpre\u003e\n$ \u003cb\u003eawk '/url/{gsub(/^ */,\"\");print}' fortigate.json\u003c/b\u003e\n\"url\": \"file://\u003cb\u003eHOME\u003c/b\u003e/boxes/fortinet-fortigate-VER.box\"\n\n$ \u003cb\u003esed -i \"s|HOME|${HOME}|\" fortigate.json\u003c/b\u003e\n\n$ \u003cb\u003eawk '/url/{gsub(/^ */,\"\");print}' fortigate.json\u003c/b\u003e\n\"url\": \"file://\u003cb\u003e/home/marc\u003c/b\u003e/boxes/fortinet-fortigate-VER.box\"\n\u003c/pre\u003e\n\n11\\. Also, substitute the `VER` placeholder string with the FortiOS version you're using.\n\n\u003cpre\u003e\n$ \u003cb\u003eawk '/VER/{gsub(/^ */,\"\");print}' fortigate.json\u003c/b\u003e\n\"version\": \"\u003cb\u003eVER\u003c/b\u003e\",\n\"url\": \"file:///home/marc/boxes/fortinet-fortigate-\u003cb\u003eVER\u003c/b\u003e.box\"\n\n$ \u003cb\u003esed -i 's/VER/7.2.0/g' fortigate.json\u003c/b\u003e\n\n$ \u003cb\u003eawk '/\\\u0026lt;version\\\u0026gt;|url/{gsub(/^ */,\"\");print}' fortigate.json\u003c/b\u003e\n\"version\": \"\u003cb\u003e7.2.0\u003c/b\u003e\",\n\"url\": \"file:///home/marc/boxes/fortinet-fortigate-\u003cb\u003e7.2.0\u003c/b\u003e.box\"\n\u003c/pre\u003e\n\n12\\. Add the Vagrant box to the local inventory.\n\n\u003cpre\u003e\n$ \u003cb\u003evagrant box add --box-version 7.2.0 fortigate.json\u003c/b\u003e\n\u003c/pre\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmweisel%2Ffortigate-vagrant-libvirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmweisel%2Ffortigate-vagrant-libvirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmweisel%2Ffortigate-vagrant-libvirt/lists"}