# Issues with Firecracker + Terraform 0.13.5

**URL:** <https://forum.opennebula.io/t/issues-with-firecracker-terraform-0-13-5/9205>\
**Category:** Product Support\
**Created:** [February 8, 2021, 4:45pm UTC](https://forum.opennebula.io/t/issues-with-firecracker-terraform-0-13-5/9205 "2021-02-08T16:45:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pathcl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/pathcl/32/6847_2.png) [@pathcl](https://forum.opennebula.io/u/pathcl)\
**Post date:** [February 8, 2021, 4:45pm UTC](https://forum.opennebula.io/t/issues-with-firecracker-terraform-0-13-5/9205/1 "2021-02-08T16:45:43Z")

</div>

Hey there!

Thanks for this great open source project. Right now I’m trying out firecracker along with terraform and currently facing some issues.

From the opennebula webui everything works but if I use terraform I cannot deploy a vm.

* * *

**Versions of the related components and OS (frontend, hypervisors, VMs):**

OpenNebula 5.12.0.3  
Terraform v0.13.5

**Steps to reproduce:**

1. Install opennebula
2. Grab example from [https://registry.terraform.io/providers/OpenNebula/opennebula/latest/docs/resources/virtual\_machine](https://registry.terraform.io/providers/OpenNebula/opennebula/latest/docs/resources/virtual_machine)
3. Download terraform 0.13.5
4. terraform apply

**Current results:**

```
Mon Feb 8 13:00:03 2021 [Z0][VM][I]: New state is ACTIVE
Mon Feb 8 13:00:03 2021 [Z0][VM][I]: New LCM state is PROLOG
Mon Feb 8 13:00:12 2021 [Z0][VM][I]: New LCM state is BOOT
Mon Feb 8 13:00:12 2021 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/13/deployment.0
Mon Feb 8 13:00:13 2021 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Mon Feb 8 13:00:13 2021 [Z0][VMM][I]: pre: Running /var/tmp/one/vnm/fw/pre.d/firecracker
Mon Feb 8 13:00:13 2021 [Z0][VMM][I]: pre:
Mon Feb 8 13:00:13 2021 [Z0][VMM][I]: ExitCode: 0
Mon Feb 8 13:00:13 2021 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon Feb 8 13:00:18 2021 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/firecracker/deploy '/var/lib/one//datastores/0/13/deployment.0' 'localhost' 13 localhost
Mon Feb 8 13:00:18 2021 [Z0][VMM][I]: MicroVM process did not start.
Mon Feb 8 13:00:18 2021 [Z0][VMM][I]: ExitCode: 255
Mon Feb 8 13:00:19 2021 [Z0][VMM][I]: clean: Running /var/tmp/one/vnm/fw/clean.d/firecracker
Mon Feb 8 13:00:19 2021 [Z0][VMM][I]: clean:
Mon Feb 8 13:00:19 2021 [Z0][VMM][I]: ExitCode: 0
Mon Feb 8 13:00:19 2021 [Z0][VMM][I]: Successfully execute network driver operation: clean.
Mon Feb 8 13:00:19 2021 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Mon Feb 8 13:00:19 2021 [Z0][VMM][E]: Error deploying virtual machine
Mon Feb 8 13:00:19 2021 [Z0][VM][I]: New LCM state is BOOT_FAILURE

```

**Terraform output:**

```
Error: Error waiting for virtual machine (13) to be in state RUNNING: VM (ID:13) entered fail state, error:                       

on main.tf line 7, in resource "opennebula_virtual_machine" "demo":
7: resource "opennebula_virtual_machine" "demo" {
```

---

<div class="post-metadata">

**Author:** ![pathcl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/pathcl/32/6847_2.png) [@pathcl](https://forum.opennebula.io/u/pathcl)\
**Post date:** [February 8, 2021, 7:31pm UTC](https://forum.opennebula.io/t/issues-with-firecracker-terraform-0-13-5/9205/2 "2021-02-08T19:31:03Z")

</div>

Nevermind I managed to create bunch of microVms 🙂

```
provider "opennebula" {
  endpoint = "http://192.168.2.10:2633/RPC2"
  username = "oneadmin"
  password = "somepass"
}

resource "opennebula_virtual_machine" "importvm" {
    count = 3
    name = "test0${count.index}"
    permissions = "600"
    template_id = 4

    disk {
        driver = "raw"
        target = "vda"
        image_id = data.opennebula_image.osimage.id
    }

    graphics {
        listen = "0.0.0.0"
        type = "VNC"
        keymap = "es"
    }
}

data "opennebula_image" "osimage" {
  name = "centos7"
}

output "ip" {
    value = opennebula_virtual_machine.importvm.*.ip
}
```
