[ovirt-devel] Not getting desired output for ovirt backup script.

2019-09-23 Thread smidhunraj
I am trying to run the code of 

https://github.com/wefixit-AT/oVirtBackup/blob/master/backup.py

I am getting output as  ovirtsdk.infrastructure.brokers.VMSnapshot object at 
0x7fe9e59371d0
for the snippet  print vm.snapshots.list(config.get_snapshot_description())

Is this the expected output.

When i run the whole code ..
The log i get is ...

2019-09-23 12:34:47,263: Start backup for: test2-sep20__vm25-183
2019-09-23 12:34:48,978: Snapshot creation started ...
2019-09-23 12:34:48,978: Snapshot created
2019-09-23 12:34:59,926: !!! No snapshot found !!!
2019-09-23 12:34:59,926: All backups done
2019-09-23 12:34:59,926: Backup failured for:
2019-09-23 12:34:59,927:   test2-sep20__vm25-183
2019-09-23 12:34:59,927: Some errors occured during the backup, please check 
the log file

Could you guys please help me.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/PCNOJZGKTUB7Y72IVCZWFLOWUXQEELSW/


[ovirt-devel] how to login into ovirts particular virtualmachine from a remote client

2019-09-19 Thread smidhunraj
Is there any way i can login into the virtual machine in ovirt from my local 
machine.Please help me.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/IJFYGANLRFU5GSBPVVTLW6F5NP6T5XMD/


[ovirt-devel] how to login into ovirts particular virtualmachine from a remote client

2019-09-19 Thread smidhunraj
Is there any way i can login into the virtual machine in ovirt from my local 
machine.Please help me.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/HTW45NVTNAI7WLC2CNEYEWHLQUYM4XYF/


[ovirt-devel] How to use ovirt-imageio api for downloading snapshot to our localmachine.

2019-09-18 Thread smidhunraj
CAn anyone give me a working example of api on how to download snapshot to our 
local machine using ovirt using ovirt-imageio using api.Do we need to setup 
some certificate at our ovirt  engine side.Please help me
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/WHDID2MWBAHIOQBGKAISLWHKLMIE5RZM/


[ovirt-devel] [User is not authorized to perform this action.]

2019-09-18 Thread smidhunraj
I am getting error as User is not authorized to perform this action.I am using 
oVirt api to manually attach a disk and snapshot  to another virtual 
machine.This the code i used.The API i followed is

'
   true
   false
virtio


My disk
 cow
mydisk
  
   



==
The php code i have tried is ...

public function attachSnapshotandActivateDisk( ) {


$data = array();

$xmlStr = '
   true
   false
virtio


My disk
 cow
mydisk
  
   

 ';

$curlParam = array(
"url" => "vms/74a1a99f-87d1--b394-f90e4f29f51f/diskattachments",
"method" => "POST",
"data" => $xmlStr
);

// $text = print_r($curlParam, true);
//echo "console.log( 'curl 
Parameter".json_encode($text)."');";

$data = $this->processCurlRequest($curlParam, "vm-create");

// if instance update failed
if ($data['status'] != 'success') {
Common::ovirtLog(array(
"requestParam" => $curlParam,
"responseParam" => $data,
));
}

// show the output of print_r function as a string
//  $text = print_r($data, true);
echo $data['message'];
die;
echo " console.log('checking the attach 
snapshot activate disk function diskid=" . json_encode($data) . "') ";


//Detach the disk
//  $this->detachSnapshotDisk() ; 

return $data;
}


Please help me.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/42Z54W3JDZSTAN6PIOGWGGMVNZ5IDA47/


[ovirt-devel] [User is not authorized to perform this action.]

2019-09-18 Thread smidhunraj
I am getting error as User is not authorized to perform this action.I am using 
oVirt api to manually attach a disk and snapshot  to another virtual 
machine.This the code i used.The API i followed is

'
   true
   false
virtio


My disk
 cow
mydisk
  
   



==
The php code i have tried is ...

public function attachSnapshotandActivateDisk( ) {


$data = array();

$xmlStr = '
   true
   false
virtio


My disk
 cow
mydisk
  
   

 ';

$curlParam = array(
"url" => "vms/74a1a99f-87d1--b394-f90e4f29f51f/diskattachments",
"method" => "POST",
"data" => $xmlStr
);

// $text = print_r($curlParam, true);
//echo "console.log( 'curl 
Parameter".json_encode($text)."');";

$data = $this->processCurlRequest($curlParam, "vm-create");

// if instance update failed
if ($data['status'] != 'success') {
Common::ovirtLog(array(
"requestParam" => $curlParam,
"responseParam" => $data,
));
}

// show the output of print_r function as a string
//  $text = print_r($data, true);
echo $data['message'];
die;
echo " console.log('checking the attach 
snapshot activate disk function diskid=" . json_encode($data) . "') ";


//Detach the disk
//  $this->detachSnapshotDisk() ; 

return $data;
}


Please help me.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/GJ4ARMX7UNJ7EQVBX4O53FXXYMWXMAUD/


[ovirt-devel] How to copy snapshot of a disk from backup VM in ovirt to a storage area using scripting language with the help of api

2019-08-16 Thread smidhunraj
I have taken the snapshot of a virtual machine using rest API. I attached the 
disk to another backup  vm in oVirt.

1) Is it possible using php to copy the backup of Virtual Machine to another  
storage .

2) How can i access a backup virtual machine in oVirt using bash script. 

Is it possible using some scripting language .Any reference to some script 
would be helpful.
Thanks and regards,
Midhun Raj S
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/QKSWH4JIDSUOJV6JN3STTZIILV2DK7FI/


[ovirt-devel] No response for post using curl for The Backup and Restore API oVirt API

2019-08-12 Thread smidhunraj
I have 2 virtual machines in my ovirt open virtualisation manager.The name of 
first virtual machine is backupvm and the name of second virtual machine is 
secondvm .I have created many snapshot shot of secondvm I want to convert a 
particular snapshot ofsecondvm using the ovirt api to secondvm backup and 
attach it to backupvm The link of the api is 
https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-a-virtual-machine
 .I want to run the fourth step which says.

Attach the snapshot to the backup virtual machine and activate the disk:

 POST /api/vms/----/disks/ HTTP/1.1
 Accept: application/xml
 Content-type: application/xml

 
 
 true
 
.I want to attach this snapshots after converting them to backups of vms and 
then attach to vm named  backupvm.The api for this is mentioned as

The id of secondvm is a88a79ab-1f0c-4f32-bdaa-abc8109b3c0d and the id of 
backupvm is a88a79ab-1f0c-4f32-bdaa-abc8109b3c0d.The id of snapshot is 
804cb937-5961-4a55-a453-74932c508dd6 and id of disk is 
e6c623e3-31d8-4554-ad5a-2b581914494b

I have written a curl command for this as

curl -u 'username:password' -H "Accept: application/xml" -H "Content-type: 
application/xml"  -X POST -d '

   true
   '   
https:/ovirt-engine/api/vms/a88a79ab-1f0c-4f32-bdaa-abc8109b3c0d/disks/ ;
I expect the vm snapshot to be attached to backupvm.But i am not getting any 
response .Hence i am under the assumption that it is not working..

What modification should i make in the curl command to get it working

In the figure below secondvm is labelled as bobcarenewvm

https://i.stack.imgur.com/LC3An.png
https://i.stack.imgur.com/Lgozu.png
https://i.stack.imgur.com/efQrf.png
https://i.stack.imgur.com/3wAyA.png

Please help me,
Thanks and Regards,
Midhun.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/U2HYTU7AVHOVJT3DPPWZERM32EJGZ5OC/


[ovirt-devel] No response for post using curl for The Backup and Restore API oVirt API

2019-08-12 Thread smidhunraj
I have 2 virtual machines in my ovirt open virtualisation manager.The name of 
first virtual machine is backupvm and the name of second virtual machine is 
secondvm .I have created many snapshot shot of secondvm I want to convert a 
particular snapshot ofsecondvm using the ovirt api to secondvm backup and 
attach it to backupvm The link of the api is 
https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-a-virtual-machine
 .I want to run the fourth step which says.

Attach the snapshot to the backup virtual machine and activate the disk:

 POST /api/vms/----/disks/ HTTP/1.1
 Accept: application/xml
 Content-type: application/xml

 
 
 true
 
.I want to attach this snapshots after converting them to backups of vms and 
then attach to vm named  backupvm.The api for this is mentioned as

The id of secondvm is a88a79ab-1f0c-4f32-bdaa-abc8109b3c0d and the id of 
backupvm is a88a79ab-1f0c-4f32-bdaa-abc8109b3c0d.The id of snapshot is 
804cb937-5961-4a55-a453-74932c508dd6 and id of disk is 
e6c623e3-31d8-4554-ad5a-2b581914494b

I have written a curl command for this as

curl -u 'username:password' -H "Accept: application/xml" -H "Content-type: 
application/xml"  -X POST -d '

   true
   '   
https:/ovirt-engine/api/vms/a88a79ab-1f0c-4f32-bdaa-abc8109b3c0d/disks/ ;
I expect the vm snapshot to be attached to backupvm.But i am not getting any 
response .Hence i am under the assumption that it is not working..

What modification should i make in the curl command to get it working

In the figure below secondvm is labelled as bobcarenewvm

https://i.stack.imgur.com/LC3An.png
https://i.stack.imgur.com/Lgozu.png
https://i.stack.imgur.com/efQrf.png
https://i.stack.imgur.com/3wAyA.png

Please help me,
Thanks and Regards,
Midhun.
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/LJGEF5B3GXAZGVIIB4DL75TOLS7EOV6F/


[ovirt-devel] What values should i give in this ovirt api to get the correct response

2019-07-20 Thread smidhunraj
I am following this link.

https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-and-restoring-virtual-machines-using-the-backup-and-restore-api

I got response for

GET 
/api/vms/4ef8b995-ae58-49d6-8980-ef0fa6688d92/snapshots/1b94ca4e-8c03-4166-8d29-2b831e24b90e/disks
 HTTP/1.1 Accept: application/xml Content-type: application/xml


Identify disk id "Array
(
[disk] => Array
(
[0] => Array
(
[actual_size] => 0
[alias] => GlanceDisk-8700235
[format] => cow
[image_id] => a42bda58-7556-4ebe-a54d-03dc0a3b1f54
[propagate_errors] => false
[provisioned_size] => 8589934592
[read_only] => false
[shareable] => false
[sparse] => true
[status] => ok
[storage_type] => image
[wipe_after_delete] => false
[snapshot] => Array
(
[id] => 1b94ca4e-8c03-4166-8d29-2b831e24b90e
)

[storage_domains] => Array
(
[storage_domain] => Array
(
[0] => Array
(
[id] => 
ad6aea6d-ff90-457f-98eb-99380949e23a
)

)

)

[name] => GlanceDisk-8700235
[description] => CentOS 7 Generic Cloud Image v1711 for 
x86_64 (8700235)
[id] => dded245b-4a73-48b4-a1b4-ba98c37490ad
)


 

What is the values that i have to give to the POST request in this api


 POST /api/vms/----/disks/ HTTP/1.1
 Accept: application/xml
 Content-type: application/xml

 
 
 true
 

to replace 
1)vms ===>> ----
2)disk id   ----
3)snapshot id   ----
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/OPXOP7OLFGSJ626VEX7ZMRWG5IWKGPWZ/


[ovirt-devel] Doubt on Backing Up and Restoring Virtual Machines Using the Backup and Restore API:-

2019-07-18 Thread smidhunraj
Doubt on Backing Up and Restoring Virtual Machines Using the Backup and Restore 
API:-
In this link  
https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-and-restoring-virtual-machines-using-the-backup-and-restore-api
in point 4 it is said that 



4 .Attach the snapshot to the backup virtual machine and activate the disk:

 POST /api/vms/----/disks/ HTTP/1.1
 Accept: application/xml
 Content-type: application/xml

 
 
 true
 

What does this ---- mean do we need to create a 
new   virtual machine and attach the snapshot to that.
  Could you kindly explain it further
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/OEXGCKKP4AYXAB7XVMNEMI4ERC6XV63A/