...
Published: 2021-11-11
Last modified: 2021-11-11
How to
Integrate vProtect dashboard plugin to OpenStack (LXC)
...
Problem:
list snapshot:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh snapshot-list alpine_c8 |
remove snapshot:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh snapshot-delete --domain alpine_c8 --snapshotname vProtect-f05555c7-a881-4b18-b5b2-f4a84eba71c6 |
Solution
Check your VM, it must be running:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh list --all Id Name State ---------------------------------------------------- 1 alpine_c8 running |
List all existing snapshot for your VM:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh snapshot-list alpine_c8 |
Get configuration of your VM, and get path to disk image.
Panel | ||||
---|---|---|---|---|
| ||||
<domain type='qemu' id='1'> <name>alpine_c8</name> <uuid>e14a550b-31ec-4d08-927f-af638d9a8c28</uuid> <metadata> <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> <libosinfo:os id="http://alpinelinux.org/alpinelinux/3.8"/> </libosinfo:libosinfo> </metadata> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>1</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-f05555c7-a881-4b18-b5b2-f4a84eba71c6'/> <backingStore type='file' index='1'> <format type='qcow2'/> <source file='/var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-b534b5dd-9480-4336-bf17-81a4308dfb6f'/> <backingStore type='file' index='2'> <format type='qcow2'/> <source file='/var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-aa2878cb-288c-4ac9-b1ec-5a328f22a6f5'/> <backingStore type='file' index='3'> <format type='qcow2'/> <source file='/var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-157e97b2-aec8-4e6b-8181-0022427e92e2'/> <backingStore type='file' index='4'> <format type='qcow2'/> <source file='/var/lib/libvirt/images/alpinelinux3.8.qcow2'/> <backingStore/> </backingStore> </backingStore> </backingStore> </backingStore> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu'/> <target dev='hdb' bus='ide'/> <readonly/> <alias name='ide0-0-1'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='ide' index='0'> <alias name='ide'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='direct'> <mac address='52:54:00:68:90:e2'/> <source dev='ens192' mode='bridge'/> <target dev='macvtap0'/> <model type='e1000'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='mouse' bus='ps2'> <alias name='input0'/> </input> <input type='keyboard' bus='ps2'> <alias name='input1'/> </input> <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='selinux' relabel='yes'> <label>system_u:system_r:svirt_tcg_t:s0:c271,c460</label> <imagelabel>system_u:object_r:svirt_image_t:s0:c271,c460</imagelabel> </seclabel> <seclabel type='dynamic' model='dac' relabel='yes'> <label>+107:+107</label> <imagelabel>+107:+107</imagelabel> </seclabel> </domain> |
List all disk of your VM:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# ll /var/lib/libvirt/images/alpinelinux3.8.qcow2* |
On disk attached to VM check chain of disks:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# qemu-img info /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-f05555c7-a881-4b18-b5b2-f4a84eba71c6 --backing-chain -U image: /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-b534b5dd-9480-4336-bf17-81a4308dfb6f image: /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-aa2878cb-288c-4ac9-b1ec-5a328f22a6f5 image: /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-157e97b2-aec8-4e6b-8181-0022427e92e2 image: /var/lib/libvirt/images/alpinelinux3.8.qcow2 |
In our example we have all disk in the same chain.
Get simple name of disks:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh domblklist alpine_c8 |
Merge disk, that process can take a while, depend of disk size:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh blockcommit alpine_c8 hda --verbose --pivot --active |
When the disk is merged you can check it is single file:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh domblklist alpine_c8 |
Next remove snapshot information from VM:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# virsh snapshot-delete --children --domain alpine_c8 --snapshotname vProtect-157e97b2-aec8-4e6b-8181-0022427e92e2 --metadata Domain snapshot vProtect-157e97b2-aec8-4e6b-8181-0022427e92e2 deleted |
When you check again files of disks on file system you see active is "/var/lib/libvirt/images/alpinelinux3.8.qcow2", and rest images still on filesystem:
Panel | ||||
---|---|---|---|---|
| ||||
[root@kvm-c8 ~]# ll /var/lib/libvirt/images/alpinelinux3.8.qcow2* |
Remove not require files from filesystem:
...
bgColor | #fff |
---|---|
title | rm /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-157e97b2-aec8-4e6b-8181-0022427e92e2 /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-aa2878cb-288c-4ac9-b1ec-5a328f22a6f5 /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-b534b5dd-9480-4336-bf17-81a4308dfb6f /var/lib/libvirt/images/alpinelinux3.8.qcow2-vProtect-f05555c7-a881-4b18-b5b2-f4a84eba71c6 |
...
ExternalAPIException: File could not be saved: Cannot run program
"/opt/vprotect/scripts/backup_db.sh": error=2, No such file or directory.
Cannot run program "/opt/vprotect/scripts/backup_db.sh": error=2,
No such file or directory.
vProtect installed without vProtect node. The vProtect node is on the other host.
Solution
Login to Vprotect server.
Select from left menu Applications->Executions Configurations select icon Clone in row where vProtect DB Backup Command is.
In new window type new name for command name (Vprotect DB Backup Command node2) and select Clone button.
Next click new created command and in settings window in General section change Execution type
from "node" to "Remote SSH" and save settings.
Next select Applications->Instances and clone default vProtect DB instance.
In new window type new name of the application backup, and click Clone.
Click on the name of new created application and next click Settings from down menu.
In section "SSH access" type in SSH Host - Ip address of the vProtect server and SSH key path or in section
"Configure SSH password" type twice time root password. Save new settings.
Finally in new Application->Instance system shows name of the new created name command execution configuration with node configuration name.
Test new application backup.
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...