# Dynatrace agent on WSL2

**URL:** <https://community.dynatrace.com/t/dynatrace-agent-on-wsl2/37408>\
**Category:** Open Q&A\
**Tags:** installation, oneagent\
**Created:** [November 22, 2022, 8:38am UTC](https://community.dynatrace.com/t/dynatrace-agent-on-wsl2/37408 "2022-11-22T08:38:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Stanley](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Stanley](https://community.dynatrace.com/u/Stanley)\
**Post date:** [November 22, 2022, 8:38am UTC](https://community.dynatrace.com/t/dynatrace-agent-on-wsl2/37408/1 "2022-11-22T08:38:27Z")

</div>

I am running the latest version of Ubuntu on WSL2 on Windows. I have a local copy of my client’s wordpress website and mysql database, with near identical nginx webserver and php.

I need to install OneAgent in order to unlock mySQL insights, nginx insights, wordpress page insights and so forth

There is much potential as Dynatrace outlines in [https://www.dynatrace.com/technologies/php-monitoring/wordpress](https://www.dynatrace.com/technologies/php-monitoring/wordpress)

When I install it on WSL Ubuntu, I get this error,

root@localhostname# cat /etc/os-release  
NAME=“Ubuntu”  
VERSION=“20.04.5 LTS (Focal Fossa)”  
ID=ubuntu  
ID\_LIKE=debian  
PRETTY\_NAME=“Ubuntu 20.04.5 LTS”  
VERSION\_ID=“20.04”  
VERSION\_CODENAME=focal  
UBUNTU\_CODENAME=focal  
root@localhostname# /bin/sh Dynatrace-OneAgent-Linux-1.253.245.sh --set-infra-only=false --set-app-log-content-access=true  
01:57:47 Checking root privileges…  
01:57:47 Process user: root, ID: 0  
01:57:47 OK  
01:57:47 Logging to /var/log/dynatrace/oneagent/installer/installation\_4818.log  
01:57:47 Installation started, version 1.253.245.20221118-071521, build date: 18.11.2022, PID 4818.  
01:57:47 Detected platform: LINUX arch: X86\_64  
01:57:47 Error: Dynatrace OneAgent cannot be installed inside a container (or in an isolated mount namespace), setup won’t continue.  
01:57:47 Error: For a supported way of deployment using a container please refer to: [Set up Dynatrace OneAgent as a Docker container — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/oneagent-docker)

Following the link above, one of the steps is to run apparmor, but when I do, I get this error

root@localhostname# apparmor\_parser -r /etc/apparmor.d/oneagent Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.) Warning: unable to find a suitable fs in /proc/mounts, is it mounted? Use --subdomainfs to override.

I need guidance here, this may be the first post on installing on wsl2 ubuntu. How can I get past this error or is there another way I get agent installed to grab full insights (mysql, wordpress, php, nginx)?

---

_[View the full topic](https://community.dynatrace.com/t/dynatrace-agent-on-wsl2/37408)._
