summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibexec/container/create-qemu2
-rwxr-xr-xshare/build-scripts/qemu1
-rw-r--r--share/config/vm.conf.in39
3 files changed, 41 insertions, 1 deletions
diff --git a/libexec/container/create-qemu b/libexec/container/create-qemu
index 8abd861..d56ac89 100755
--- a/libexec/container/create-qemu
+++ b/libexec/container/create-qemu
@@ -161,7 +161,7 @@ fi
case "${CONFIG_TEMPLATE}" in
'')
- CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/container.conf.in"
+ CONFIG_TEMPLATE="/usr/share/${SOFTWARE}/config/vm.conf.in"
;;
esac
diff --git a/share/build-scripts/qemu b/share/build-scripts/qemu
index 6fd8248..ebffa1f 100755
--- a/share/build-scripts/qemu
+++ b/share/build-scripts/qemu
@@ -961,6 +961,7 @@ Commands ()
-e "s|^bind=.*|bind=${BIND}|g" \
-e "s|^bind-ro=.*|bind-ro=${BIND_RO}|g" \
-e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eno1|g" \
+ -e "s|@PRIMARY_TAP@|${HOST_INTERFACE_NAME}|g" \
"${CONFIG}/${NAME}.conf"
if [ "${NETWORK_NUMBER}" -ge 2 ]
diff --git a/share/config/vm.conf.in b/share/config/vm.conf.in
new file mode 100644
index 0000000..688fb97
--- /dev/null
+++ b/share/config/vm.conf.in
@@ -0,0 +1,39 @@
+# compute-tools: @NAME@
+
+[start]
+cnt.auto=false
+cnt.container-server=
+# FIXME bridge
+cnt.network-bridge=tap-@SHORTNAME@-ma1:bridge-oob
+cnt.overlay=
+cnt.overlay-options=
+bind=
+bind-ro=
+boot=yes
+capability=
+directory=/var/lib/machines/@NAME@
+drop-capability=
+link-journal=no
+machine=@NAME@
+private-users=no
+register=yes
+
+[vm]
+memory=4G
+bios=/usr/share/OVMF/OVMF_CODE.fd
+serial=mon:telnet::@PORT@,server,nowait
+raw-options=-cpu host -smp cores=8,threads=2
+# FIXME: absolut path
+drive=format=raw,file=/var/lib/machines/@NAME@.img,if=ide,index=0
+vm.netdev=tap,id=eno1,ifname=@PRIMARY_TAP@,script=no,downscript=no -device virtio-net-pci,netdev=eno1,addr=1
+#vm.netdev=user,id=slirp -device virtio-net-pci,netdev=slirp,addr=7
+
+[limit]
+BlockIODeviceWeight=
+BlockIOReadBandwidth=
+BlockIOWeight=
+BlockIOWriteBandwidth=
+CPUQuota=
+CPUShares=
+MemoryLimit=
+TasksMax=