dockerc icon indicating copy to clipboard operation
dockerc copied to clipboard

Windows support

Open zsf513 opened this issue 1 year ago • 11 comments
trafficstars

Is there a plan to support windows? About what time?

zsf513 avatar May 07 '24 08:05 zsf513

There is. I have not found time to work on it recently.

NilsIrl avatar May 19 '24 10:05 NilsIrl

what?

Tinywan avatar May 23 '24 01:05 Tinywan

@NilsIrl have you considered looking into @.jart's Cosmopolitan libc project, which allows for compiling a binary which functions across Linux and Windows platforms, as part of making this single-executable scheme work for Windows? https://github.com/jart/cosmopolitan

jwoglom avatar Aug 06 '24 16:08 jwoglom

@jwoglom I have looked at Cosmopolitan libc. It would not be suitable for dockerc, at least not for the docker runtime. To make it work on windows would involve starting a small linux kernel and then run the conatiner inside of it.

NilsIrl avatar Aug 06 '24 16:08 NilsIrl

Could it work with Windows docker images?

J0s3f avatar Aug 06 '24 23:08 J0s3f

Could it work with Windows docker images?

Maybe, but that is not what I currently envision

NilsIrl avatar Aug 06 '24 23:08 NilsIrl

what needs to happen to do this? I am looking for mac and win support.

tluyben avatar Oct 24 '24 13:10 tluyben

The main issue right now is that I don't want to have to allocate memory upfront for the VM so we'll need dynamic memory allocation. Unfortunately QEMU does not support this as far as I can tell and I haven't found anything that does.

It is possible, orbstack does it: https://orbstack.dev/blog/dynamic-memory

NilsIrl avatar Nov 29 '24 08:11 NilsIrl

This is called memory ballooning.

Some links (for future reference, I have not looked at them in incredibly careful detail):

  • https://www.reddit.com/r/linuxquestions/comments/i7zn7d/does_kvmqemu_support_releasing_unused_guest/
  • https://pmhahn.github.io/virtio-balloon/
  • https://www.qemu.org/docs/master/interop/virtio-balloon-stats.html
  • https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/virtualization_administration_guide/section-libvirt-dom-xml-memory-baloon-device
  • https://kvm-forum.qemu.org/2020/KVM%20Forum%202020%20Virtio-%28balloon%20pmem%20mem%29%20Managing%20Guest%20Memory.pdf
  • https://github.com/firecracker-microvm/firecracker/blob/main/docs/ballooning.md
  • https://news.ycombinator.com/item?id=33954348 (This comment claims the virtio balloon is intended for "near OOM conditions" so we should double check that it fits our use case)
  • https://virtio-mem.gitlab.io/

NilsIrl avatar Nov 29 '24 08:11 NilsIrl

Also contrary to what I was previously thinking we might want to use libvirt instead of QEMU. My understanding is that libvirt is a wrapper around QEMU (among others) and provides a better API.

Also it seems like it's at this layer that where we'll have the best control over memory allocation: https://libvirt.org/kbase/memorydevices.html

NilsIrl avatar Nov 29 '24 09:11 NilsIrl

Is this feature in development in any branch?

albertodlc avatar Dec 19 '24 11:12 albertodlc