{"record":{"id":"37ee59a0f487314b","repo":"hashicorp/vagrant","slug":"vagrant-cannot-create-an-iso-due-to-the-host-capab","errorCode":null,"errorMessage":"Vagrant cannot create an iso due to the host capability for creating isos not existing.\nVagrant will now exit.","messagePattern":"Vagrant cannot create an iso due to the host capability for creating isos not existing\\.\nVagrant will now exit\\.","errorType":"exception","errorClass":"Vagrant::Errors::CreateIsoHostCapNotFound","httpStatus":null,"severity":"error","filePath":"lib/vagrant/action/builtin/cloud_init_setup.rb","lineNumber":113,"sourceCode":"          msg = Vagrant::Util::Mime::Multipart.new\n          msg.headers[\"MIME-Version\"] = \"1.0\"\n\n          text_cfgs.each do |c|\n            msg.add(c)\n          end\n\n          msg\n        end\n\n        # Writes the contents of the guests cloud_init config to a tmp\n        # dir and passes that source directory along to the host cap to be\n        # written to an iso\n        #\n        # @param [Vagrant::Machine] machine\n        # @param [Vagrant::Util::Mime::Multipart] user_data\n        # @param [Hash] meta_data\n        def write_cfg_iso(machine, env, user_data, meta_data)\n          raise Errors::CreateIsoHostCapNotFound if !env[:env].host.capability?(:create_iso)\n\n          iso_path = catch(:iso_path) do\n            # This iso sentinel file is used to store the path of the\n            # generated iso file and its checksum. If the file does\n            # not exist, or the actual checksum of the file does not\n            # match that stored in the sentinel file, it is ignored\n            # and the iso is generated. This is used to prevent multiple\n            # iso file from being created over time.\n            iso_sentinel = env[:machine].data_dir.join(\"action_cloud_init_iso\")\n            if iso_sentinel.file?\n              checksum, path = iso_sentinel.read.chomp.split(\":\", 2)\n              if File.exist?(path) && Vagrant::Util::FileChecksum.new(path, :sha256).checksum == checksum\n                throw :iso_path, Pathname.new(path)\n              end\n              iso_sentinel.unlink\n            end\n\n            begin","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/action/builtin/cloud_init_setup.rb#L95-L131","documentation":"When a Vagrantfile defines cloud_init configs, Vagrant must build a NoCloud ISO on the host to hand the config to the guest. Building the ISO is a host capability (`create_iso`) that is only registered for linux, darwin and windows hosts (plugins/hosts/{linux,darwin,windows}/cap/fs_iso.rb). If `env[:env].host.capability?(:create_iso)` is false, Vagrant cannot produce the ISO and aborts before booting.","triggerScenarios":"Any `vagrant up` with non-empty `config.vm.cloud_init` entries while running on a host whose OS plugin does not register the `create_iso` capability (e.g. FreeBSD/other non linux-darwin-windows hosts, or a stripped-down/custom Vagrant install missing the host plugins).","commonSituations":"Running Vagrant on an uncommon host OS; embedded Vagrant distributions that omit host plugins; very old Vagrant versions predating the fs_iso host capabilities; running from a container that lacks host detection.","solutions":["Run `vagrant up` from a Linux, macOS or Windows host where the create_iso capability exists.","Upgrade Vagrant to a current release (host plugins ship built-in) and retry.","If you cannot change the host, remove the cloud_init config from the Vagrantfile and deliver the setup with a shell provisioner instead.","Advanced: write a custom host plugin that registers a `create_iso` host capability for your platform."],"exampleFix":"# before (Vagrantfile on an unsupported host)\nconfig.vm.cloud_init do |cloud_init|\n  cloud_init.user_data = \"#cloud-config\\npackages: [htop]\\n\"\nend\n\n# after: use a shell provisioner instead\nconfig.vm.provision \"shell\", inline: \"apt-get update && apt-get install -y htop\"","handlingStrategy":"validation","validationCode":"# Ruby: verify the host can build ISOs before relying on cloud_init\nrequire \"vagrant\"\nenv = Vagrant::Environment.new\nunless env.host.capability?(:create_iso)\n  abort \"This host cannot build cloud-init ISOs; use a shell provisioner instead\"\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate cloud_init usage on the host platform in your Vagrantfile (Vagrant::Platform.linux?/darwin?/windows?) with a shell-provisioner fallback.","Run Vagrant from a standard Linux/macOS/Windows host when your workflow depends on cloud_init.","Keep Vagrant updated so the linux/darwin/windows host fs_iso capabilities are present."],"tags":["vagrant","cloud-init","host-capability","iso"],"backgroundTag":"unsupported-host-platform","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}