Closed weixiao-huang closed 2 years ago
yes, virtink already support PVC, 1) for Block PVC you can use it directly, 2) for filesystem PVC, need make sure a disk image file named asdisk.img
in PVC root path. a better way is use DataVolume, which will create disk.img
for filesystem PVC root path automatically. this is an example VM with Datavolume.
But how to specify the volume's mount path in the VM? I've seen the docs about the DataVolume but it seems that I didn't find some examples about specifying the volume mount path
@weixiao-huang To mount a disk to a path inside a VM, you have several options:
mount
command to mount the disk manually inside the VM/etc/fstab
fileAll Virtink could do is provide a volume as a VM disk to the VM, but the mounting part should be taken care of inside the VM.
@weixiao-huang I'm closing this issue, feel free to reopen it if you want.
Sometimes, we want to mount a PVC into the VM to persistent some data. For example, we have a PVC called
my-data
and we want to mount it into/data
path into vm. So does virtink support it? To do this thing, I think there're two hands: