linsk shell to access the filesystem?
Is it possible to use linsk shell to access the Linux filesystem mounted via linsk? How?
Yes. Use linsk run --debug-shell.
Great, exactly what I needed! Thanks a lot @AlexSSD7 !
A follow-up question. Once in the shell, I installed vim via apk add vim, which worked well. But at the next use of linsk run --debug-shell ..., vim was not there anymore. Is apk add ... installation not persistent?
It is not. Every VM is created in an ad-hoc manner, being an inherent feature of Linsk. If you wish to add packages permanently, add desired package names to this line of code and rebuild the VM image.
Understood. Thanks.
Besides using linsk (which is great!), I am playing with qemu on macOS (silicon) trying to create a minimalistic linux vm with network support, hardware acceleration, etc. Alpine linux, or Debian, seem good candidates so, basically, it is akin to what you provide inside linsk - and possibly with persistence of the changes. I've read tutorials but they have heterogeneous/conflicting information and my experiments failed, so far. It would be great to have indications from you on how to proceed, given your expertise on the matter. Even more, I'd create a mini repo just for this, given the unclear information online - and I will when I'll succeed.
Take a look at vm/cfg.go#L59-L373. These are the helper functions that create QEMU flags for the Linsk VM. These are called in vm/vm.go#L107.
Also, as a tip for you, you can run a QEMU VM using a QEMU-based tool of choice and use ps aux | grep qemu-system to see what arguments the qemu-system command is called with, to use as a reference. QEMU man page can be very useful as well. It doesn't cover all flags and options; however, I would say that there is more than enough info for basic use.