Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Creating a VM with multiple PVCs

18 views
Skip to first unread message

Sagy Volkov

unread,
Nov 22, 2024, 5:06:28 AM11/22/24
to kubevirt-dev

Hi,

I'm starting to play with creating VMs in K8s - which is really cool and easy to understand, however, one thing elude my mind :)
I've been trying to create a VM that has a dataVolumeTemplates to import the OS, and that works, however, I also want this VM to automatically have a couple of PVCs created and attached to the VM as it is created. 
I've tried playing with dataVolume, but these expect the PVC to already exists.
In the case of the rootdisk it is created by the sc in the dataVolumeTemplates.spec.storage section, however for the two "data" disks (they will a DB), I need them to be created automatically and I can't seem to find the way to supply a storage class and also accessModes so I can live migrate this machine.

Any example will be greatly appreciated. 

Thx.

Sagy Volkov

Alice Frosi

unread,
Nov 22, 2024, 7:08:05 AM11/22/24
to Sagy Volkov, kubevirt-dev
Hi Sagy,

Not sure I totally get what you need, but we support blank datavolumes [1]. This kind of volume will create a disk for you on VM creation.

 
Any example will be greatly appreciated. 

Thx.

Sagy Volkov

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kubevirt-dev/2bf2c47c-27f3-4557-91af-c4a2add47128n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages