diff --git a/aihelper/Makefile b/aihelper/Makefile deleted file mode 100644 index 5c3637786..000000000 --- a/aihelper/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# Copyright (C) 2020 jjm2473@gmail.com -# -# This is free software, licensed under the GNU General Public License v3. -# - -include $(TOPDIR)/rules.mk - -PKG_ARCH_aihelper:=$(ARCH) - -PKG_NAME:=aihelper -PKG_VERSION:=0.0.1 -PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/Carseason/openwrt-packages/releases/download/prebuilt/ -PKG_HASH:=skip -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=System - SUBMENU:= - TITLE:=AiHelper - URL:=https://github.com/Carseason/openwrt-packages -endef - -define Package/$(PKG_NAME)/description - AiHelper is a dashboard & user guide -endef - -define Package/$(PKG_NAME)/conffiles -/etc/config/aihelper -endef - -define Package/$(PKG_NAME)/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - if [ -f /etc/uci-defaults/09-aihelper ]; then - chmod 755 /etc/uci-defaults/09-aihelper - /etc/uci-defaults/09-aihelper && rm -f /etc/uci-defaults/09-aihelper - fi -fi -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/etc/config - $(INSTALL_BIN) $(PKG_BUILD_DIR)/aihelper.$(PKG_ARCH_aihelper) $(1)/usr/sbin/aihelper - $(INSTALL_BIN) ./files/aihelper.init $(1)/etc/init.d/aihelper - $(INSTALL_BIN) ./files/aihelper.uci-default $(1)/etc/uci-defaults/09-aihelper - $(INSTALL_CONF) ./files/aihelper.config $(1)/etc/config/aihelper -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/aihelper/files/aihelper.config b/aihelper/files/aihelper.config deleted file mode 100644 index 339e93e73..000000000 --- a/aihelper/files/aihelper.config +++ /dev/null @@ -1,2 +0,0 @@ -config aihelper - option 'enabled' '1' \ No newline at end of file diff --git a/aihelper/files/aihelper.init b/aihelper/files/aihelper.init deleted file mode 100755 index dd586c1ab..000000000 --- a/aihelper/files/aihelper.init +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=93 -USE_PROCD=1 - -get_config() { - config_get_bool enabled $1 enabled 1 -} -aihelper_prepare() { - killall aihelper 2>/dev/null -} - -start_service() { - config_load aihelper - config_foreach get_config aihelper - [ $enabled != 1 ] && return 1 - procd_open_instance - procd_set_param command /usr/sbin/aihelper - procd_set_param stderr 1 - procd_set_param respawn - procd_close_instance -} - -stop_service() { - aihelper_prepare -} -reload_service() { - restart -} - -service_triggers() { - procd_add_reload_trigger "aihelper" -} diff --git a/aihelper/files/aihelper.uci-default b/aihelper/files/aihelper.uci-default deleted file mode 100644 index 6ca98828a..000000000 --- a/aihelper/files/aihelper.uci-default +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - - -/etc/init.d/aihelper enable -/etc/init.d/aihelper start - -exit 0 diff --git a/dae/Makefile b/dae/Makefile index de1e9ad8e..56f665cc7 100644 --- a/dae/Makefile +++ b/dae/Makefile @@ -5,10 +5,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dae -PKG_VERSION:=2026.07.28 -PKG_RELEASE:=24 +PKG_VERSION:=2026.07.30 +PKG_RELEASE:=25 -PKG_SOURCE:=dae-src-2026.07.28-4cea31acd905.tar.gz +PKG_SOURCE:=dae-src-2026.07.30-305922fc343d.tar.gz PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-daede/releases/download/dae-src PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_HASH:=skip diff --git a/daed/Makefile b/daed/Makefile index e1c7ca5db..80abeb8a3 100644 --- a/daed/Makefile +++ b/daed/Makefile @@ -5,10 +5,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=daed -PKG_VERSION:=2026.07.28 -PKG_RELEASE:=32 +PKG_VERSION:=2026.07.30 +PKG_RELEASE:=33 -PKG_SOURCE:=daed-src-2026.07.28-e4aa232d2993.tar.gz +PKG_SOURCE:=daed-src-2026.07.30-6066c5d691b3.tar.gz PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-daede/releases/download/daed-src PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_HASH:=skip diff --git a/ghttpd/Makefile b/ghttpd/Makefile index 08e3ad0e5..fa95d4ba6 100644 --- a/ghttpd/Makefile +++ b/ghttpd/Makefile @@ -11,7 +11,7 @@ PKG_ARCH_ghttpd:=$(ARCH) PKG_NAME:=ghttpd PKG_VERSION:=0.0.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Carseason/openwrt-packages/releases/download/prebuilt/ PKG_HASH:=skip diff --git a/ghttpd/files/ghttpd.config b/ghttpd/files/ghttpd.config index d3553c54f..dcf7e3594 100644 --- a/ghttpd/files/ghttpd.config +++ b/ghttpd/files/ghttpd.config @@ -1,3 +1,3 @@ config ghttpd - option 'enabled' '0' - option port '8333' + option 'enabled' '1' + option port '80' diff --git a/ghttpd/files/ghttpd.init b/ghttpd/files/ghttpd.init index cf263c400..d2a041742 100755 --- a/ghttpd/files/ghttpd.init +++ b/ghttpd/files/ghttpd.init @@ -4,14 +4,23 @@ START=93 USE_PROCD=1 get_config() { - config_get enabled $1 enabled "0" - config_get port $1 port "8333" + config_get enabled $1 enabled "1" + config_get port $1 port "80" +} + +stop_default_httpd_services() { + [ "$port" = "80" ] || return 0 + + for service in uhttpd nginx; do + [ -x "/etc/init.d/$service" ] && "/etc/init.d/$service" stop >/dev/null 2>&1 + done } start_service() { config_load ghttpd config_foreach get_config ghttpd - [ $enabled != 1 ] && return 1 + [ "$enabled" != 1 ] && return 1 + stop_default_httpd_services procd_open_instance procd_set_param command /usr/sbin/ghttpd openwrt if [ -n "$port" ]; then @@ -24,4 +33,4 @@ start_service() { service_triggers() { procd_add_reload_trigger "ghttpd" -} \ No newline at end of file +} diff --git a/ghttpd/files/ghttpd.uci-default b/ghttpd/files/ghttpd.uci-default index 61076f6bb..335e39c5d 100644 --- a/ghttpd/files/ghttpd.uci-default +++ b/ghttpd/files/ghttpd.uci-default @@ -1,5 +1,19 @@ #!/bin/sh +[ ! -f "/usr/share/ucitrack/luci-app-ghttpd.json" ] && { + cat > /usr/share/ucitrack/luci-app-ghttpd.json << EEOF +{ + "config": "ghttpd", + "init": "ghttpd" +} +EEOF +} +uci -q batch <<-EOF >/dev/null + delete ucitrack.@ghttpd[-1] + add ucitrack ghttpd + set ucitrack.@ghttpd[-1].init=ghttpd + commit ucitrack +EOF /etc/init.d/ghttpd enable /etc/init.d/ghttpd start diff --git a/luci-app-aihelper/Makefile b/luci-app-aihelper/Makefile deleted file mode 100755 index 949b7b43c..000000000 --- a/luci-app-aihelper/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (C) 2008-2014 The LuCI Team -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -LUCI_TITLE:=aihelper -PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 -LUCI_DEPENDS:=+aihelper +opencode -LUCI_MINIFY_CSS:=0 -LUCI_MINIFY_JS:=0 - -define Package/luci-app-aihelper/conffiles -/etc/config/aihelper -endef - -define Package/luci-nginxer/postrm -#!/bin/sh -rm -f /tmp/luci-indexcache -exit 0 -endef - -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature \ No newline at end of file diff --git a/luci-app-aihelper/luasrc/controller/aihelper.lua b/luci-app-aihelper/luasrc/controller/aihelper.lua deleted file mode 100644 index 477faa5c4..000000000 --- a/luci-app-aihelper/luasrc/controller/aihelper.lua +++ /dev/null @@ -1,25 +0,0 @@ -local http = require "luci.http" - -module("luci.controller.aihelper", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/aihelper") then - return - end - local page - page = entry({"admin", "services","aihelper"}, cbi("aihelper"), _("AiHelper"), 100) - page.dependent = true - entry({"admin", "services", "aihelper_status"}, call("aihelper_status")) - -end - -function aihelper_status() - local sys = require "luci.sys" - local uci = require "luci.model.uci".cursor() - local status = { - running = (sys.call("pidof aihelper >/dev/null") == 0), - port = 9310 - } - luci.http.prepare_content("application/json") - luci.http.write_json(status) -end diff --git a/luci-app-aihelper/luasrc/model/cbi/aihelper.lua b/luci-app-aihelper/luasrc/model/cbi/aihelper.lua deleted file mode 100644 index deb6f11de..000000000 --- a/luci-app-aihelper/luasrc/model/cbi/aihelper.lua +++ /dev/null @@ -1,13 +0,0 @@ -local m, s - -m = Map("aihelper", translate("AiHelper"), translate("AiHelper is an efficient data transfer tool.")) -m:section(SimpleSection).template = "aihelper/aihelper_status" - -s=m:section(TypedSection, "aihelper", translate("Global settings")) -s.addremove=false -s.anonymous=true - -s:option(Flag, "enabled", translate("Enable")).rmempty=false -return m - - diff --git a/luci-app-aihelper/luasrc/view/aihelper/aihelper_status.htm b/luci-app-aihelper/luasrc/view/aihelper/aihelper_status.htm deleted file mode 100644 index 9f3fe7234..000000000 --- a/luci-app-aihelper/luasrc/view/aihelper/aihelper_status.htm +++ /dev/null @@ -1,22 +0,0 @@ - - -
- 状态 -

- <%:Collecting data...%> -

-
- diff --git a/luci-app-ghttpd/Makefile b/luci-app-ghttpd/Makefile index e97c1bf9f..d454b4542 100644 --- a/luci-app-ghttpd/Makefile +++ b/luci-app-ghttpd/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_VERSION:=0.0.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 LUCI_TITLE:=LuCI support for ghttpd LUCI_PKGARCH:=all diff --git a/luci-app-ghttpd/luasrc/model/cbi/ghttpd.lua b/luci-app-ghttpd/luasrc/model/cbi/ghttpd.lua index 3a9d0868d..44703bd76 100644 --- a/luci-app-ghttpd/luasrc/model/cbi/ghttpd.lua +++ b/luci-app-ghttpd/luasrc/model/cbi/ghttpd.lua @@ -9,13 +9,12 @@ s.anonymous=true e = s:option(Flag, "enabled", translate("Enable")) e.rmempty=false +e.default="1" o = s:option(Value, "port", translate("HTTP Port").."*") o.rmempty = false -o.default = "8990" +o.default = "80" o.datatype = "port" return m - - diff --git a/luci-app-ghttpd/luasrc/view/ghttpd/status.htm b/luci-app-ghttpd/luasrc/view/ghttpd/status.htm index c58a5823a..6d640ac17 100644 --- a/luci-app-ghttpd/luasrc/view/ghttpd/status.htm +++ b/luci-app-ghttpd/luasrc/view/ghttpd/status.htm @@ -3,7 +3,7 @@ local util = require "luci.util" local sys = require "luci.sys" local uci = require "luci.model.uci".cursor() local running = (sys.call("pidof ghttpd >/dev/null") == 0) -local port = uci:get("ghttpd", "config", "port") or "8333" +local port = uci:get_first("ghttpd", "ghttpd", "port") or "80" -%>
@@ -23,4 +23,4 @@ local port = uci:get("ghttpd", "config", "port") or "8333"
-<% end %> \ No newline at end of file +<% end %> diff --git a/luci-app-qemu-vms/Makefile b/luci-app-qemu-vms/Makefile index 664de946b..84e78d698 100644 --- a/luci-app-qemu-vms/Makefile +++ b/luci-app-qemu-vms/Makefile @@ -4,7 +4,7 @@ LUCI_TITLE:=Web UI for QEMU Virtual Machine Simple (VMS) LUCI_DEPENDS:=@TARGET_x86_64 +qemu-vms +ttyd +usbutils +pciutils PKG_LICENSE:=GPLv3 PKG_VERSION:=0.0.1 -PKG_RELEASE:=7 +PKG_RELEASE:=8 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-app-qemu-vms/README.md b/luci-app-qemu-vms/README.md new file mode 100644 index 000000000..f4a89430b --- /dev/null +++ b/luci-app-qemu-vms/README.md @@ -0,0 +1,118 @@ +# luci-app-qemu-vms + +Web UI for **QEMU Virtual Machines Simple (VMS)** — a lightweight OpenWrt package +for running and managing QEMU virtual machines from LuCI, aimed at x86_64 +routers/gateways with enough RAM and a spare CPU to spare on a VM or two. + +This app is the LuCI frontend for the [`qemu-vms`](../../../packages/utils/qemu-vms) +backend package (init script + UCI config). It does not work standalone — +`qemu-vms` must be installed as well (it is pulled in automatically as a +dependency). + +## Requirements + +- **x86_64 target only.** The backend unconditionally starts guests with + `-enable-kvm`, and KVM acceleration only works when the guest architecture + matches the host's — there is no cross-architecture KVM. Both packages are + gated to `TARGET_x86_64` in their Makefiles and won't even appear in + `menuconfig` on other targets. +- Hardware virtualization (VT-x/AMD-V) enabled in the host BIOS, `/dev/kvm` + present. +- For PCI passthrough: IOMMU enabled in BIOS **and** on the kernel command + line (`intel_iommu=on` / `amd_iommu=on`, plus `iommu=pt` recommended). +- Dependencies (pulled in automatically): `qemu-x86_64-softmmu`, + `qemu-bridge-helper`, `minicom`, `socat`, `ttyd`, `usbutils`, `pciutils`. + +## What it does + +### Status tab +- Add / edit / delete VMs through a form (memory, vCPUs, CPU model, machine + chipset, disk image, disk bus, optional CD-ROM, custom raw QEMU + arguments, console type). +- Start / Stop / Restart individual VMs without touching the shell. +- Live status: running/stopped, PID, host-side RAM usage (RSS), disk image + size — polled every few seconds. +- **Console**: opens an in-browser terminal (via `ttyd`, spawned on demand + on an ephemeral port) attached to the VM's serial console. +- **VNC**: for VMs configured with a graphical display, opens an embedded + [noVNC](https://github.com/novnc/noVNC) viewer over the VM's websocket + port. +- **Log**: shows the VM's *host-side lifecycle log* + (`/var/log/qemu-vms/.log`) — start attempts, passthrough bind + results, configuration warnings, and QEMU's own stderr (KVM errors, + missing image, etc.). This is deliberately separate from the guest's own + serial console output, and is available even for VNC-mode VMs that have + no serial console at all. + +### Networks tab +Define reusable virtual network interfaces (`tap`), independent of any +one VM — the same interface definition can be attached to multiple VMs. +Each interface has: +- an optional **MAC address** (leave blank to auto-generate one with the + `52:54:00:31:xx:xx` prefix on save), +- a **tap interface name**, +- an optional **bridge** to enslave the tap into (brought up by + `/etc/qemu-ifup` at VM start — if no bridge is set, the interface is + just brought up standalone), +- an emulated **network card model** (defaults to `virtio-net-pci`). + +### Hardware passthrough tab +Two tables — PCI devices and USB devices — scanned live from the host +(via `lspci`/`lsusb`, falling back to raw `/sys` parsing if those tools +aren't installed). + +- **Create passthrough**: creates a named `pci-passthrough` / + `usb-passthrough` UCI section for the device (you choose the section + name), which VMs can then reference. For PCI, this unbinds the device + (and everything else sharing its IOMMU group) from its current driver + and binds it to `vfio-pci`; for USB, the device is unbound from its + kernel driver so QEMU can access it directly. +- **Remove passthrough**: only available once the device isn't attached + to any VM. Removes the UCI section. +- The **original driver** each device was using is recorded before it's + ever touched, so it can be restored later — see *Detaching hardware* + below. + +Devices are matched by **PCI address** (`pci_id`, e.g. `04:00.0`) for PCI, +and by **vendor:product ID** for USB (not bus/device number, which isn't +stable across reconnects/reboots — note this means two USB devices sharing +the same VID:PID can't currently be told apart). + +### ToDO +##### Detaching hardware from a VM back to the host + + +Removing a passthrough section from LuCI only removes the *configuration* +— it does not by itself unbind the device back to its original driver. +To do that, run on the router: + +```sh +/etc/init.d/qemu-vms release_pci_passthrough +/etc/init.d/qemu-vms release_usb_passthrough +``` + +This rebinds the device (and, for PCI, every device sharing its IOMMU +group) to whatever driver it was using before `qemu-vms` first touched it. + +## Notes and caveats + +- **Changing `disk_bus` on an existing VM does not convert the disk + image.** A guest installed under `virtio` generally won't boot under + `ide`/`sata` without the right drivers already present (or vice versa); + this option is for new installs or guests that never had virtio support + to begin with (e.g. older Windows). +- **Custom QEMU arguments** (`custom_arg`) are appended to the command + line as literal argv entries, not re-parsed by a shell — this is + intentional: it lets you pass arbitrary flags without risking shell + metacharacters in that field being interpreted as commands. +- **ttyd and VNC websocket ports must be reachable from your browser**, + same as any other port opened directly on the router — if you're behind + a firewall/NAT/reverse-proxy that only forwards 80/443, plan + accordingly. +- Saving VM/network/passthrough settings writes to UCI immediately but + does **not** automatically restart the affected VM — you need to + explicitly Restart it from the Status tab for changes to take effect. + +## License + +GPL-3.0 diff --git a/natflow/Makefile b/natflow/Makefile index 66f2e6290..103f33513 100644 --- a/natflow/Makefile +++ b/natflow/Makefile @@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=natflow PKG_VERSION:=20260531 -PKG_RELEASE:=53 +PKG_RELEASE:=54 PKG_SOURCE:=$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/ptpt52/natflow.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=e155710bcb0afec0af934c18151ac8c3b4f315aa +PKG_SOURCE_VERSION:=b1146ca568ef0709ad1d8dacbb17d03b5c53985d PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Chen Minqiang PKG_LICENSE:=GPL-2.0 diff --git a/opencode/Makefile b/opencode/Makefile deleted file mode 100644 index f68899c7f..000000000 --- a/opencode/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# Copyright (C) 2020 jjm2473@gmail.com -# -# This is free software, licensed under the GNU General Public License v3. -# - -include $(TOPDIR)/rules.mk - -PKG_ARCH_opencode:=$(ARCH) - -PKG_NAME:=opencode -PKG_VERSION:=1.0.119 -PKG_RELEASE:=1 -PKG_SOURCE:=opencode-binary-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/Carseason/openwrt-packages/releases/download/prebuilt/ -PKG_HASH:=skip -PKG_BUILD_DIR:=$(BUILD_DIR)/opencode-binary-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -RSTRIP:=: -STRIP:=: - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=System - SUBMENU:= - TITLE:=OpenCode - DEPENDS:=+libstdcpp - URL:=https://github.com/Carseason/openwrt-packages -endef - -define Package/$(PKG_NAME)/description - OpenCode -endef - -define Package/$(PKG_NAME)/postinst -endef - -define Build/Configure -endef - -define Build/Compile - $(STAGING_DIR_HOST)/bin/patchelf --remove-needed libc.musl-x86_64.so.1 --remove-needed libc.musl-aarch64.so.1 $(PKG_BUILD_DIR)/opencode.$(PKG_ARCH_opencode) -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/opencode.$(PKG_ARCH_opencode) $(1)/usr/sbin/opencode -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/qemu-vms/Makefile b/qemu-vms/Makefile index 92795cb78..5529ffc2d 100644 --- a/qemu-vms/Makefile +++ b/qemu-vms/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qemu-vms PKG_VERSION:=0.0.1 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_MAINTAINER:=Konstantine Shevlakov include $(INCLUDE_DIR)/package.mk diff --git a/qemu-vms/README.md b/qemu-vms/README.md new file mode 100644 index 000000000..26ca71631 --- /dev/null +++ b/qemu-vms/README.md @@ -0,0 +1,100 @@ +## QEMU-VMS + + +### VMS - Virtual Machine Simple +Simple manager qemu virtual machines + +# + +### UCI configuration + +All setting stored in `/etc/config/qemu-vms` +# +#### `config vm` — virtual machine instanse +|Option | Type | Desc | Default| +|-------|------|------|--------| +|`enabled`| boolean | Enable start | `0` | +|`image`| string | Image Disk path | – | +|`cdrom`| string | ISO-image path | – | +|`memory`| integer | RAM Size in MB | `128` | +|`smp`| integer| vCPU's| `1`| +|`cpu`*| string| CPU model |host| +|`machine`* | string| Chipset machine type| q35 +|`disk_bus`| string| Disk Bus |virtio +|`display_type`| string| Console type |serial +|`vnc_port`| integer |VNC-port if `display_type=vnc` | – +|`pci_passthrough`| list| list pci devices passthrough| –| +|`usb_passthrough`| list| list usb devices passthrough| –| +|`network`| list| attached virtual network adapters | - | +|`custom_arg`| list| Addional QEMU cmd args | –| + +##### Example +```uci +config vm 'router' + option enabled '1' + option image '/path/to/disk.img' + option memory '512' + option smp '2' + option cpu 'host' + option machine 'q35' + option disk_bus 'virtio' + option display_type 'serial' + list network 'example_lan' + list pci_passthrough 'pci_example' + list usb_passthrough 'usb_example' + list custom_arg '-drive if=floppy,file=/mnt/disk/vm/floppy_xp.img,format=raw' + ``` + # +#### `config network` — virtual machine network adapters +|Option | Type | Desc | Default| +|----------|-------|-------|------| +|`mac`|string|adapter mac-address| - | +|`bridge`|string|assign to bridge name|-| +|`ifname`**|string|iface name in host|-| +|`driver`|string|guest network adapter driver |vfio-net-pci + +##### Example +```uci +config network 'example_lan' + option iface 'tap0' + option bridge 'br-vm' + option driver 'pcnet' +``` +# + +#### `config pci_passthrough` — Passthrough PCI devices +|Option | Type | Desc | +|----------|-------|-------| +|`pci_id`**|string|device BDF-addres| +|`vendor_id`|string|Vendor:Device ID| + +##### Example + +```uci +config pci-passthrough 'pci_example' + option pci_id '03:00.0' + option vendor_id '8086 15f3' + ``` +# + + #### `config usb_passthrough` — Passthrough USB devices + +|Option | Type | Desc | +|----------|-------|-------| +|`product_id`**|string|Product device ID| +|`vendor_id`**|string|Vendor Device ID| + +##### Example + +```uci +config usb_passthrough 'usb_example' + option vendor_id '0bda' + option product_id 'c811' + ``` +# +\* \- See help qemu for list all values +\**- Mandatory options +# + +### Usage init.d +* /etc/init.d/qemu-vms start|stop|restart [vm_instance]