Skip to content

Instantly share code, notes, and snippets.

@s8sg
Last active January 14, 2019 04:41
Show Gist options
  • Select an option

  • Save s8sg/f90fdf15ca92303ef4751dc1b1c20b04 to your computer and use it in GitHub Desktop.

Select an option

Save s8sg/f90fdf15ca92303ef4751dc1b1c20b04 to your computer and use it in GitHub Desktop.

Revisions

  1. s8sg revised this gist Jan 14, 2019. 1 changed file with 12 additions and 9 deletions.
    21 changes: 12 additions & 9 deletions FirecrackerQuickStart.md
    Original file line number Diff line number Diff line change
    @@ -5,51 +5,54 @@

    ### Getting Started with a MicroVM
    Get Latest Binary
    ```
    ```bash
    curl -LOJ https://github.com/firecracker-microvm/firecracker/releases/download/v0.13.0/firecracker-v0.13.0
    mv firecracker-v0.13.0 firecracker
    chmod +x firecracker
    ```
    Set r/w access to kvm
    ```
    ```bash
    sudo setfacl -m u:${USER}:rw /dev/kvm
    ```
    Copy file to path
    ```
    Copy file to `$PATH`
    ```bash
    sudo cp firecracker /usr/bin/
    ```

    ### Use firectl
    build firectl **(Note: golang1.11 is needed)**
    Build firectl binary **(Note: golang1.11 is needed)**
    ```
    sudo yum install -y git
    git clone https://github.com/firecracker-microvm/firectl
    cd firectl
    make
    ```
    Copy binary to `$PATH`
    ```bash
    sudo cp firecracker /usr/bin/
    ```

    Download kernel and root filesystem
    ```
    ```bash
    fsSL -o /tmp/hello-vmlinux.bin https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin
    curl -fsSL -o /tmp/hello-rootfs.ext4 https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4
    ```

    Create microVM
    ```
    ```bash
    ./firectl \
    --kernel=/tmp/hello-vmlinux.bin \
    --root-drive=/tmp/hello-rootfs.ext4 \
    --kernel-opts="console=ttyS0 noapic reboot=k panic=1 pci=off nomodules rw"
    ```

    Login to the microvm with username/password
    ```
    ```bash
    root
    root
    ```

    Stop microvm with `reboot` command
    ```
    ```bash
    reboot
    ```
  2. s8sg revised this gist Jan 14, 2019. 1 changed file with 13 additions and 3 deletions.
    16 changes: 13 additions & 3 deletions FirecrackerQuickStart.md
    Original file line number Diff line number Diff line change
    @@ -14,10 +14,9 @@ Set r/w access to kvm
    ```
    sudo setfacl -m u:${USER}:rw /dev/kvm
    ```
    Start firecracker
    Copy file to path
    ```
    rm -f /tmp/firecracker.socket
    ./firecracker --api-sock /tmp/firecracker.socket
    sudo cp firecracker /usr/bin/
    ```

    ### Use firectl
    @@ -27,6 +26,7 @@ sudo yum install -y git
    git clone https://github.com/firecracker-microvm/firectl
    cd firectl
    make
    sudo cp firecracker /usr/bin/
    ```

    Download kernel and root filesystem
    @@ -43,3 +43,13 @@ Create microVM
    --kernel-opts="console=ttyS0 noapic reboot=k panic=1 pci=off nomodules rw"
    ```

    Login to the microvm with username/password
    ```
    root
    root
    ```

    Stop microvm with `reboot` command
    ```
    reboot
    ```
  3. s8sg revised this gist Jan 14, 2019. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions FirecrackerQuickStart.md
    Original file line number Diff line number Diff line change
    @@ -21,11 +21,10 @@ rm -f /tmp/firecracker.socket
    ```

    ### Use firectl
    build firectl
    build firectl **(Note: golang1.11 is needed)**
    ```
    sudo yum install -y git
    git clone https://github.com/firecracker-microvm/firectl
    sudo amazon-linux-extras install -y golang1.11
    cd firectl
    make
    ```
  4. s8sg revised this gist Jan 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion FirecrackerQuickStart.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Firecracker - QuickStart

    ### Overview
    ![][https://www.nutanix.com/wp-content/uploads/2018/11/firecracker.png]
    ![Overview](https://www.nutanix.com/wp-content/uploads/2018/11/firecracker.png)

    ### Getting Started with a MicroVM
    Get Latest Binary
  5. s8sg created this gist Jan 14, 2019.
    46 changes: 46 additions & 0 deletions FirecrackerQuickStart.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    # Firecracker - QuickStart

    ### Overview
    ![][https://www.nutanix.com/wp-content/uploads/2018/11/firecracker.png]

    ### Getting Started with a MicroVM
    Get Latest Binary
    ```
    curl -LOJ https://github.com/firecracker-microvm/firecracker/releases/download/v0.13.0/firecracker-v0.13.0
    mv firecracker-v0.13.0 firecracker
    chmod +x firecracker
    ```
    Set r/w access to kvm
    ```
    sudo setfacl -m u:${USER}:rw /dev/kvm
    ```
    Start firecracker
    ```
    rm -f /tmp/firecracker.socket
    ./firecracker --api-sock /tmp/firecracker.socket
    ```

    ### Use firectl
    build firectl
    ```
    sudo yum install -y git
    git clone https://github.com/firecracker-microvm/firectl
    sudo amazon-linux-extras install -y golang1.11
    cd firectl
    make
    ```

    Download kernel and root filesystem
    ```
    fsSL -o /tmp/hello-vmlinux.bin https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin
    curl -fsSL -o /tmp/hello-rootfs.ext4 https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4
    ```

    Create microVM
    ```
    ./firectl \
    --kernel=/tmp/hello-vmlinux.bin \
    --root-drive=/tmp/hello-rootfs.ext4 \
    --kernel-opts="console=ttyS0 noapic reboot=k panic=1 pci=off nomodules rw"
    ```