Im busy implimenting a CBT backup and using the documentation as a guidance. I am now trying to export the VM metadata, but running into an error when trying to make the export_metadata call:
# self.xensession == the session created when we authenticated# uuid == the VM UUID
session_id = self.xensession._session
url =("%s/export_metadata?session_id=%s&uuid=%s&export_snapshots=false"%(self.url, session_id, uuid))
request = self.xensession.get(url)print(request)
I realised that above the session ID is "OpaqueRef:{ID}" so figured maybe it's a malformed error. But even if hardcode the sessionID like this:
# self.xensession == the session created when we authenticated# uuid == the VM UUID
session_id = self.xensession._session
url =("%s/export_metadata?session_id=%s&uuid=%s&export_snapshots=false"%(self.url,"3e26e693-ee41-424a-915b-6fac499604a2", uuid))
request = self.xensession.get(url)print(request)
The error remains the same.
Earlier in my script I am able to interact with the XenAPI script by setting the NBD connections and those work fine. Are there any other methods for me to try and test or can anyone explain to me what I am doing wrong?
Question
Mauritz Swanepoel
Im busy implimenting a CBT backup and using the documentation as a guidance. I am now trying to export the VM metadata, but running into an error when trying to make the export_metadata call:
I am refering the following documentation:
https://github.com/xenserver/xs-cbt-samples/blob/master/cbt_vm_metadata_export.py#L15
https://developer-docs.citrix.com/projects/citrix-hypervisor-changed-block-tracking-guide/en/latest/getting-started/ (Point 2 optional)
My code is pretty simple:
I am returned a session is invalid error:
I realised that above the session ID is "OpaqueRef:{ID}" so figured maybe it's a malformed error. But even if hardcode the sessionID like this:
The error remains the same.
Earlier in my script I am able to interact with the XenAPI script by setting the NBD connections and those work fine. Are there any other methods for me to try and test or can anyone explain to me what I am doing wrong?
Link to comment
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now