-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Feature Request] LXC support #21
Comments
Hello,
It would be very nice to have. I'm not currently using LXC containers very much,
but it does make sense to support.
Would you need to have a mix of VMs and Containers in a single molecule
scenario? Having only one or the other could simplify the implementation.
Mike --
…________________________________________
From: JL Euler ***@***.***>
Sent: Thursday, September 19, 2024 11:16 AM
To: meffie/molecule-proxmox
Cc: Subscribed
Subject: [meffie/molecule-proxmox] [Feature Request] LXC support (Issue #21)
Hi,
would it be possible to add support for LXCs to this driver?
It can happen fairly often that a role that works on a KVM doesn't work on an LXC, especially when it concerns hardware devices.
—
Reply to this email directly, view it on GitHub<#21>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIPBUQA6GJZ2OKR2I7XA23ZXLTFBAVCNFSM6AAAAABOQFEVEOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTMNRWHA4DIMY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Wouldnt this be very different to the current access method of molecule-proxmox? We now use primarily ansibles ssh to access the vm. Molecule docker/podman probably uses the socket the spawn container processes so their access model is very different. @Lithimlin how would you want to access the container? And we rely on community.general.proxmox_kvm to create/change/destroy vms. Sadly, here is no plugin for lxc manipulation in community.general right now so thered need to be a custom playbook or library to provide this feature. |
No, I'd imagine they'd be different scenarios.
There is. Its community.general.proxmox.
You'd access the LXC via SSH, just like the KVM. |
Ah, i was mislead by the modules title. For reference: Here |
It was several years ago when I last tried this. I seem to now recall the issue was some things could not be done with the API and had to be done by running pvesh on the proxmox host. That may have changed (or I could be wrong). I'll have to try again on a current version of proxmox. |
I've recently read into the API a bit and worked on the proxmox ansible module, so if there's anything you need help with let me know. |
Sure, all contributions are welcome! I think if you would point out differences to the kvm creation that would be helpful.
And maybe you can take the create.yml playbook from this repo as a template and change it to create a lxc container - thatd be great! Just leave out the templating for the start, a smal POC probably helps most to decide if it is feasible.
The biggest problem right now is to determine the ip address of the container. We use the guest agent and a custom module for that, what can we use to reliably find the containers ip through API calls?
Sep 24, 2024 10:48:28 JL Euler ***@***.***>:
…
I've recently read into the API a bit and worked on the proxmox ansible module, so if there's anything you need help with let me know.
—
Reply to this email directly, view it on GitHub[#21 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ANRA34KFODDU3QAIRNGE3ZLZYERNVAVCNFSM6AAAAABOQFEVEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZQGY2TMNZUG4].
You are receiving this because you commented.
[Tracking image][https://github.com/notifications/beacon/ANRA34ILG45EVQZLSAWPOZ3ZYERNVA5CNFSM6AAAAABOQFEVEOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUNJVM6W.gif]
|
Ah, yes getting the container IP address is the sticking point. The only method I was able
to find required running the pvesh command on the proxmox host. If there is no API
for such, we are kind of stuck.
|
I thought up three other mechanisms we could use:
1. DNS, if e.g. dhcp hostname registration is configured in that network.
2. Parsing the cloud init input for ips (not lxc)
3. Hardcoded ips, if the new ip is otherwise predictable.
I thought about that in the past due to networks, where several interfaces are attached. In that case the qemu agent could be unreliable?
Sep 25, 2024 15:34:53 Michael Meffie ***@***.***>:
…
Ah, yes getting the container IP address is the sticking point. The only method I was able
to find required running the pvesh command on the proxmox host. If there is no API
for such, we are kind of stuck.
________________________________________
From: IamLunchbox ***@***.***>
Sent: Wednesday, September 25, 2024 1:10 AM
To: meffie/molecule-proxmox
Cc: Michael Meffie; Assign
Subject: Re: [meffie/molecule-proxmox] [Feature Request] LXC support (Issue #21)
Sure, all contributions are welcome! I think if you would point out differences to the kvm creation that would be helpful.
And maybe you can take the create.yml playbook from this repo as a template and change it to create a lxc container - thatd be great! Just leave out the templating for the start, a smal POC probably helps most to decide if it is feasible.
The biggest problem right now is to determine the ip address of the container. We use the guest agent and a custom module for that, what can we use to reliably find the containers ip through API calls?
Sep 24, 2024 10:48:28 JL Euler ***@***.***>:
>
> I've recently read into the API a bit and worked on the proxmox ansible module, so if there's anything you need help with let me know.
>
> —
> Reply to this email directly, view it on GitHub[#21 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ANRA34KFODDU3QAIRNGE3ZLZYERNVAVCNFSM6AAAAABOQFEVEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZQGY2TMNZUG4].
> You are receiving this because you commented.
> [Tracking image][https://github.com/notifications/beacon/ANRA34ILG45EVQZLSAWPOZ3ZYERNVA5CNFSM6AAAAABOQFEVEOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUNJVM6W.gif]
>
—
Reply to this email directly, view it on GitHub<#21 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIPBUSPHYKXEEAROAPCLSTZYJAU3AVCNFSM6AAAAABOQFEVEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGAZTEMJUG4>.
You are receiving this because you were assigned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub[#21 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ANRA34OXHYS6D3NYRW7COHTZYK3XXAVCNFSM6AAAAABOQFEVEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZUGEYDMMBXGY].
You are receiving this because you commented.
[Tracking image][https://github.com/notifications/beacon/ANRA34INOKXSBGWY4ZFXCLLZYK3XXA5CNFSM6AAAAABOQFEVEOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUNQH55Y.gif]
|
Generally speaking, the Proxmox API allows you to easily get any configured IPs. As far as I can see from the docs and code, the Proxmox module does not return any info on the LXC. The |
I could not review the output of So we could possibly substitute the custom qemu guest agent query module when lxc containers are managed. |
@meffie I checked the output of proxmox_kvm. Making lxc containers possible would require us adding a different approach to the current detection method: Setting the ip_address manually as in cloud init right now and then parsing from IMHO this is a nice addition, since it would lead to an alternative detection method besides the qemu guest agent. |
Hi,
would it be possible to add support for LXCs to this driver?
It can happen fairly often that a role that works on a KVM doesn't work on an LXC, especially when it concerns hardware devices.
The text was updated successfully, but these errors were encountered: