i’m writing a migration utility to handle a very specific scenario. it basically needs to look up vm IDs, image IDs, and create a new image (basically a clone of the old) on a different data store, and a few other things. the open nebula rubygem docs are pretty sparse. are there other examples available aside from the ones on the api page? it looks like it should be possible to query the OpenNebula::VirtualMachinePool object with arguments to find a specific vm, but it’s not clear to me what args you can pass.
when prototyping this in irb, most of it works. when setting up a pool object and trying to do anything with it in my wrapper methods, no such luck. here’s an example of what i’m doing. migrator.rb · GitHub
i’m missing something. maybe it’s obvious or something on my end. more examples and documentation would be most helpful.
this looks like what i want. search for just the vm in the pool and don’t have to grab all of them to filter later. but what’s the query format? unless it’s defined somewhere else, i don’t see any details about what query expects. and does it even work?
related, but off topic, does the terraform image clone actually copy anything, or is it more of a book-keeping action where it updates the open nebula database to reflect the new image/location?
i may just end up doing this all in terraform vs. trying to write a specific tool for this.