Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform apply is failing #13

Open
abhiniveshjain opened this issue Sep 12, 2019 · 0 comments
Open

Terraform apply is failing #13

abhiniveshjain opened this issue Sep 12, 2019 · 0 comments

Comments

@abhiniveshjain
Copy link

Terraform apply is failing with below error.

matchbox_profile.default: Creating...
module.masters.matchbox_profile.master[0]: Creating...
matchbox_profile.default: Creation complete after 0s [id=test1]
module.masters.matchbox_profile.master[0]: Creation complete after 0s [id=test1-master-0]
module.bootstrap.matchbox_profile.bootstrap: Creating...
matchbox_group.default: Creating...
module.masters.matchbox_group.master[0]: Creating...
matchbox_group.default: Creation complete after 0s [id=test1]
module.masters.matchbox_group.master[0]: Creation complete after 0s [id=test1-master-0]
module.bootstrap.matchbox_profile.bootstrap: Creation complete after 0s [id=test1-bootstrap]
module.bootstrap.matchbox_group.bootstrap: Creating...
module.bootstrap.local_file.vm_bootstrap: Creating...
module.bootstrap.local_file.vm_bootstrap: Creation complete after 0s [id=489ef9df0c85d5cbf1e9a422332c69e9e9c01bcd]
module.bootstrap.matchbox_group.bootstrap: Creation complete after 0s [id=test1-bootstrap]
module.masters.null_resource.ipmi_master[0] (local-exec): Set Boot Device to pxe
module.bootstrap.null_resource.vm_bootstrap: Creating...
module.bootstrap.null_resource.vm_bootstrap: Provisioning with 'local-exec'...
module.bootstrap.null_resource.vm_bootstrap (local-exec): Executing: ["/bin/sh" "-c" "rm -f /var/lib/libvirt/images/bootstrap.img || true\nqemu-img create -f qcow2 /var/lib/libvirt/images/bootstrap.img 800G\nchown qemu:qemu /var/lib/libvirt/images/bootstrap.img\nvirsh create /tmp/test1-bootstrap-vm.xml\n"]
module.bootstrap.null_resource.vm_bootstrap (local-exec): qemu-img: /var/lib/libvirt/images/bootstrap.img: Could not create file: No such file or directory
module.bootstrap.null_resource.vm_bootstrap (local-exec): Formatting '/var/lib/libvirt/images/bootstrap.img', fmt=qcow2 size=858993459200 encryption=off cluster_size=65536 lazy_refcounts=off
module.masters.null_resource.ipmi_master[0] (local-exec): Chassis Power Control: Cycle
module.masters.null_resource.ipmi_master[0]: Creation complete after 1s [id=1486622495056344077]
module.bootstrap.null_resource.vm_bootstrap (local-exec): chown: cannot access ‘/var/lib/libvirt/images/bootstrap.img’: No such file or directory
module.bootstrap.null_resource.vm_bootstrap (local-exec): /bin/sh: line 3: virsh: command not found


I checked and found that libvirt wasn't installed. so I tried below and it worked.

rpm -qa |grep libv # it showed no output for libvirt
systemctl status libvirtd # it showed libvirt was not running
yum install virt-manager libvirt
systemctl start libvirtd
systemctl enable libvirtd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant