# Increase RAM And CPU On Vagrant Machine

We can define RAM and CPU in Vagrantfile.

## Step 1: Edit Vagrantfile

Open and edit `Vagrantfile` to configure RAM and CPU on Vagrant as below -

### For VirtualBox VM

```
config.vm.provider "virtualbox" do |v|
    v.memory = 2048
    v.cpus = 2
end
```

### For Libvirt VM

```
config.vm.provider "libvirt" do |v|
    v.memory = 2048
    v.cpus = 2
end
```

## Step 2: Start/Reload Vagrant Machine

Start the Vagrant Machine with -

```bash
vagrant start
```

Reload the Vagrant Machine -

```bash
vagrant reload
```

RAM and CPU should be configured, we can confirm with `free -m` and `nproc` command by running in Vagrant Machine.

***Source:*** [***OSTechnix***](https://ostechnix.com/how-to-increase-memory-and-cpu-on-vagrant-machine/)


---

# 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://til.devjugal.com/vagrant/increase-ram-and-cpu-on-vagrant-machine.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.
