Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move some content out of HostImpl (into VirtualMachineImpl)
[simgrid.git] / src / surf / VirtualMachineImpl.cpp
index 8ad7f58..fbf47e5 100644 (file)
@@ -124,6 +124,9 @@ VirtualMachineImpl::VirtualMachineImpl(simgrid::s4u::Host* piface, simgrid::s4u:
   /* FIXME: TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
   action_ = sub_cpu->execution_start(0);
 
+  /* Initialize the VM parameters */
+  params_.ramsize = 0;
+
   XBT_VERB("Create VM(%s)@PM(%s) with %ld mounted disks", piface->name().c_str(), hostPM_->name().c_str(),
            xbt_dynar_length(storage_));
 }
@@ -225,5 +228,16 @@ void VirtualMachineImpl::setBound(double bound)
 {
   action_->setBound(bound);
 }
+
+void VirtualMachineImpl::getParams(vm_params_t params)
+{
+  *params = params_;
+}
+
+void VirtualMachineImpl::setParams(vm_params_t params)
+{
+  /* may check something here. */
+  params_ = *params;
+}
 }
 }