-
Notifications
You must be signed in to change notification settings - Fork 512
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
VM is not created properly or completely, no Cloud-init drive after creation #1104
Comments
Any little feedback is much needed and appreciated!!! |
I have also experienced Plugin crashes and Can't lock file...- got timeout errors similar to #1101 |
With the newest version = "3.0.1-rc4", I get a created VM with no errors but it doesn't start. It keeps getting connected and disconnected as a loop. |
I have the same problem. What's more, I've spotted that when running two vms, that only differ in template to clone from, one boots and one has the same problem as described in this thread. |
|
|
@Tinyblargon |
@yyy916 in the article you linked |
I will try and let you know! |
@Tinyblargon Could I be missing out on any other details? |
@yyy916 one of the things that i think is going wrong is that the guide you followed works under the assumption template settings will be preserved. Terraform will create the new vm with no regard for the template. Therefore, the only thing needed in the template is a boot disk. |
@Tinyblargon So how do you recommend I create the template? I need an Ubuntu 24.04 template. Could you please help me out with a step-by-step guide? I tried out whatever I found, for some reason it ends up the same. |
So i've been battling this same issue today. I ultimately managed to find a solution that seems to work. I'll provide some links and screenshots as well as my resource block for creating the vm's that fixed my issue. There is clearly a documentation gap here but i see you have an issue to address it for a planned release. To start with I prepared a template per the instructions on the proxmox wiki here. I called my resulting template Once I had my template VM I created a resource to make my VM. I used the existing docs on creating a cloud-init file in snippets to create user-data.yml with the contents I needed for my use case but I think this should be easy enough to understand and implement on your own. The core of the issue here I think is that cloud-init expects a serial console. My template had them but the resource seems to just clone the disk image so you need to make sure you create one as part of your resource. I could be totally off the mark with that, but it got me out of the looping startup hell.
|
@Uncurlhalo thanks for the help with this issue, the information you provided will go a long way when i start working on #1105 |
I also tested this with |
I recently updated my automation, some quick notes on that might help when you are looking over stuff (UEFI was a pain): This is my disk import line. I do not import efidisk in TF, so that might need to be documented.
This will prevent images that do not have secureboot enabled from booting (like Alpine)
edit: https://github.com/Stankye/Proxmox-CloudInit-Template/blob/main/debian.md |
Disclaimer: I'm a noobie in terraform. I've created and configured ubuntu cloud-init image converting it into a vm template using an official pve guide, configuring boot order, serial console, etc. UPD: I figured it out. I had to create a second |
@Uncurlhalo This config works for my existing template too!! |
I still get plug-in crashes and can't lock file errors and am trying to get a ssh connection working but I can finally get a working VM that starts after creation. Thank you so very much!! @Tinyblargon @Uncurlhalo |
Hi! I have no prior knowledge related to any of this, so I may have made many mistakes. Please help me out with this.
I'm using an Ubuntu 24.04 VM template to create VMs using Terraform, followed this tutorial to create the VM template https://tcude.net/creating-a-vm-template-in-proxmox/.
My main.tf is as follows -
This gives me a VM with no cloud-init drive and a state of continuous boots like the pic attached.
The Ubuntu OS doesn't startup.
Now , if I remove bridge="vmbr0" and ipconfig0="ip=dhcp". This creates a VM with the following error. It starts once manually started though.
proxmox_vm_qemu.my_test_vms[0]: Creating...
proxmox_vm_qemu.my_test_vms[0]: Still creating... [10s elapsed]
╷
│ Error: error updating VM: 500 no sdn vnet ID specified, error status: {"data":null} (params: map[agent:0 bios:seabios cores:2 cpu:host delete:ide2,scsi0 hotplug:network,disk,usb kvm:true memory:2048 name:Test-vm-1 net0:virtio=5E:74:ED:5A:07:CC numa:false onboot:true protection:false scsihw:lsi sockets:1 tablet:true vmid:102])
│
│ with proxmox_vm_qemu.my_test_vms[0],
│ on main.tf line 20, in resource "proxmox_vm_qemu" "my_test_vms":
│ 20: resource "proxmox_vm_qemu" "my_test_vms" {
│
If I remove just the line "bridge=vmbr0", it gives a similar error and starts when started.
Error: error updating VM: 500 no sdn vnet ID specified, error status: {"data":null} (params: map[agent:0 balloon:0 bios:seabios cicustom: cipassword: ciupgrade:0 cores:2 cpu:host delete:ide0,ide2,scsi0,ciuser,searchdomain,nameserver,shares,serial0 hotplug:network,disk,usb ipconfig0:ip=dhcp kvm:true memory:4096 name:induz-memcache-vm-1 net0:virtio=CE:F6:F8:EA:5F:B9 numa:0 onboot:true protection:false scsihw:lsi sockets:1 sshkeys:%0A tablet:true vmid:100])
The text was updated successfully, but these errors were encountered: