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

Create new vm from Datavolume #56

Open
heimdull opened this issue Mar 14, 2024 · 8 comments
Open

Create new vm from Datavolume #56

heimdull opened this issue Mar 14, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request WIP Work In Progress

Comments

@heimdull
Copy link

When I try to create a new VM using a datavolume there are no volumes available in the UI. I have 2 "local" templates that I would like to select to clone the new VMs disk from.

here is an example how I do this currently (these are visible in the DataVolumes screen)

dataVolumeTemplates: - metadata: name: vm1-disk0 spec: pvc: accessModes: - ReadWriteMany resources: requests: storage: 30Gi storageClassName: netapp-nas source: pvc: namespace: vm-templates name: debian12-genericcloud-qcow2

@feitnomore
Copy link
Member

dataVolumeTemplates is not supported right now. Can you share one or two example YAMLs so I can try to add this functionality?
Thanks!

@feitnomore feitnomore self-assigned this Mar 14, 2024
@feitnomore feitnomore added enhancement New feature or request WIP Work In Progress labels Mar 14, 2024
@feitnomore
Copy link
Member

I got examples from documentation. This is on my backlog, I'll add this support and let you know.

@feitnomore
Copy link
Member

I'm still working on this. Your request made me find a "bad architecture" decision that was made on the code, so I'm kinda refactoring everything to see if I can get a better solution that would also easily accommodate your request.
Thanks for your patience.

@feitnomore
Copy link
Member

I've created a new Feature Request as well, to be able to create different types of Data Volumes on Data Volumes screen. Today we offer only the Blank Disk option. That feature will be a great to have and complete this feature request.
I'm working constantly on this, and hope to have something soon, maybe by the end of next week.

@feitnomore
Copy link
Member

So, just to clarify, you want to clone the DataVolume, not use the existing DataVolume in the VM, right?
Please, share a full YAML, as I am getting confused, because, cloning a DataVolume involves using old DV as source, and a brand new DV as destination.

@th-2021
Copy link

th-2021 commented May 24, 2024

@feitnomore
Copy link
Member

feitnomore commented May 24, 2024

Ok, so, the upload is not available, however, using DV Template is already done on the VM Pool implementation.
In the VM Instance implementation instead of using DVTemplate on the VM yaml itself, the implementation creates the DV and after that refers to it on the yaml, which, at the end is almost the same thing. (the difference is that if you delete the VM, the DV is kept. I've done this way so that you can for example delete a VM and create a new one using the same disk, or in case you delete a VM by mistake the data is safe)
The disk screen on VM offers you 2 options:
1 - Use existing DV
2 - Import from PVC, which basically creates a new DV using the PVC as the source

In the create VM screen, you can use HTTP(s), S3, REGISTRY and PVC as sources for a DV. GCS support is also on the way. So I am not sure what we're missing over here.

PS: Because PVC is namespaced and so is VirtualMachine, when creating the VirtualMachine if you choose to import from a PVC, you'll only be able to select PVCs that are on the same namespace. I've designed this way to avoid RBAC issues.

@feitnomore
Copy link
Member

BTW, one of the things I'm working is to introduce a concept of "Images", so that you don't need to fill in the URL everytime you want to create a VirtualMachine from HTTP/S3/GCS/REGISTRY/PVC... I've been working hard on a few new features.

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

No branches or pull requests

3 participants