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

Add data disks not present in VM template to VM during cloning #3213

Open
vr4manta opened this issue Oct 3, 2024 · 5 comments · May be fixed by #3214
Open

Add data disks not present in VM template to VM during cloning #3213

vr4manta opened this issue Oct 3, 2024 · 5 comments · May be fixed by #3214
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@vr4manta
Copy link

vr4manta commented Oct 3, 2024

/kind feature

Describe the solution you'd like
As a cluster admin, I would like to create machines with additional data disks so that I can have dedicated disks for such things as etcd, container runtime, image storage, swap, etc.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
The idea here is to add new disks to a VM during the clone process that are not part of the vSphere VM Template. This way we can share one template across multiple machine sets but tweak the additional data disks across each machine set based on the needs of that group.

Initial goal is to support the govmomi mode.

Currently most vSphere VM Templates have a single defined disk for the OS. This feature should still check to see if any other disks are present in template and make sure new data disks are added.

There currently is a property additionalDisksGiB that will change the size of existing disks found in the vSphere VM Template, but is not related to adding disks not present in the template. This may cause confusion. Current proposal is to have a new field that will start simple and grow over time w/ additional capabilities. One example would be to have new disks only use same controller (usually scsi controller) as the primary disk.

Environment:

  • Cluster-api-provider-vsphere version: 1.11
  • Kubernetes version: (use kubectl version): 1.30.3
  • OS (e.g. from /etc/os-release): Red Hat Enterprise Linux CoreOS 418
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 3, 2024
@chrischdi
Copy link
Member

Note: one thing we should check at least once manually or in an e2e test: make sure that deletion does also delete the additional disk, so we don't leak data/vmdk's.

@chrischdi
Copy link
Member

CC @lubronzhan , @neolit123 , this one might be interesting to you folks :-)

@neolit123
Copy link
Member

neolit123 commented Oct 9, 2024

i'm not aware of related FR but happy to help with review on any PRs.
@vr4manta is this something your will be working on?

@chrischdi
Copy link
Member

It is WIP by @vr4manta at:

👍

@vr4manta
Copy link
Author

i'm not aware of related FR but happy to help with review on any PRs. @vr4manta is this something your will be working on?

Yes. I'm working this one as a feature we are needing. I've done a first pass at this and all is working so far. I've fixed some tests to make sure the conversion works properly. I've also verified that when the VM is deleted, the disks are also cleaned up. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
4 participants