---
title: Enabling the HostPath Mapper 
sidebar_label: HostPath Mapper
---

Vcluster internal logging relies on a separate component called the [Hostpath Mapper](https://github.com/loft-sh/vcluster-hostpath-mapper). This will make sure to resolve the correct virtual pod and container names to their physical counterparts.
To deploy this component, its basically a 2 step process
### Update the vCluster
You would want to create the vCluster with the following `values.yaml`:
```
syncer:
  extraArgs:
    - --mount-physical-host-paths=true
```

* For new vCluster run `vcluster create <vcluster_name> -f values.yaml`
* For existing vCluster run `vcluster create --upgrade <vcluster_name> -f values.yaml`

### Deploy the Hostpath Mapper Daemonset
Now that the vCluster itself is ready, we can deploy the hostpath mapper component. We need the following 2 pieces of information for this:
* The Hostpath Mapper has to be deployed in the same namespace and the target vCluster
* We need to set the `.Values.VclusterReleaseName` value when deploying this helm chart equal to the name of the target vCluster

To sum up, if your vCluster is named `my-vcluster` and is deployed in namespace `my-namespace` then you should run
```
helm install vcluster-hostpath-mapper vcluster-hpm \
    --repo https://charts.loft.sh \
    -n my-namespace \
    --set VclusterReleaseName=my-vcluster
```

Once deployed successfully a new Daemonset component of vCluster would start running on every node used by the vCluster workloads.

We can now install our desired logging stack and start collecting the logs.
