# reboot

The cldkctl vm reboot command restarts a virtual machine (VM) by specifying its name. This command performs a graceful reboot, shutting down and restarting the VM while preserving its current configuration and resources. Ensure that you have the appropriate permissions and that the VM is currently in a Running state before performing this operation. If the VM is not running, the command will fail with an error message indicating that the VM cannot be rebooted.

## Usage

```
cldkctl vm reboot [name] [flags]
```

## Aliases

```
reboot, restart
```

## Steps

Follow the steps below to run and view the result of this command:

1. Run the following command in your terminal and replace \<vm\_name> with your virtual machine name.

```
./cldkctl vm reboot <vm_name>
```

2. Ensure that the virtual machine is currently Running before executing the command.
3. The system performs a graceful reboot, stopping and restarting the VM while keeping its configuration intact.
4. If the reboot is successful, a confirmation message “Virtual Machine rebooted” will appear in the terminal.
5. If the VM is not running, an error message similar to the following will appear:

```
✘ Error: failed to reboot virtual machine: Operation cannot be fulfilled...
VM is not running
```

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FhDhHY5rzLC9aZKgYbG1l%2Funknown.png?alt=media&#x26;token=0c65361a-1402-49c1-8c53-c380e1ffdce1" alt=""><figcaption></figcaption></figure>

## Flags

{% hint style="info" %}
This command supports [global flags. ](https://docs.cloudeka.ai/cloudeka-api-list/global-flags)Refer to the Global Flags section for details
{% endhint %}

| Flag                   | Description                                             |
| ---------------------- | ------------------------------------------------------- |
| -h, --help             | Help for the vm reboot command.                         |
| -n, --namespace string | Specifies the cluster namespace to scope the operation. |
| -p, --project string   | Specifies the project ID.                               |
