Closed txsastre closed 6 years ago
Okay, the old BASH version and even the earlier versions of this PHP script saved the images as image.img, but the new version supports multiple disks and uses Disk1.img, Disk2.img, ... as well as Disk1.dat, Disk2.dat, ...
You will have to do a backup using the NEW script to test the restore feature.
As for the disk attach issue, I would do the following since there were issues earlier with the connectivity.
Then try a backup and if all works, try to restore it.
The Xen Migrate is a totally different process and it uses different logic.
ok, I understand the issue with the new version.
but I tried to do a backup, but I cannot do it, its the same as the top of this issue https://github.com/zipurman/oVIRT_Simple_Backup/issues/14#issue-309344470
seems that's there is a problem once de BackupEngine has to attach the disk cloned from a snapshot, looks that he cannot find it.
If I had to guess, the size it is using is zero based on your other issue. I am not sure what would cause the API to return zero sizes for your disks ...
If you try to access https://YOUR-OVIRT-ENGINE-IP/api/disks/ (view source to see xml) what are the sizes shown here??
Try this:
watch cat /var/www/html/cache/statusfile.dat
Then while that is running, start a backup and keep an eye on the watch, what does that file do? If the answer is nothing, make sure you "chmod 777 /var/www/html/cache/"
API (big copy & paste and it loses the format, uploaded as a file, rename to .xml, but I can see sizes there.
https://192.168.222.200/ovirt-engine/api/disks but I can see sizes there.
About the cat /var/www/html/cache/statusfile.dat
I got 2 "captures"
the first I think is when the snapshot is done
backup
snapshot
1
9ee29d43-1bf2-47fa-8944-73f6458342f3
BU_20180328_225016
this second one is when trying to copy the disk, but I says " Failed: Disk Not Attached"
backup
backup_imaging
1
9ee29d43-1bf2-47fa-8944-73f6458342f3
BU_20180328_225016
5338b823-61e0-472d-b12d-a84a5b324909
linuxmint
Okay, so the statusfile.dat should record the following if you are using "watch"
ready -> snapshot -> backup_create_path -> snapshot_attach -> backup_imaging -> backup_detatch_image -> snapshot_delete - DONE
Make sure that the folder exists: /mnt/backups/linuxmint/9ee29d43-1bf2-47fa-8944-73f6458342f3/BU_20180328_225016/ If not, "chmod 777 /mnt/backups/ -R"
If so, what files are in that folder? What sizes are the files? What is the content of any dat files?
That should help with figuring out what is missing.
maybe I have not configured correctly "watch" as it has not show anything while trying the backup.
one finished with cat is what I have cat /var/www/html/cache/statusfile.dat
backup
backup_imaging
1
4007f32f-7653-4ea9-86f0-7a9608dd8f82
BU_20180329_081933
becb7a0e-a06b-49dd-8231-f6038838a73f
lubuntu1
the backup directory has
root@BackupEngine:~# ls -la /mnt/backups/linuxmint/9ee29d43-1bf2-47fa-8944-73f6458342f3/BU_20180328_225016/ total 24 drwxrwxrwx 2 1024 users 4096 mar 28 22:50 . drwxrwxrwx 3 1024 users 4096 mar 28 22:50 .. -rwxrwxrwx 1 1024 users 11119 mar 28 22:50 data.xml -rwxrwxrwx 1 1024 users 172 mar 28 22:50 Disk1.dat
Disk1.dat
root@BackupEngine:~# cat /mnt/backups/linuxmint/9ee29d43-1bf2-47fa-8944-73f6458342f3/BU_20180328_225016/Disk1.dat
Disk1
4ee542c1-ff11-42f3-abb2-1d01113f82a2
linuxmint_Disk1
true
virtio_scsi
12884901888
vdb
linuxmint
BU_20180328_225016
9ee29d43-1bf2-47fa-8944-73f6458342f3
data.xlm
root@BackupEngine:~# cat /mnt/backups/linuxmint/9ee29d43-1bf2-47fa-8944-73f6458342f3/BU_20180328_225016/data.xml
<?xml version="1.0" encoding="UTF-8"?><ovf:Envelope xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ovf:version="4.1.0.0"><References><File ovf:href="4ee542c1-ff11-42f3-abb2-1d01113f82a2/8c888feb-6a6c-4c40-9bc9-74375d5dadd9" ovf:id="8c888feb-6a6c-4c40-9bc9-74375d5dadd9" ovf:size="1445888" ovf:description="Active VM" ovf:disk_storage_type="IMAGE" ovf:cinder_volume_type=""></File></References><NetworkSection><Info>List of networks</Info><Network ovf:name="ovirtmgmt"></Network></NetworkSection><Section xsi:type="ovf:DiskSection_Type"><Info>List of Virtual Disks</Info><Disk ovf:diskId="8c888feb-6a6c-4c40-9bc9-74375d5dadd9" ovf:size="12" ovf:actual_size="0" ovf:vm_snapshot_id="5338b823-61e0-472d-b12d-a84a5b324909" ovf:parentRef="" ovf:fileRef="4ee542c1-ff11-42f3-abb2-1d01113f82a2/8c888feb-6a6c-4c40-9bc9-74375d5dadd9" ovf:format="http://www.gnome.org/~markmc/qcow-image-format.html" ovf:volume-format="COW" ovf:volume-type="Sparse" ovf:disk-interface="VirtIO_SCSI" ovf:read-only="false" ovf:shareable="false" ovf:boot="true" ovf:pass-discard="false" ovf:disk-alias="linuxmint_Disk1" ovf:wipe-after-delete="true"></Disk></Section><Content ovf:id="out" xsi:type="ovf:VirtualSystem_Type"><Name>linuxmint</Name><CreationDate>2018/03/13 08:55:39</CreationDate><ExportDate>2018/03/28 20:47:05</ExportDate><DeleteProtected>false</DeleteProtected><SsoMethod>guest_agent</SsoMethod><IsSmartcardEnabled>false</IsSmartcardEnabled><TimeZone>Etc/GMT</TimeZone><default_boot_sequence>0</default_boot_sequence><Generation>73</Generation><ClusterCompatibilityVersion>4.2</ClusterCompatibilityVersion><VmType>0</VmType><ResumeBehavior>AUTO_RESUME</ResumeBehavior><MinAllocatedMem>1024</MinAllocatedMem><IsStateless>false</IsStateless><IsRunAndPause>false</IsRunAndPause><AutoStartup>true</AutoStartup><Priority>1</Priority><CreatedByUserId>c7e37e94-21f9-11e8-8222-da3173d77f88</CreatedByUserId><MigrationSupport>0</MigrationSupport><IsBootMenuEnabled>false</IsBootMenuEnabled><IsSpiceFileTransferEnabled>true</IsSpiceFileTransferEnabled><IsSpiceCopyPasteEnabled>true</IsSpiceCopyPasteEnabled><AllowConsoleReconnect>false</AllowConsoleReconnect><ConsoleDisconnectAction>LOCK_SCREEN</ConsoleDisconnectAction><CustomEmulatedMachine></CustomEmulatedMachine><CustomCpuName></CustomCpuName><PredefinedProperties></PredefinedProperties><UserDefinedProperties></UserDefinedProperties><MaxMemorySizeMb>4096</MaxMemorySizeMb><ClusterName>Default</ClusterName><TemplateId>00000000-0000-0000-0000-000000000000</TemplateId><TemplateName>Blank</TemplateName><IsInitilized>true</IsInitilized><Origin>3</Origin><app_list>linux-image-4.10.0-38.42~16.04.1,ovirt-guest-agent-1.0.13.dfsg-2,xserver-xorg-video-qxl-0.1.4-3ubuntu3</app_list><quota_id>b62bfda2-21f9-11e8-b8cd-da3173d77f88</quota_id><DefaultDisplayType>1</DefaultDisplayType><TrustedService>false</TrustedService><OriginalTemplateId>00000000-0000-0000-0000-000000000000</OriginalTemplateId><OriginalTemplateName>Blank</OriginalTemplateName><UseHostCpu>false</UseHostCpu><UseLatestVersion>false</UseLatestVersion><StopTime>2018/03/21 11:52:44</StopTime><Section ovf:id="9ee29d43-1bf2-47fa-8944-73f6458342f3" ovf:required="false" xsi:type="ovf:OperatingSystemSection_Type"><Info>Guest Operating System</Info><Description>other</Description></Section><Section xsi:type="ovf:VirtualHardwareSection_Type"><Info>1 CPU, 1024 Memory</Info><System><vssd:VirtualSystemType>ENGINE 4.1.0.0</vssd:VirtualSystemType></System><Item><rasd:Caption>1 virtual cpu</rasd:Caption><rasd:Description>Number of virtual CPU</rasd:Description><rasd:InstanceId>1</rasd:InstanceId><rasd:ResourceType>3</rasd:ResourceType><rasd:num_of_sockets>1</rasd:num_of_sockets><rasd:cpu_per_socket>1</rasd:cpu_per_socket><rasd:threads_per_cpu>1</rasd:threads_per_cpu><rasd:max_num_of_vcpus>16</rasd:max_num_of_vcpus><rasd:VirtualQuantity>1</rasd:VirtualQuantity></Item><Item><rasd:Caption>1024 MB of memory</rasd:Caption><rasd:Description>Memory Size</rasd:Description><rasd:InstanceId>2</rasd:InstanceId><rasd:ResourceType>4</rasd:ResourceType><rasd:AllocationUnits>MegaBytes</rasd:AllocationUnits><rasd:VirtualQuantity>1024</rasd:VirtualQuantity></Item><Item><rasd:Caption>linuxmint_Disk1</rasd:Caption><rasd:InstanceId>8c888feb-6a6c-4c40-9bc9-74375d5dadd9</rasd:InstanceId><rasd:ResourceType>17</rasd:ResourceType><rasd:HostResource>4ee542c1-ff11-42f3-abb2-1d01113f82a2/8c888feb-6a6c-4c40-9bc9-74375d5dadd9</rasd:HostResource><rasd:Parent>3f16f856-1305-4749-b0d3-ef8c563cfe32</rasd:Parent><rasd:Template>00000000-0000-0000-0000-000000000000</rasd:Template><rasd:ApplicationList></rasd:ApplicationList><rasd:StoragePoolId>adf3b350-21f9-11e8-927a-da3173d77f88</rasd:StoragePoolId><rasd:CreationDate>2018/03/21 11:42:39</rasd:CreationDate><rasd:LastModified>1970/01/01 00:00:00</rasd:LastModified><rasd:last_modified_date>2018/03/28 20:47:05</rasd:last_modified_date><Type>disk</Type><Device>disk</Device><rasd:Address>{type=drive, bus=0, controller=0, target=0, unit=0}</rasd:Address><BootOrder>1</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>scsi0-0-0-0</Alias></Item><Item><rasd:Caption>Ethernet adapter on ovirtmgmt</rasd:Caption><rasd:InstanceId>6358c026-3e00-4a5f-904c-d4e5d585e3a6</rasd:InstanceId><rasd:ResourceType>10</rasd:ResourceType><rasd:OtherResourceType>ovirtmgmt</rasd:OtherResourceType><rasd:ResourceSubType>3</rasd:ResourceSubType><rasd:Connection>ovirtmgmt</rasd:Connection><rasd:Linked>true</rasd:Linked><rasd:Name>nic1</rasd:Name><rasd:ElementName>nic1</rasd:ElementName><rasd:MACAddress>00:1a:4a:16:01:02</rasd:MACAddress><rasd:speed>1000</rasd:speed><Type>interface</Type><Device>bridge</Device><rasd:Address>{type=pci, slot=0x07, bus=0x00, domain=0x0000, function=0x0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>net0</Alias><SpecParams><inbound></inbound><outbound></outbound></SpecParams></Item><Item><rasd:Caption>USB Controller</rasd:Caption><rasd:InstanceId>3</rasd:InstanceId><rasd:ResourceType>23</rasd:ResourceType><rasd:UsbPolicy>DISABLED</rasd:UsbPolicy></Item><Item><rasd:Caption>Graphical Controller</rasd:Caption><rasd:InstanceId>2561333f-2115-4f54-9ffe-06ab2d1d6a10</rasd:InstanceId><rasd:ResourceType>20</rasd:ResourceType><rasd:VirtualQuantity>1</rasd:VirtualQuantity><rasd:SinglePciQxl>false</rasd:SinglePciQxl><Type>video</Type><Device>qxl</Device><rasd:Address>{type=pci, slot=0x02, bus=0x00, domain=0x0000, function=0x0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>video0</Alias><SpecParams><vgamem>16384</vgamem><heads>1</heads><vram>8192</vram><ram>65536</ram></SpecParams></Item><Item><rasd:Caption>Graphical Framebuffer</rasd:Caption><rasd:InstanceId>41d727ef-0447-452b-a5f8-a9c5e630adcc</rasd:InstanceId><rasd:ResourceType>26</rasd:ResourceType><Type>graphics</Type><Device>spice</Device><rasd:Address></rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias></Alias></Item><Item><rasd:Caption>CDROM</rasd:Caption><rasd:InstanceId>b6514ae7-a6db-440c-9dc8-20502a745370</rasd:InstanceId><rasd:ResourceType>15</rasd:ResourceType><Type>disk</Type><Device>cdrom</Device><rasd:Address>{type=drive, bus=1, controller=0, target=0, unit=0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>true</IsReadOnly><Alias>ide0-1-0</Alias><SpecParams><path></path></SpecParams></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>c3f7ab65-8fec-4b8c-a59e-7f5a84ddf2b1</rasd:InstanceId><Type>channel</Type><Device>unix</Device><rasd:Address>{type=virtio-serial, bus=0, controller=0, port=2}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>channel1</Alias></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>06431702-23f7-4df7-9cd5-3a068b96896d</rasd:InstanceId><Type>channel</Type><Device>spicevmc</Device><rasd:Address>{type=virtio-serial, bus=0, controller=0, port=3}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>channel2</Alias></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>5e1e7fa5-7f67-40ff-9907-5152ba2b2ff3</rasd:InstanceId><Type>channel</Type><Device>unix</Device><rasd:Address>{type=virtio-serial, bus=0, controller=0, port=1}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>channel0</Alias></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>2ec3ecdf-4eb6-4049-a62e-a1bca94cce3a</rasd:InstanceId><Type>controller</Type><Device>ide</Device><rasd:Address>{type=pci, slot=0x01, bus=0x00, domain=0x0000, function=0x1}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>ide</Alias><SpecParams><index>0</index></SpecParams></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>bad0c6f8-6fed-4861-a989-5c33121ff687</rasd:InstanceId><Type>controller</Type><Device>virtio-scsi</Device><rasd:Address>{type=pci, slot=0x03, bus=0x00, domain=0x0000, function=0x0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>scsi0</Alias></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>d4323399-0771-4308-8206-32c66f2ab5ff</rasd:InstanceId><Type>controller</Type><Device>virtio-serial</Device><rasd:Address>{type=pci, slot=0x04, bus=0x00, domain=0x0000, function=0x0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>virtio-serial0</Alias></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>483199dd-086b-434e-92a9-a32abfd35995</rasd:InstanceId><Type>rng</Type><Device>virtio</Device><rasd:Address>{type=pci, slot=0x06, bus=0x00, domain=0x0000, function=0x0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>rng0</Alias><SpecParams><source>urandom</source></SpecParams></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>67f8499d-e1da-42db-ab7e-7740d87d2aa8</rasd:InstanceId><Type>controller</Type><Device>usb</Device><rasd:Address>{type=pci, slot=0x01, bus=0x00, domain=0x0000, function=0x2}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>false</IsReadOnly><Alias>usb</Alias><SpecParams><index>0</index><model>piix3-uhci</model></SpecParams></Item><Item><rasd:ResourceType>0</rasd:ResourceType><rasd:InstanceId>72fc5cac-0861-4811-b032-316b570adabc</rasd:InstanceId><Type>balloon</Type><Device>memballoon</Device><rasd:Address>{type=pci, slot=0x05, bus=0x00, domain=0x0000, function=0x0}</rasd:Address><BootOrder>0</BootOrder><IsPlugged>true</IsPlugged><IsReadOnly>true</IsReadOnly><Alias>balloon0</Alias><SpecParams><model>virtio</model></SpecParams></Item></Section></Content></ovf:Envelope>root@BackupEngine:~#
By the way if you feel that is has to be better for resolve the problem I can grant you access to my development machines. its easy to set up and theres nothing critical there.
If you want to give me access I am sure I can find the issue(s). PM me on IRC with the info ;)
0.6.5 version should help point out issues. Thanks for the help with debugging ;)
When backup : the snapshot is created, but when trying to attach disk (I guess) there is a problem : No disk attached.
When restoring.
No data.xml or Disk Images found.
but thereis image.img and also data.xml
Migrate:
From xenserver side it works, it does all the steps and migrates the disk. but when says that it is importing, it creates de VM but does not import the disk, so I have an empty VM.