Revision 80dcae51

View differences:

include/Nebula.h
244 244
    };
245 245

  
246 246
    /**
247
     *  Returns the default vms location. When ONE_LOCATION is defined this path
248
     *  points to $ONE_LOCATION/var/vms, otherwise it is /var/lib/one/vms. This
249
     *  location stores vm related files: deployment, transfer, context, and
250
     *  logs (in self-contained mode only)
251
     *      @return the vms location.
252
     */
253
    const string& get_vms_location()
254
    {
255
        return vms_location;
256
    };
257

  
258
    /**
247 259
     *  Returns the path of the log file for a VM, depending where OpenNebula is
248 260
     *  installed,
249 261
     *     $ONE_LOCATION/var/$VM_ID/vm.log
......
261 273
    	}
262 274
    	else
263 275
    	{
264
    		oss << nebula_location << "var/" << oid << "/vm.log";
276
    		oss << vms_location << oid << "/vm.log";
265 277
    	}
266 278

  
267 279
    	return oss.str();
......
315 327
            var_location     = "/var/lib/one/";
316 328
            remotes_location = "/var/lib/one/remotes/";
317 329
            ds_location      = "/var/lib/one/datastores/";
330
            vms_location     = "/var/lib/one/vms/";
318 331
        }
319 332
        else
320 333
        {
......
331 344
            var_location     = nebula_location + "var/";
332 345
            remotes_location = nebula_location + "var/remotes/";
333 346
            ds_location      = nebula_location + "var/datastores/";
347
            vms_location     = nebula_location + "var/vms/";
334 348
        }
335 349
    };
336 350

  
......
380 394
        {
381 395
            delete clpool;
382 396
        }
383
        
397

  
384 398
        if ( docpool != 0)
385 399
        {
386 400
            delete docpool;
......
464 478
    string  hook_location;
465 479
    string  remotes_location;
466 480
    string  ds_location;
481
    string  vms_location;
467 482

  
468 483
    string	hostname;
469 484

  
include/VirtualMachine.h
381 381

  
382 382
    /**
383 383
     *  Returns the transfer filename. The transfer file is in the form:
384
     *          $ONE_LOCATION/var/$VM_ID/transfer.$SEQ
384
     *          $ONE_LOCATION/var/vms/$VM_ID/transfer.$SEQ
385 385
     *  or, in case that OpenNebula is installed in root
386
     *          /var/lib/one/$VM_ID/transfer.$SEQ
386
     *          /var/lib/one/vms/$VM_ID/transfer.$SEQ
387 387
     *  The hasHistory() function MUST be called before this one.
388 388
     *    @return the transfer filename
389 389
     */
......
394 394

  
395 395
    /**
396 396
     *  Returns the deployment filename. The deployment file is in the form:
397
     *          $ONE_LOCATION/var/$VM_ID/deployment.$SEQ
397
     *          $ONE_LOCATION/var/vms/$VM_ID/deployment.$SEQ
398 398
     *  or, in case that OpenNebula is installed in root
399
     *          /var/lib/one/$VM_ID/deployment.$SEQ
399
     *          /var/lib/one/vms/$VM_ID/deployment.$SEQ
400 400
     *  The hasHistory() function MUST be called before this one.
401 401
     *    @return the deployment filename
402 402
     */
......
407 407

  
408 408
    /**
409 409
     *  Returns the context filename. The context file is in the form:
410
     *          $ONE_LOCATION/var/$VM_ID/context.sh
410
     *          $ONE_LOCATION/var/vms/$VM_ID/context.sh
411 411
     *  or, in case that OpenNebula is installed in root
412
     *          /var/lib/one/$VM_ID/context.sh
412
     *          /var/lib/one/vms/$VM_ID/context.sh
413 413
     *  The hasHistory() function MUST be called before this one.
414 414
     *    @return the deployment filename
415 415
     */
......
420 420

  
421 421
    /**
422 422
     *  Returns the remote deployment filename. The file is in the form:
423
     *          $VM_DIR/$VM_ID/images/deployment.$SEQ
423
     *          $DS_LOCATION/$SYSTEM_DS/$VM_ID/deployment.$SEQ
424 424
     *  The hasHistory() function MUST be called before this one.
425 425
     *    @return the deployment filename
426 426
     */
......
432 432
    /**
433 433
     *  Returns the checkpoint filename for the current host. The checkpoint file
434 434
     *  is in the form:
435
     *          $VM_DIR/$VM_ID/images/checkpoint
435
     *          $DS_LOCATION/$SYSTEM_DS/$VM_ID/checkpoint
436 436
     *  The hasHistory() function MUST be called before this one.
437 437
     *    @return the checkpoint filename
438 438
     */
src/vm/History.cc
107 107

  
108 108
    // ----------- Local Locations ------------
109 109
    os.str("");
110
    os << nd.get_var_location() << oid;
110
    os << nd.get_vms_location() << oid;
111 111

  
112 112
    vm_lhome = os.str();
113 113

  
src/vm/VirtualMachine.cc
171 171
    //Create support directories for this VM
172 172
    //--------------------------------------------------------------------------
173 173
    oss.str("");
174
    oss << nd.get_var_location() << oid;
174
    oss << nd.get_vms_location() << oid;
175 175

  
176 176
    mkdir(oss.str().c_str(), 0700);
177 177
    chmod(oss.str().c_str(), 0700);

Also available in: Unified diff