-
Notifications
You must be signed in to change notification settings - Fork 501
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
[3.0.1-rc1] Proxmox 8.1.4 Cloud init not working #935
Comments
I have almost the same issue. But in my provisioning process the Cloudinit dissapear Some people say that its working but officially that doesn't work and is mentioned here |
@TheLillo Hi, I've been trying to find a workaround for this for some time and I finally found it: #901 (comment) Hope it helps. |
I doubt that this is not the case. :/ |
I've had the same problem - here's what I did to fix it
After doing all of this, my Terraform applies now work |
Same issue for me. I use local-zfs. |
Awesome, but you what is the universal solution? You for example are using cloudinit during template creation
That's ok but worked in Proxmox v7. Now In proxmox 8 doesn't. Some say that cloudinit shouldn't be set at all in template. Other say that it should be on ide3. None of that worked. I'm using |
Interesting, I think there's a PR coming to fix this for good, but in the
meantime this works for people like me just doing a simple cloud init config
Annoying that this doesn't work for people using cicustom though
…On Tue, 13 Feb 2024, 17:17 Konrad, ***@***.***> wrote:
I've had the same problem - here's what I did to fix it
- On your Proxmox server, run the following to create your cloud-init
template VM
- In my case I'm using the latest Ubuntu 22.04 cloud-init image
- Note as well that I'm using virt-customize to install the qemu guest
agent to the VM as it's required for terraform destroy and to confirm
that the agent is installed
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
apt install guestfs-tools
virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
qm create 9000 --name ci-template --memory 2048 --net0 virtio,bridge=vmbr2 --scsihw virtio-scsi-pci
qm set 9000 --scsi0 local-lvm:0,import-from=/root/jammy-server-cloudimg-amd64.img
qm set 9000 --ide2 local-lvm:cloudinit
qm set 9000 --boot order=scsi0
qm set 9000 --serial0 socket --vga serial0
qm template 9000
- The docs for this next part are wrong
cloudinit_cdrom_storage - string - Set the storage location for the cloud-init drive. Required when specifying cicustom.
- This isn't true and needs to be defined in your Terraform config
even if you're not using cicustom
- In my case I just needed to define the variable cloudinit_cdrom_storage
as local-lvm
After doing all of this, my Terraform applies now work
Awesome, but you what is the universal solution? You for example are using
cloudinit during template creation
qm set 9000 --ide2 local-lvm:cloudinit
That's ok but worked in Proxmox v7. Now In proxmox 8 doesn't. Some say
that cloudinit shouldn't be set at all in template. Other say that it
should be on ide3. None of that worked. I'm using cicustom and when there
is phase when terraform resize the disk to bigger one and sets cloudinit
suddenly cloudinit isn't attached at all and on ide2 empty cdrom appears.
And that's the problem. Anyone who fix this isn't using cicustom using
snippets.
—
Reply to this email directly, view it on GitHub
<#935 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARBSAZ6DR2VO3AAN4YRZUA3YTON33AVCNFSM6AAAAABDDSNMVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSGA2DCNZZGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@USBAkimbo you are referring to this #937 ? I hope this will help as it removes that damn ISO which is so useless. |
As the owner of that PR, my workaround is setting the And my PR is my personal setup, not for the provider. I'm still a novice that's just using the providers other people are making 😅 |
hello, I've tried electropolis solution without any success, it still removes disks during after VM creation, during cloudinit boot (haven't tried other options) update: |
I've posted a minimal example over here that works to deploy a VM with cloud init enabled. I'm testing on Proxmox 7.4-17 and my template VM has cloud init enabled. I've also submitted a merge request to update the documentation to indicate that Hopefully the example either works for others and can help people determine what's different between their terraform and my example, or it doesn't work and we can figure out if it's another issue (e.g. an incompatibility with the Proxmox 8.x release). None of this addresses the problem of cicustom not working, but we'll get a separate ticket to focus specifically on that problem. |
I also encounter the issue of cicustom not working as expected, but I want to execute scripts post VM deployment. In my case, if I set cicustom correctly, then cicustom, ciuser, cipassword, etc., will not work either, leading to an inability to log into my VM to check any messages, and the default ubuntu also don't work. If not use cicustom to execute script, I use Provisioner, but I don't know how that SSH login to the VMs inside PVE using passwords (in connection segment), I only can't SSH login to main console of my node. Any helpful suggestions would be greatly appreciated. |
I need to investigate the "cicustom doesn't work" issue because it should work and as best I can tell, it doesn't. Until that is resolved, I can only offer you a workaround, which is using the pattern that I use when deploying VMs:
I chain these two things together with a
I know this is not a solution, only a workaround, but it's the best I have for you at the moment. |
We can debate what solution is working but that's not the case. It's a workaround that doesn't even applied the current scenario with |
As suggested above, I solved creation issues with Finally, it wants to drop Not sure if I need to create another issue to report all this, seems to be caused by the same thing. |
This should be resolved in the latest build #959 has an example. |
If you can't ssh into the cloud-init VM and want to ssh into it using user/password ; you can exec into VM using xterm.js on proxmox UI. Head into the directory "/etc/ssh/sshd_config.d" , there might be a .conf file. Change the value to "PasswordAuthentication yes" and then restart sshd service. Try ssh into the VM again using username and password. |
Thank you very much for this, I've been looking everywhere for this answer... Everything clicked in place with this setting. For future reference and to facilitate google searches, here are the keywords I've been typing the past day :
And here is my Terraform config :
And for completness' sake, here is how I create my template
|
Does anyone have been able to deploy a VM successfully using Packer (create template with cloud-init enabled) + v3.0.1-rc[12] + Proxmox v8.1.4?
I haven't tried @leogout's solution yet (I need to create my image with Packer) |
To whoever is on the latest terraform provider, cloudinit_cdrom_storage has been deprecated https://github.com/Telmate/terraform-provider-proxmox/pull/1008/files use disks/ide/ide3/cloudinit instead |
When provisioning a virtual machine (VM) using the Telmate Terraform plugin for Proxmox, with a base on a pre-configured cloud-init template, the resulting VM loses all its configuration settings, such as boot disk, RAM, and core allocations.
Environment Details
Proxmox version: 8.1.4
Telmate Terraform plugin version: 3.0.1-rc1
Terraform version: v1.7.1 on linux_amd64
Cloud-init template settings taken from Proxmox Documentation
The resource example is take from plugin documentation
Another strange behaviour is that as soon as start all works
After some times all configuration disappear
The text was updated successfully, but these errors were encountered: