diff --git a/oca/vm.py b/oca/vm.py
index 7f5f83b..23c8e7b 100644
--- a/oca/vm.py
+++ b/oca/vm.py
@@ -230,11 +230,11 @@ class VirtualMachine(PoolElement):
         '''
         self._action('finalize')
 
-    def restart(self):
+    def reboot(self, hard=False):
         '''
-        Resubmits the VM after failure
+        Reboot the VM. Optionally perform a hard reboot
         '''
-        self._action('restart')
+        self._action('reboot-hard' if hard else 'reboot')
 
     def resubmit(self):
         '''

Incorrect method is called for vm reboot operation
Here is the list of actions which can be performed via **one.vm.action** XML-RPC Method of Opennebula (http://docs.opennebula.org/4.14/integration/system_interfaces/api.html#actions-for-virtual-machine-management)
- delete
- boot
- shutdown
- suspend
- hold
- stop
- resume
- release
- poweroff
- reboot
The last operation is **reboot**. But in vm.py (233) we have:  
```
def restart(self):
         '''
         Resubmits the VM after failure
         '''
         self._action('restart')
```
As result, error appears when trying restart a vm:
```
  File "/usr/local/lib/python2.7/dist-packages/oca/vm.py", line 237, in restart
    self._action('restart')
  File "/usr/local/lib/python2.7/dist-packages/oca/vm.py", line 252, in _action
    self.client.call(self.METHODS['action'], action, self.id)
  File "/usr/local/lib/python2.7/dist-packages/oca/__init__.py", line 123, in call
    raise OpenNebulaException(data)
oca.exceptions.OpenNebulaException: [VirtualMachineAction] Virtual machine action "restart" is not supported
```
diff --git a/oca/tests/test_virtualmachine.py b/oca/tests/test_virtualmachine.py
index fc4303f..0a09642 100644
--- a/oca/tests/test_virtualmachine.py
+++ b/oca/tests/test_virtualmachine.py
@@ -91,7 +91,7 @@ class TestVirtualMachine(unittest.TestCase):
         oca.client = oca.Client('test:test')
         vm = oca.VirtualMachine(self.xml, self.client)
         for action in ['shutdown', 'shutdown_hard', 'poweroff', 'poweroff_hard', 'hold', 'release', 'stop', 'cancel',
-                'suspend', 'resume', 'restart', 'finalize', 'delete']:
+                'suspend', 'resume', 'reboot', 'finalize', 'delete']:
             self.client.call = Mock(return_value='')
             getattr(vm, action)()
             if action in ('shutdown_hard', 'poweroff_hard', 'undeploy_hard'):

pip install -e .
parse_log_pytest
pytest
nose mock coverage pytest
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
mock==5.2.0
nose==1.3.7
-e git+https://github.com/python-oca/python-oca.git@6a419381025efe6034cc63b5a03c5b40121b32f8#egg=oca
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: python-oca
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.8.0
      - mock==5.2.0
      - nose==1.3.7
prefix: /opt/conda/envs/python-oca

oca/tests/test_virtualmachine.py::TestVirtualMachine::test_actions
oca/tests/test_virtualmachine.py::TestVirtualMachine::test_History_repr oca/tests/test_virtualmachine.py::TestVirtualMachine::test_acces_items_not_using_brackets oca/tests/test_virtualmachine.py::TestVirtualMachine::test_acces_items_using_brackets oca/tests/test_virtualmachine.py::TestVirtualMachine::test_allocate oca/tests/test_virtualmachine.py::TestVirtualMachine::test_convert_types oca/tests/test_virtualmachine.py::TestVirtualMachine::test_deploy oca/tests/test_virtualmachine.py::TestVirtualMachine::test_lcm_states oca/tests/test_virtualmachine.py::TestVirtualMachine::test_live_migrate oca/tests/test_virtualmachine.py::TestVirtualMachine::test_migrate oca/tests/test_virtualmachine.py::TestVirtualMachine::test_new_with_id oca/tests/test_virtualmachine.py::TestVirtualMachine::test_no_history_records_element oca/tests/test_virtualmachine.py::TestVirtualMachine::test_raise_exception_Index_Error_when_using_brackets oca/tests/test_virtualmachine.py::TestVirtualMachine::test_repr oca/tests/test_virtualmachine.py::TestVirtualMachine::test_resubmit oca/tests/test_virtualmachine.py::TestVirtualMachine::test_save_disk oca/tests/test_virtualmachine.py::TestVirtualMachine::test_states oca/tests/test_virtualmachine.py::TestVirtualMachine::test_update oca/tests/test_virtualmachine.py::TestVirtualMachine::test_user_template_variables
oca/vm.py
oca/vm.py