Skip to content
Shea Craig edited this page May 17, 2017 · 3 revisions

Hosting images centrally

vfuse can interact with base images over http. If you are using a template and cache is true, vfuse will download the dmg to ~/.vfuse/ and will consult that directory before downloading the dmg again. Otherwise, it will mount the dmg over the network before doing the conversion.

In this example, I'm sharing the dmg on localhost and want to cache the dmg. Here's the template I'm using:

{
    "input": "http://localhost:8000/vagrant-10.10.3-14D136.dmg",
    "output": "~/Downloads",
    "name": "osx-10.10.3",
    "cache": true,
    "hw_version": 11,
    "mem_size": 2048,
    "disk_type": 0,
    "bridged": true
    "packer_template": ""
}

Running vfuse against this template will download and cache the dmg, then convert it to a VM.

vfuse -t 10.10.3.json

vfuse_http_screenshot

Now if you list ~/.vfuse you will see the cached dmg, which vfuse will reference if you run it against this template again.

vfuse_cache_screenshot

Clone this wiki locally