afbjorklund / lima-gui Goto Github PK
View Code? Open in Web Editor NEWMaking a GUI for lima VM
Home Page: https://github.com/lima-vm/lima
License: BSD 3-Clause "New" or "Revised" License
Making a GUI for lima VM
Home Page: https://github.com/lima-vm/lima
License: BSD 3-Clause "New" or "Revised" License
Typically after adding or removing something, or otherwise modifying parameters. Think I commented something out...
Parse the systemd /etc/os-release
file for some interesting information.
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.14.3
PRETTY_NAME="Alpine Linux v3.14"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
BUILD_ID="v0.2.5"
VARIANT_ID="std"
NAME="Fedora Linux"
VERSION="35 (Cloud Edition)"
ID=fedora
VERSION_ID=35
VERSION_CODENAME=""
PLATFORM_ID="platform:f35"
PRETTY_NAME="Fedora Linux 35 (Cloud Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:35"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f35/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=35
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=35
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Cloud Edition"
VARIANT_ID=cloud
Maybe reuse the logos from the quick start ? (Should map with the "ID")
Currently there are just the low-level docs on https://github.com/lima-vm/lima/
brew install lima
It would be nice if there was a real user manual, preferrably written in markdown ?
Example: https://github.com/LibreSolar/md-manual-template (likely to be new git)
Some of the example files are using emojis, like "green circle":
# CPUs: if you see performance issues, try limiting cpus to 1.
# π’ Builtin default: 4
cpus: null
# Memory size
# π’ Builtin default: "4GiB"
memory: null
# Disk size
# π’ Builtin default: "100GiB"
disk: null
But these codepoints are not currently supported by the text editor:
See e.g. https://unicode.org/emoji/charts/full-emoji-list.html#1f7e2
There is support for this in https://github.com/raven-worx/qrwemoticons
See lima-vm/lima#190
Thanks a lot for working on this, but I'm not sure this project can be licensed under the terms of 3-clause BSDL, as it seems linked with qtermwidget
, which seems licensed under the terms of GPL2 https://github.com/lxqt/qtermwidget/tree/0.17.0#overview
It would be better if this git repository lived under https://github.com/lima-vm
For starting directly from an URL, similar to limactl start
Goes next to the Advanced... button (which opens editor)
Simple text dialog, for copy/paste of the URL to use.
Handle github.com addresses, replace with "Raw" YAML:
Input
https://github.com/lima-vm/lima/blob/master/examples/ubuntu.yaml
Download
https://raw.githubusercontent.com/lima-vm/lima/master/examples/ubuntu.yaml
Possibly add a "Edit YAML" button, for editing a temp file.
Use the "Edit YAML" as a workaround, for now. See "default.yaml" for options
https://github.com/lima-vm/lima/blob/master/pkg/limayaml/default.yaml
# Arch: "default", "x86_64", "aarch64".
# Default: "default" (corresponds to the host architecture)
arch: "default"
# CPUs: if you see performance issues, try limiting cpus to 1.
# Default: 4
cpus: 4
# Memory size
# Default: "4GiB"
memory: "4GiB"
# Disk size
# Default: "100GiB"
disk: "100GiB"
I built this on my mac. It seems to run ok, but doesn't show the existing lima vms I have already running.
I also tried to create a vm with it, and nothing happens.
Suggestion is to just use ssh
, and run some commands on VM...
top -b -n 1
vmstat 1 2
free -h
df -h /
Preferrably it should be done by QEMU/lima, if it is simple to do ?
Note that these "inside" values might not line up with the outside.
e.g. 4GiB memory set for VM, ends up being 3.8Gi total memory.
e.g. 100GiB disk set for VM, ends up being 97Gi disk size.
Could also show the disk usage of the lima instance directory,
or the cpu/memory usage of the qemu process (qemu.pid
) ?
Trying this out on my mac, I installed qt 6.2.0 ( brew install qt ) and got :
$ make
/Library/Developer/CommandLineTools/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++1z -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=11 -Wall -Wextra -fPIC -DQT_NO_TERMWIDGET -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -IQSourceHighlite -I/usr/local/lib/QtWidgets.framework/Headers -I/usr/local/lib/QtGui.framework/Headers -I/usr/local/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/share/qt/mkspecs/macx-clang -F/usr/local/lib -o main.o main.cpp
In file included from main.cpp:56:
./window.h:74:7: error: definition of type 'QStringList' conflicts with type alias of the same name
class QStringList;
^
/usr/local/lib/QtCore.framework/Headers/qcontainerfwd.h:64:7: note: 'QStringList' declared here
using QStringList = QList<QString>;
^
main.cpp:62:40: warning: 'AA_UseHighDpiPixmaps' is deprecated: High-DPI pixmaps are always enabled. This attribute no longer has any effect. [-Wdeprecated-declarations]
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
^
/usr/local/lib/QtCore.framework/Headers/qnamespace.h:462:30: note: 'AA_UseHighDpiPixmaps' has been explicitly marked deprecated here
AA_UseHighDpiPixmaps Q_DECL_ENUMERATOR_DEPRECATED_X(
^
/usr/local/lib/QtCore.framework/Headers/qcompilerdetection.h:1151:45: note: expanded from macro 'Q_DECL_ENUMERATOR_DEPRECATED_X'
# define Q_DECL_ENUMERATOR_DEPRECATED_X(x) Q_DECL_DEPRECATED_X(x)
^
/usr/local/lib/QtCore.framework/Headers/qcompilerdetection.h:1146:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
# define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
^
1 warning and 1 error generated.
make: *** [main.o] Error 1
video:
# QEMU display, e.g., "none", "cocoa", "sdl", "gtk", "vnc", "default".
# Choosing "none" will hide the video output, and not show any window.
# Choosing "vnc" will use a network server, and not show any window.
# Choosing "default" will pick the first available of: gtk, sdl, cocoa.
# As of QEMU v6.2, enabling anything but none or vnc is known to have negative impact
# on performance on macOS hosts: https://gitlab.com/qemu-project/qemu/-/issues/334
# π’ Builtin default: "none"
display: "vnc"
# VNC (Virtual Network Computing) is a platform-independent graphical
# desktop-sharing system that uses the Remote Frame Buffer protocol (RFB)
vnc:
# VNC display, e.g.,"to=L", "host:d", "unix:path", "none"
# By convention the TCP port is 5900+d, connections from any host.
# π’ Builtin default: "127.0.0.1:0,to=9"
display: null
INFO[0022] [hostagent] Starting QEMU (hint: to watch the boot progress, see "/home/anders/.lima/vnc/serial.log")
INFO[0022] [hostagent] VNC server running at 127.0.0.1:0 <vnc://127.0.0.1:5900>
INFO[0022] [hostagent] VNC Display: `/home/anders/.lima/vnc/vncdisplay`
INFO[0022] [hostagent] VNC Password: `/home/anders/.lima/vnc/vncpassword`
https://doc.qt.io/qt-5/qsettings.html
https://doc.qt.io/qt-5/qdialog.html
Fiellds such as:
limactl
(default value: "limactl")
Relative values are searched in PATH.
LIMA_HOME
(default value: ~/.lima
)
Remember to expand any ~
to $HOME.
Maybe others, too ?
TERMINAL
It would be nice to at least be able to display the running containers and stored images...
nerdctl.lima container list
- https://github.com/afbjorklund/lima-gui/wiki/Containers
nerdctl.lima image list
- https://github.com/afbjorklund/lima-gui/wiki/Images
Start with nerdctl
(containerd), but should be simple to add docker and podman support:
docker.lima
podman.lima
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.