Commit Graph
1675 Commits
Author SHA1 Message Date
Ruben S. MonteroandPavel Czerny 3dfd53df1c F #6053: In-place restore of VM backups (shared and ssh drivers)
This commit implements the in-place restore of VM backups. Selected VM disks will
be replaced with the specified backup:

* A new API call has been added to the XML-RPC API (`one.vm.restore`) with
  the following arguments:
    - VM ID to be restored, needs to be in **poweroff** state
    - IMAGE ID of the backup to restore
    - INCREMENT ID, only for incremental backups, the increment to use
      (defults to -1 to use the last increment available)
    - DISK ID of the disk to restore (defaults to -1 to restore all VM
      disks)

* Datastore drivers needs to implemente a new operation `ls`. This new
  operation takes the VM, image information of the backup and datastore
  information and returns the restore URL for the disks in the backup.

* This commit includes the implementation for qcow2 and ssh drivers,
  ceph will be implemented in a separated PR. The new driver action is
  `restore host:vm_dir vm_id img_id inc_id disk_id`

* The restore operation is performed in a new state `PROLOG_RESTORE`
  rendered as `RESTORE` and `rest` in short form. State in in RSuntone.

TODO:
  - Remove any existing VM snapshot (system/disk) in the VM. Note that
    snapshots are not included in a backup.

  - Ceph drivers

  - JAVA, GO Lang API bindings

  - Sunstone interface, new state and new operation. Review new state in
    RSuntone.

co-authored-by: Pavel Czerny <pczerny@opennebula.io>
2024-04-26 12:45:04 +02:00
Pavel Czerny 91fe6acc82 M #-: Sync onevm updateconf description with code 2024-04-18 12:06:51 +02:00
Pavel Czerny e4a8e37d3d B #6552: Disable update of VM->CONTEXT->ETH* values
Disable update of CONTEXT->ETH* values, which leads to an inconsistent
context.sh file inside VM.

Fix re-generating of ETH values for updateconf in replace mode, when the
value NETWORK=YES wasn't change.
2024-04-18 12:05:02 +02:00
Daniel Clavijo CocaandTino Vázquez 6cfe1a83f8 B OpenNebula/one-apps#14: Update CLI description to reflect behavior (#2992)
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
2024-03-20 16:11:17 +01:00
Pavel Czerný 2c5a11863e B #6533: Fix no_check_capacity for image create (#2994)
(cherry picked from commit 3df4cbb1d3)
2024-03-20 10:49:21 +01:00
Pablo del ArcoandTino Vázquez 7caf308ca7 F OpenNebula/one#6511: CLI listing formatting ignored (#2979)
when passing --search

Signed-off-by: Pablo <pdelarco@opennebula.io>
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
2024-03-12 17:08:50 +01:00
dgarcia18 133a24428a B OpenNebula/one#6509: CLI Tools not reporting errors (#2967)
and exit state when using --json and --yaml options

Signed-off-by: Daniel <dgarcia@opennebula.io>
2024-03-05 12:25:17 +01:00
Pavel CzernýandRuben S. Montero a591d8be86 F #6269: Restore individual disk from backup Image (#2961)
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2024-03-04 13:12:11 +01:00
Pavel Czerný ff35f07fba M #-: Fix CLI output for onehost (#2930)
* In case of incomplete monitoring data, the `onehost show` command shows error
2024-02-12 09:49:07 +01:00
Daniel Clavijo Coca df0b41dec1 M #-: Update vm state reference (#2929) 2024-02-09 11:05:41 +01:00
Daniel Clavijo Coca 1e69810e2a M #-: Update onevm recover cli help (#2925) 2024-02-07 19:35:37 +01:00
Tino Vázquez b1be795555 L #-: Lint onevm CLI command 2024-02-05 14:25:02 +01:00
Ruben S. Montero 2e596c0cf5 F #6439: PCI attach/detach operation
* Adds 2 new API calls one.vm.attachpci and one.vm.detachpci
* The operation is only for POWEROFF VMs
* Adds 2 new actions to register the event in the VM history pci-detach/pci-attach
* Ruby OCA bindings
* onevm cli commands

TODO:
- JAVA and GO bindings
- Sunstone implementation

(cherry picked from commit 5c4331a4dd)
2024-01-31 17:50:45 +01:00
Jan Orel 954c545605 B #-: Fix stdin hanlding in cli (#2909)
Don't realy solely on STDIN.wait_readable. When
running CLI from script, STDIN could be easily
inherited and already processed. Also Jenkins in
`sh` function always passes STDIN.

Improve error message when attributes should be
merged.
2024-01-30 16:45:25 +01:00
Shanobi 532ca2f88f M #-: Update onevnet
(cherry picked from commit 8b022bc664)
2024-01-18 16:07:11 +01:00
Shanobi 79667564c1 M #-: Update onevm
remove extraneous article

(cherry picked from commit 4a7cfb24808a244641fe7ac1346b21be7a34786a)
2024-01-17 11:24:03 +01:00
Shanobi 287d049ad6 Update oneuser
correct spelling of 'specific' under token examples

(cherry picked from commit cfcfb8f754)
2024-01-15 11:17:07 +01:00
Shanobi 76a440853b M #-: Fix typo in onevcenter help (#6457)
change first 'import' example from `onevcenter list` to 'onevcenter import`

(cherry picked from commit dfa7823b63c7c7f43e0829b2707f4f24aeeaa847)
2024-01-15 11:14:02 +01:00
Pavel CzernýandRuben S. Montero 8de574fb56 F OpenNebula/one#6341: Fix generic quota CLI output (#2891)
Co-authored-by: Ruben S. Montero <rsmontero@opennebula.org>
2024-01-12 18:24:10 +01:00
Pavel CzernýandRuben S. Montero 442041fd07 F #6341: Generic Quotas
- Generic quotas are defined and read from oned.conf (QUOTA_VM_ATTRIBUTE)
- Generic quotas react to the running mode (i.e. account only when the VM is
  running). For each quota oned also adds a RUNNIN_* metric
- one.system.config API call has been updated so every user can read
  quota configuration:
    . Sensitive information is hidden (***)
    . Oneadmin group has no longer access to sensitive information
      through the API
- CLI has been updated to render generic quotas
- onedb fsck fixes generic quotas reading the configuration from
  oned.conf

Other changes in this PR:
- Refactor Quota metrics to use std::vector instead of C array
Squashed commit of the following:
- New methods to Template and Attribute classes to render hidden
  attributes as "***"
- Update Quota calls to not include unneeded quotas

co-authored-by:Ruben S. Montero <rsmontero@opennebula.org>
2024-01-08 14:07:03 +01:00
Daniel Clavijo Coca 9d5322fe1d F OpenNebula/one#6365: Improve oneflow listing commands CLI (#2870) 2023-12-12 16:07:19 +01:00
Daniel Clavijo Coca fe545803c9 B OpenNebula/one#6414: Allow VIRTIO_BLK_QUEUES on one.vm.updateconf (#2852) 2023-12-04 12:12:17 +01:00
Tino Vázquez 7516ed7f0a L #-: Lint for rubocop 1.58.0 2023-12-04 10:40:53 +01:00
Tino Vázquez d49e6fcc8f Revert "L #-: Linting for rubocop 1.58.0"
This reverts commit 76f1d1bba4.
2023-12-04 10:05:02 +01:00
Tino Vázquez 76f1d1bba4 L #-: Linting for rubocop 1.58.0 2023-12-02 13:22:31 +01:00
Daniel Clavijo Coca ec64ac4457 M #-: Remove offline resize limitation from CLI (#2843) 2023-11-28 16:23:02 +01:00
Daniel Clavijo Coca ac11277d93 F OpenNebula/one#6059: Added QoL features for backup management (#2837)
using the CLI

(cherry picked from commit 611fe5f363)
2023-11-28 16:20:23 +01:00
Pavel Czerný da5e716bba B #6388: Fix CLI output after deleting all disk snapshots (#2814) 2023-11-15 13:41:57 +01:00
Ruben S. Montero ea1d5183ea F #6333: Snapshots for incremental backup mode
- Defines a new a attribute "INCREMENT_MODE" that can be "SNAPSHOT" or
     "CBT"

- SNAPSHOT mode: takes a disk snapshot (virsh snapshot-create-as or
  qemu-img). The current snapshot is saved in the backup store, and
  committed to the base disk image.

  The backup_qcow2.rb util adapt to different VM folder layout for SSH,
  shared, persistent, non persistent disks.

- Lint vxlan.rb

- Update onevm and XSD schema to reflect the new backup attribute
2023-11-10 19:40:26 +01:00
mkutouski 403f780497 M #-: oneflow delete --force analog (#2784)
An information on how to force oneflow service removal added
2023-10-23 14:35:32 +02:00
Daniel Clavijo Coca 7c91082e33 F OpenNebula/one#6242: prioritize file read (#2779) 2023-10-23 12:19:42 +02:00
Neal Hansen c1a0e5bfc5 F OpenNebula/one#6286: Add support for VIDEO devices in KVM
- New attribute VIDEO, that includes
  - TYPE: Custom video device (none, vga, cirrus, virtio)
 - IOMMU: Enable IOMMU for the video device
 - ATS: Enable ATS (Address Translation Services) for the video device
 - VRAM: VRAM allocated to the video device (Megabytes)
 - RESOLUTION: Video resolution, in format like: 1280x720 or 1920x1080

- Support for onevm CLI command
- Updated VM xsd file.
2023-09-20 20:00:10 +02:00
Pavel Czerný e427a29a14 M #-: Add require 'active_support' (#2738)
Without the require, commands with --json or --yaml flags fails for
ActiveSupport version 7.0+
2023-09-20 13:34:23 +02:00
Pavel Czerný ac49ab6d30 F #6227: New API for VMGroup roles
* New API for VMGroup roles: add, del, update
* Go and Java api for VM Group roles
2023-09-14 15:36:26 +02:00
Daniel Clavijo Coca 6de9e4e8bb F OpenNebula/one#6242: stdin for update methods (#2717) 2023-09-07 19:14:03 +02:00
Pavel Czerný c5392d08b8 F #6063: Update Backup Job fix (#2715)
* Set priority on Backup Job create

* Fix a bug when running backup jobs in sequential mode

* Change the update semantics to support replace mode

* Update Ruby, Golang and Java API accordingly

* F #6063: Adress PR comments
2023-09-07 11:11:02 +02:00
Pavel Czerný 501d855e98 F #6063: Update Backup Job CLI description (#2678) 2023-07-26 16:42:11 +02:00
Daniel Clavijo Coca 7b951d3cc5 F OpenNebula/one#6242: Add bash symbols note to CLI help (#2662) 2023-07-10 13:29:13 +02:00
Daniel Clavijo Coca 1804583ece F OpenNebula/one#6242: Allow templates via STDIN on CLI (#2660) 2023-07-07 10:21:38 +02:00
Ruben S. Montero 6bbfbb03e4 F #6063: Backup Jobs for OpenNebula
Includes the following changes:
- xml-schema for Backup Job and Scheduled Actions
- GO, Java api
- Deprecate onevm update-chart, delete-chart
    * The commands are replaced by sched-update and sched-delete
    * Refactor method deprecate_command, it's still possible to run the
    command
    * Delete 'shutdown' and 'delete' commands deprecated years ago
    * Fix --verbose option for sched-update and sched-delete
- Re-implementation of scheduled actions, now are managed and executed
  by oned
- Backup Job objects, API, and CLI commands
2023-07-03 18:15:52 +02:00
Pavel Czerný ffc0f8ecb1 F OpenNebula/one#6006: Fix typo in oneprovision (#2653)
(cherry picked from commit 7e69e4e047)
2023-06-28 17:41:46 +02:00
Daniel Clavijo Coca a2db634569 F OpenNebula/one#6006: Add CLI yamls for listing commands (#2643)
(cherry picked from commit 1a98b9b409)
2023-06-28 17:40:35 +02:00
Daniel Clavijo Coca 378ffcd47a B OpenNebula/one#6246: Autocorrect only deprecated methods (#2654) 2023-06-27 18:16:02 +02:00
Pavel Czerný 868828464c M #-: Fix return code if sched-action add fails (#2641) 2023-06-21 09:33:35 +02:00
Victor Palma 15c4626313 F #5591: Add CLI support for custom role attrs (#2579)
(cherry picked from commit 6b11d98f3f)
2023-05-12 13:52:01 +02:00
Ruben S. Montero a9da75db0e F #6030: Cancel backup operation
Author: Pavel Czerny <pczerny@opennebula.systems>
Author: Michal Opala <mopala@opennebula.io>
(cherry picked from commit f12c365d3e)
2023-03-16 13:11:27 +01:00
Daniel Clavijo Coca 820948be4c M #-: Add -R short option for recursive operations (#2555)
(cherry picked from commit 19c6b7c5ef)
2023-03-09 17:48:19 +01:00
Ruben S. Montero 2ec40c2b72 Revert "F #5591: Custom role attributes in oneflow added (#2525)"
This reverts commit d6ec6fad07.

(cherry picked from commit 9bf063b1a2)
2023-02-28 12:28:17 +01:00
Victor Palma f66ab7a8c2 F #5591: Custom role attributes in oneflow added (#2525)
(cherry picked from commit d6ec6fad07)
2023-02-27 10:30:27 +01:00
Ruben S. Montero f0c40913c6 F #6029: Force to re-use current datastore ID
When doing incremental backups it MUST reuse the current datastore ID.
This commits forces this setting ignoring the API parameter in this case.

(cherry picked from commit 01c490a36d)
2023-02-22 11:48:09 +01:00