Skip to content

Instantly share code, notes, and snippets.

@sameo
Created November 30, 2018 21:43
Show Gist options
  • Save sameo/365ac12af3cce75cca5424911fd76ea0 to your computer and use it in GitHub Desktop.
Save sameo/365ac12af3cce75cca5424911fd76ea0 to your computer and use it in GitHub Desktop.
curl --unix-socket /tmp/firecracker.sock -i \
    -X PUT 'http://localhost/boot-source'   \
    -H 'Accept: application/json'           \
    -H 'Content-Type: application/json'     \
    -d '{
        "kernel_image_path": "/home/samuel/devlp/hypervisor/firecracker-data/hello-vmlinux.bin",
        "boot_args": "console=ttyS0 reboot=k panic=1 pci=off"
    }'

curl --unix-socket /tmp/firecracker.sock -i \
    -X PUT 'http://localhost/drives/rootfs' \
    -H 'Accept: application/json'           \
    -H 'Content-Type: application/json'     \
    -d '{
        "drive_id": "rootfs",
        "path_on_host": "/home/samuel/devlp/hypervisor/firecracker-data/hello-rootfs.ext4",
        "is_root_device": true,
        "is_read_only": false
    }'

curl --unix-socket /tmp/firecracker.sock -i \
    -X PUT 'http://localhost/actions'       \
    -H  'Accept: application/json'          \
    -H  'Content-Type: application/json'    \
    -d '{
        "action_type": "InstanceStart"
     }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment