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"
[VirtualMachineAttach] VM is not running in any host