The DeployVMCmd.java file has a 'create' and an 'execute' method. The
create method is responsible for registering the VM and persisting it
in the database, the logical creation. The 'execute' starts the vm, if
the API call requires it. It calls the
userVmService.startVirtualMachine, which I think is also called when
existing VMs are stopped/started.

    public void execute(){
        UserVm result;

        if (getStartVm()) {
            try {
                UserContext.current().setEventDetails("Vm Id: "+getEntityId());
                result = _userVmService.startVirtualMachine(this);


In general with the async calls I believe that the create() method is
completed before the job is returned (sync), and the execute() method
is the async part.

On Mon, Apr 7, 2014 at 10:21 AM, Matt Spurlin <matt.spur...@appcore.com> wrote:
> I have been looking at the code trying to figure out where the API
> call "deployVirtualMachine"
> would send the command to a KVM hypervisor to create a new virtual machine.
> I've found where the API call happens, but so far I have not seen where the
> logic is that sends the command to the hypervisor to create the VM. Would
> anyone be kind enough to point me in the right direction for what files I
> need to look at?
> Thank you for your time,
> Matt

Reply via email to