Skip to content

Commit

Permalink
doc: add a note about running virtme-ng inside docker
Browse files Browse the repository at this point in the history
Add an example on how to use virtme-ng inside a docker container with an
ubuntu-22.04 image.

Moreover, add a note to the troubleshooting section, mentioning about
the udev requirement to properly support stdin/stdout/stderr
redirection with virtme-ng instances running inside docker.

This fixes issue #51.

Signed-off-by: Andrea Righi <[email protected]>
  • Loading branch information
Andrea Righi committed Dec 21, 2023
1 parent 3ff20c5 commit bb13dfd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,23 @@ Examples
(virtme-ng is started in graphical mode)
```

- Run virtme-ng inside a docker container (using virtme-ng directly from the
source repository):
```
$ docker run -it ubuntu:22.04 /bin/bash
# apt update
# echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# apt install --yes git qemu-kvm udev iproute2 busybox-static \
coreutils python3-requests libvirt-clients kbd kmod file rsync zstd udev
# cd ~
# git clone --recursive https://github.com/arighi/virtme-ng.git
# apt download linux-image-unsigned-6.5.0-14-generic # replace this with any other kernel
# apt download linux-modules-6.5.0-14-generic # replace this with any other kernel
# for f in *.deb; do dpkg -x $f .; done
# ./virtme-ng/vng -r boot/vmlinuz-6.5.0-14-generic -- uname -r
6.5.0-14-generic
```

Implementation details
======================

Expand Down Expand Up @@ -343,6 +360,14 @@ command when running make.
Troubleshooting
===============

- Running virtme-ng instances inside docker: in case of failures/issues,
especially with stdin/stdout/stderr redirections, make sure that you have
`udev` installed in your docker image and run the following command before
using `vng`:
```
$ udevadm trigger --subsystem-match --action=change
```

- If you get permission denied when starting qemu, make sure that your
username is assigned to the group `kvm` or `libvirt`:
```
Expand Down

0 comments on commit bb13dfd

Please sign in to comment.