# Cheat Sheet

## Fix clipboard

Check your VirtualBox version.

Go to <https://download.virtualbox.org/virtualbox>

Open your Virtualbox version.

Download **Oracle\_VM\_VirtualBox\_Extension\_Pack.vbox-extpack**.

Open Virtualbox VM Manager, go to File -> Preferences, Select Extension.

Now add extension by browsing to download location.

## SSH to NAT guest

Open the VM **Settings**, go to **Network**.

In your **adapter tab**, click on **Advanced**. Then click on **Port Forwarding**.

Add a rule as follows:

| Name | Protocol | Host IP        | Host Port | Guest IP       | Guest Port |
| ---- | -------- | -------------- | --------- | -------------- | ---------- |
| SSH  | TCP      | \<leave empty> | 2222      | \<leave empty> | 22         |

Now from you host run:

```bash
ssh 127.0.0.1 -p 2222
```

### References

<https://apple.stackexchange.com/questions/235518/ssh-to-virtualbox-mac-host-linux-guest-using-nat>

## Shared Folder

Install Guest Additions.

Install Extension Pack.

In your guest, create a folder to be used to mount the shared folder.

```bash
sudo mkdir /windows
sudo chown $USER:$USER /windows
```

Power off the VM.

Open your VM settings and add a shared folder.

![](/files/-M8G5_YVD-QgPU1JH7sC)

Turn on your VM.

Test mounting your folder.

```bash
sudo mount -t vboxsf -o uid=$UID,gid=$UID windows /windows
```

Setup fstab.

```bash
echo "windows		/windows	vboxsf	uid=$UID,gid=$UID	0	0" >> /etc/fstab
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.devops.buzz/public/virtualbox/cheat-sheet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
