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

Upgraded from 0.7.1 to 0.7.6 - got this error: Guest agent is not responding: QEMU guest agent is not connected #1050

Closed
LavBU opened this issue Nov 20, 2023 · 3 comments

Comments

@LavBU
Copy link

LavBU commented Nov 20, 2023

Linux distribution

Oracle-8

Terraform version

Terraform v1.5.7
on linux_amd64

Provider and libvirt versions

0.7.6

Checklist

  • Looks like a bug

Description of Issue/Question

When using version 0.7.1, I didn't have no error regarding QEMU guest agent.
When unzip 0.7.6 and using it in main.tf file, my guest provisioning worked, but with this error:

Plan: 6 to add, 0 to change, 0 to destroy.
libvirt_volume.vm[0]: Creating...
libvirt_cloudinit_disk.cloudinit: Creating...
libvirt_network.vm_nfs_network: Creating...
libvirt_network.vm_main_network: Creating...
libvirt_network.vm_iscsi_network: Creating...
libvirt_network.vm_nfs_network: Creation complete after 5s [id=1b7fef2a-6357-4da7-8863-df1506c51a63]
libvirt_network.vm_main_network: Creation complete after 5s [id=404ab10b-9942-46e9-9019-9cb0a0c1f67d]
libvirt_network.vm_iscsi_network: Creation complete after 5s [id=d79457d9-8fea-4fd9-a725-4cb83cb27b79]
libvirt_volume.vm[0]: Creation complete after 8s [id=my_guest.qcow2]
libvirt_cloudinit_disk.cloudinit: Creation complete after 8s [id=my_guest.iso;0bcdfe3e-67cd-4407-a5eb-6439ebaf80cd]
libvirt_domain.vm[0]: Creating...

│ Error: error retrieving interface addresses: error retrieving interface addresses: Guest agent is not responding: QEMU guest agent is not connected

│ with libvirt_domain.vm[0],
│ on main.tf line 89, in resource "libvirt_domain" "vm":
│ 89: resource "libvirt_domain" "vm" {

Setup

The relevant main.tf section is this:

resource "libvirt_domain" "vm" {
count = var.VM_COUNT
name = "${var.VM_HOSTNAME}"
memory = var.VMEM
vcpu = var.VCPU
cloudinit = libvirt_cloudinit_disk.cloudinit.id
qemu_agent = true

Steps to Reproduce Issue

Provisioning of a new VM using 0.7.6 version with the above main.tf 'qemu_agent = true' defined.

@rgl
Copy link
Contributor

rgl commented Nov 20, 2023

FWIW, this is also happening here, in my terraform-libvirt-talos example, which uses qemu_agent = true and network_interface wait_for_lease = false.

PS in my case qemu agent will not really be available until much later, after the virtual machine is created, after it reports the ip address, after it eventually installs the qemu agent; so in my case, having qemu_agent = false and network_interface wait_for_lease = true fixed the problem.

@LavBU
Copy link
Author

LavBU commented Nov 21, 2023

Thanks @rgl for your reply and nice work you did there 👍
I just tested it qemu_agent = false (in my case, the network_interface wait_for_lease is not defined at all), and everything is working as usual (Guest is up and running with network connection).
Will go with 0.7.6 then. Thanks

@LavBU LavBU closed this as completed Nov 21, 2023
@LavBU
Copy link
Author

LavBU commented Nov 21, 2023

So far So good

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

2 participants