I have a CREATE VM hook that gets the template data and based on User templates and VM template it creates an DATABLOCK image, and uploads it to Opennebula. I have the VM ID and IMAGE ID (In ready state), and I want to add it to the VM before it boots.
I have tried:
onevm disk-attach "$VMID" --image "$IMAGEID"
and get
[VirtualMachineAttach] VM is not running in any host
Thanks Jaime, I got this working, my next question is, is there a way to get the total number of nic cards attached to a VM using Hooks? Someting like: