Mirantis / virtlet

Kubernetes CRI implementation for running VM workloads
Apache License 2.0
739 stars 128 forks source link

How to access persistent volume from guest Windows VM #905

Closed GOVYANSONG closed 4 years ago

GOVYANSONG commented 4 years ago

Currently, we run samba service on the host Linux and map samba share as network drive on guest Windows VM. We are aware of emerging approaches such as virtio-Fs in the upcoming Linux 5.4. So, how would guest Windows VM access persistent volume with virtlet? Please share your thoughts.

jellonek commented 4 years ago

PTAL on https://docs.virtlet.cloud/reference/volumes/#persistent-root-filesystem

GOVYANSONG commented 4 years ago

@jellonek , thanks for the link. Here is a follow up question: does virtlet support pod volume and container volume mount for windows guest VM? If so, how is mount path specified? For example, if I want vogue to be mounted at c:\temp, do I specify it in container definition as /c/temp? Thanks for your assistance.

jellonek commented 4 years ago

Dunno how cloud-init for windows works with that. TAL on https://cloudbase-init.readthedocs.io/en/latest/index.html but I'm assuming that only block devices will be working (raw devices or flex volumes prepared by virtlet) but probably you will need to handle them using user script and they will be usable as d: or under next available device name.

GOVYANSONG commented 4 years ago

@jellonek really appreciated your response. I will read more about cloud-Init. But during meantime, could you clarify on a possible solution to share data between virtlet VM pod and normal K8s pod?

I did some further research. If I understood correctly, out-of-box solution would be to have a CephFS cluster that is accessible from k8s, and create VM pod to use volume. Then, how is it mounted within Windows VM though? I found it elusive and confusing to approach this subject.

GOVYANSONG commented 4 years ago

now, Take Ceph as an example. K8S document states that Ceph RBD is not RWX. To share data between pods running concurrently, CephFS needs to be used.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.