Add device cgroup rules
Add device cgroup rules
This commit is contained in:
commit
9dc85f0951
2 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,8 @@ services:
|
||||||
devices:
|
devices:
|
||||||
- /dev/kvm
|
- /dev/kvm
|
||||||
- /dev/vhost-net
|
- /dev/vhost-net
|
||||||
|
device_cgroup_rules:
|
||||||
|
- 'c *:* rwm'
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -163,6 +163,8 @@ docker run -it --rm -e "BOOT=http://www.example.com/image.iso" --device=/dev/kvm
|
||||||
- 'c *:* rwm'
|
- 'c *:* rwm'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Please note that even if you don't need DHCP, it's still recommended to enable this feature as it prevents NAT issues and increases performance by using a `macvtap` interface.
|
||||||
|
|
||||||
[build_url]: https://github.com/qemu-tools/qemu-docker/
|
[build_url]: https://github.com/qemu-tools/qemu-docker/
|
||||||
[ghcr_url]: https://github.com/orgs/qemu-tools/packages/container/package/qemu-docker
|
[ghcr_url]: https://github.com/orgs/qemu-tools/packages/container/package/qemu-docker
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue