-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Problem with obtain ipv4 address (ipv4_addresses is blank list) when clonning a VM #1712
Comments
Hey @anshibanov! 👋🏼 Since you're making a clone, there could be some additional complexities. The cloning logic is quite messy and needs major attention. I noticed that you specifically ignored I suspect that ignoring the network device might be preventing the provider from correctly retrieving the network configuration when reading back the VM state. |
Hi @bpg ! And thank you so much for your response. It seems the resource "proxmox_virtual_environment_vm" "test-ansible-docker2" {
name = "test-ansible-docker2"
node_name = "hv"
cpu {
cores = 2
type = "host"
}
memory {
dedicated = 1024
}
disk {
interface = "scsi0"
size = 15
}
clone {
vm_id = 9002 # debian
#vm_id = 9001 # ubuntu
}
agent {
enabled = true
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
}
provisioner "local-exec" {
when = create
command = "sleep 15s"
}
reboot = true
}
output "ipv4_addresses" {
value = proxmox_virtual_environment_vm.test-ansible-docker2.ipv4_addresses
} The result:
Unfortunately, the |
Hm.., interesting. Let me take a closer look then 🧐 |
I couldn't reproduce this on my PVE 8.3.2 setup 🤷🏼 I used the template from this guide (we should consider adding it to the codebase), and the IP appears correctly in the output:
Not sure what else it could be. Try without |
#1701 seems related |
@bpg Thx! Without |
TLDR: agent is enabled and work, and in proxmox-webui i see VM's ip
I can't figure out how to get the IP address of the newly created virtual machine (the VM obtains it via DHCP).
The problem is ipv4_addresses always blank
Below is my Terraform configuration:
Here is the output:
However, in the Proxmox web interface, the IP address is displayed.
The text was updated successfully, but these errors were encountered: