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

[Feature Request] LXC support #21

Open
Lithimlin opened this issue Sep 19, 2024 · 12 comments
Open

[Feature Request] LXC support #21

Lithimlin opened this issue Sep 19, 2024 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lithimlin
Copy link

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.

@meffie
Copy link
Owner

meffie commented Sep 19, 2024 via email

@meffie meffie self-assigned this Sep 19, 2024
@meffie meffie added the enhancement New feature or request label Sep 19, 2024
@IamLunchbox
Copy link
Collaborator

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.

@Lithimlin
Copy link
Author

Lithimlin commented Sep 19, 2024

Would you need to have a mix of VMs and Containers in a single molecule scenario?

No, I'd imagine they'd be different scenarios.

Sadly, here is no plugin for lxc manipulation in community.general right now

There is. Its community.general.proxmox.

Wouldnt this be very different to the current access method of molecule-proxmox?

You'd access the LXC via SSH, just like the KVM.

@IamLunchbox
Copy link
Collaborator

Ah, i was mislead by the modules title. For reference: Here

@meffie
Copy link
Owner

meffie commented Sep 21, 2024

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.

@Lithimlin
Copy link
Author

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.

@IamLunchbox
Copy link
Collaborator

IamLunchbox commented Sep 25, 2024 via email

@meffie
Copy link
Owner

meffie commented Sep 25, 2024 via email

@IamLunchbox
Copy link
Collaborator

IamLunchbox commented Sep 25, 2024 via email

@Lithimlin
Copy link
Author

Lithimlin commented Oct 1, 2024

Generally speaking, the Proxmox API allows you to easily get any configured IPs.
I suppose with pvesh, you'd get just that path or the .../{vmid}/config?

As far as I can see from the docs and code, the Proxmox module does not return any info on the LXC. The proxmox_vm_info module seems to get a lot of info on a VM (QEMU or LXC), but at first glance this doesn't include the IP address(es). which also includes the IP address(es)

@IamLunchbox
Copy link
Collaborator

I could not review the output of proxmox_vm_info for lxc yet, but it seems you are right - at least the api spec supports ips for lxc containers and is used by the module. I dont knwo

So we could possibly substitute the custom qemu guest agent query module when lxc containers are managed.

@IamLunchbox
Copy link
Collaborator

@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 proxmox_kvm_info.

IMHO this is a nice addition, since it would lead to an alternative detection method besides the qemu guest agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants