rbd_cdrom.diff

Vladislav Gorbunov, 12/07/2013 12:03 PM

Download (1.53 KB)

View differences:

../opennebula-4.4.0/src/vmm/LibVirtDriverKVM.cc 2013-12-07 23:12:47.066999935 +1200
361 361
                 << "\t\t\t<source dev='" << vm->get_remote_system_dir()
362 362
                 << "/disk." << disk_id << "'/>" << endl;
363 363
        }
364
        else if ( type == "RBD" )
364
        else if ( type == "RBD" || type == "RBD_CDROM")
365 365
        {
366
            file << "\t\t<disk type='network' device='disk'>" << endl
367
                 << "\t\t\t<source protocol='rbd' name='"
366
            if ( type == "RBD" )
367
            {
368
                file << "\t\t<disk type='network' device='disk'>" << endl;
369
            }
370
            else 
371
            {
372
                file << "\t\t<disk type='network' device='cdrom'>" << endl;
373
            }
374
            file << "\t\t\t<source protocol='rbd' name='"
368 375
                 << source;
369 376

  
370 377
            if ( clone == "YES" )
......
413 420
                     << "\t\t\t</auth>" << endl;
414 421
            }
415 422
        }
416
        else if ( type == "RBD_CDROM" )
417
        {
418
            file << "\t\t<disk type='network' device='cdrom'>" << endl
419
                 << "\t\t\t<source protocol='rbd' name='"
420
                 << source;
421

  
422
            if ( clone == "YES" )
423
            {
424
                file << "-" << vm->get_oid() << "-" << disk_id;
425
            }
426

  
427
            file << "'/>" << endl;
428
        }
429 423
        else if ( type == "CDROM" )
430 424
        {
431 425
            file << "\t\t<disk type='file' device='cdrom'>" << endl