Project

General

Profile

Actions

Task #7649

closed

Sketch a VM backup & restore

Added by Nico Schottelius almost 5 years ago. Updated 11 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
01/27/2020
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
PM Check date:

Description

  • User wants to have possibility to roll back in time

Implementation

  • We can use ceph snapshots
  • We might need/want to signal qemu before taking the snapshot
    • how?
    • Difference between uncloud and opennebula?

User facing API / CLI

  • User can set a maximum amount of snapshots (?)
    • Useful for auto rotate
  • User can configure a snapshot
  • User can list all snapshots
  • User can delete snapshots

Ideas for an CLI

ungleich-cli --username xx --password yy list-vms
ungleich-cli --username xx --password yy vm-snaphot-create <vmid>
ungleich-cli --username xx --password yy vm-snaphot-list <vmid>
ungleich-cli --username xx --password yy vm-snaphot-restore <vmid> <snapshot>
ungleich-cli --username xx --password yy vm-snaphot-delete <vmid> <snapshot>

Billing

Regular pricing - it's the same usage

Billed per gigabyte per second (?) basis (?)

Per second calculation: SSD

>>> (3.5/10.)/30/24/3600
1.3503086419753083e-07
>>> per_gb_per_second=((3.5/10.)/30/24/3600) 
>>> 1.36*10**(-7) * 10 * 86400 * 30
3.5251200000000003
>>> "{:0.9f}".format(1.36*10**(-7))
'0.000000136'
>>> 1.4*10**(-7) * 10 * 86400 * 30
3.628799999999999

  • Could offer it for 0.00000014 CHF per GB per second
  • Monthly would stay the same
  • User wants to have possibility to roll back in time

Implementation

  • We can use ceph snapshots
  • We might need/want to signal qemu before taking the snapshot
    • how?
    • Difference between uncloud and opennebula?

User facing API / CLI

  • User can set a maximum amount of snapshots (?)
    • Useful for auto rotate
  • User can configure a snapshot
  • User can list all snapshots
  • User can delete snapshots

Billing

Regular pricing - it's the same usage

Billed per gigabyte per second (?) basis (?)

Per second calculation: SSD

>>> (3.5/10.)/30/24/3600
1.3503086419753083e-07
>>> per_gb_per_second=((3.5/10.)/30/24/3600) 
>>> 1.36*10**(-7) * 10 * 86400 * 30
3.5251200000000003
>>> "{:0.9f}".format(1.36*10**(-7))
'0.000000136'
>>> 1.4*10**(-7) * 10 * 86400 * 30
3.628799999999999

  • Could offer it for 0.00000014 CHF per GB per second
  • Monthly would stay the same

Per second calculation: HDD

>>> per_gb_per_second=((1.5/100.)/30/24/3600) 
>>> per_gb_per_second
5.787037037037037e-09
>>> 
>>> "{:0.10f}".format(per_gb_per_second)
'0.0000000058'
>>> 0.0000000058* 100 * 86400 * 30
1.5033599999999998
  • Could offer for 0.0000000058 per gb per second
  • However units will be smaller than 100gb packages

Testing

  • Using my private VM
  • Locating the disk image
[10:43:59] red2.place5:~# rbd -p one ls | grep 10761
one-60-10761-0
[10:44:14] red2.place5:~# 
  • Does not show all attached disks -> need to go via opennebula api

Per second calculation: HDD

>>> per_gb_per_second=((1.5/100.)/30/24/3600) 
>>> per_gb_per_second
5.787037037037037e-09
>>> 
>>> "{:0.10f}".format(per_gb_per_second)
'0.0000000058'

Testing

  • Using my private VM
  • Locating the disk image
[10:43:59] red2.place5:~# rbd -p one ls | grep 10761
one-60-10761-0
[10:44:14] red2.place5:~# 
  • Does not show all attached disks -> need to go via opennebula api

Steps

  • Create a PoC for some VMs
    • record creation and deletion time is needed for billing later
  • Implement a CLI to be used by staff (i.e. no customer auth)
  • Integrate it into billing

Subtasks 1 (0 open1 closed)

Task #7654: Get VMs info from Opennebula and save it in etcdRejectedAhmed Bilal01/27/2020

Actions
Actions

Also available in: Atom PDF