Community
 
 
 

CloudPlatform 4.x

팔로워 284명
 
Avatar
Pankaj Paliwal

How to associate Snapshots and ISOs with specific VM

Avatar

How to associate Snapshots and ISOs with specific VM

Hi all,

 

I am working on a program to create a billing report for cloudstack.  The way that the company wants to bill customers has me trying to find a way to associate snapshots and ISO's with individual VM's (rather than just the customer's account) using the usage data that I obtain through API calls.  Does anyone know how to do this?  Is it possible?  

 

Thanks :-)

Robert 


Robert Banta MEMBERS
댓글 4개
0

댓글을 남기려면 로그인하세요.

 
 

Previous 댓글 4개

Avatar
Pankaj Paliwal
Avatar

How to associate Snapshots and ISOs with specific VM

I messed up when I asked my question.  I can associate the snapshots with individual VM's no problem because the VM id is in the usage table.  It is the ISO's where I am having a hard time doing this.  My snapshot issue is that I need a way to differentiate between VM snapshots and system volume snapshots.  Can anyone help with either of these problems?

 

Thanks,

Robert


Robert Banta MEMBERS
댓글 작업 고유 링크
Avatar
Pankaj Paliwal
Avatar

Hello Robert,

 

The VM snapshots are stored in vm_snapshots table while volume snaps are in snapshots. Did that help any how? May be a little more description of the requirement would help us to come up with a possible recommendation.

 

Regards,

 

Abhisek


Abhisek Basu CITRIX EMPLOYEES
댓글 작업 고유 링크
Avatar
Pankaj Paliwal
Avatar

Abhisek,

 

Thank you for the reply.  That helps a lot as far as my understanding of the system goes, but my goal at this point is to accomplish everything through the API calls rather than directly querying the DB.  The requirements are essentially as follows:

  • I need to be able to count the number of VM snapshots per day
  • I need to be able to do the same for volume snapshots
  • I need to be able to differentiate between the system volume SS and any additional volume SS
  • I need to be able to associate any attached ISOs with the VM they are attached to (the usage data I obtain through the API calls seems to only associate them with the account)

Perhaps it may be time for me to give up on the usage records and just go directly at the database.  Let me know if you have any further thoughts.  I appreciate the help.

 

- Robert


Robert Banta MEMBERS
댓글 작업 고유 링크
Avatar
Pankaj Paliwal
Avatar

I don't think Usage data will give you what you want, at lease the mapping of attached ISOs to VMs. You may be able to iterate through the list of VMs and see what has attached ISO, but that is going to be point in time so some activity is likely to be missed for billing purposes.

 

--Mike@Redapt


Michael Little MEMBERS
댓글 작업 고유 링크

Top Contributors