emulator_in_template.diff

Vladislav Gorbunov, 01/21/2015 12:53 AM

Download (1.34 KB)

View differences:

/var/lib/one/tmp/LibVirtDriverKVM.cc 2015-01-21 09:46:40.672000113 +1000
370 370
    // ------------------------------------------------------------------------
371 371
    file << "\t<devices>" << endl;
372 372

  
373
    get_default("EMULATOR",emulator_path);
374

  
375
    if(emulator_path.empty())
373
    vm->get_template_attribute("EMULATOR", emulator_path);
374
    if (emulator_path.empty())
376 375
    {
377
        emulator_path = "/usr/bin/kvm";
376
        get_default("EMULATOR",emulator_path);
377
        if(emulator_path.empty())
378
        {
379
            emulator_path = "/usr/bin/kvm";
380
        }
378 381
    }
379 382

  
380 383
    file << "\t\t<emulator>" << emulator_path << "</emulator>" << endl;
381
-- opennebula-4.10.1/src/vm/VirtualMachine.cc	2014-11-20 01:19:09.000000000 +1000
384
++ /var/lib/one/tmp/VirtualMachine.cc	2015-01-21 09:41:19.914000114 +1000
......
326 326
        obj_template->add("VCPU", ivalue);
327 327
    }
328 328

  
329
    user_obj_template->get("EMULATOR", value);
330

  
331
    if ( value.empty() == false )
332
    {
333
        user_obj_template->erase("EMULATOR");
334
        obj_template->add("EMULATOR", value);
335
    }
329 336
    // ------------------------------------------------------------------------
330 337
    // Check the OS attribute
331 338
    // ------------------------------------------------------------------------