- pimpl_netpoint = pm->pimpl_netpoint;
- // Create a VCPU for this VM
- surf::CpuCas01* sub_cpu = dynamic_cast<surf::CpuCas01*>(pm->pimpl_cpu);
-
- pimpl_cpu = surf_cpu_model_vm->createCpu(this, sub_cpu->getSpeedPeakList(), coreAmount);
- if (sub_cpu->getPState() != 0)
- pimpl_cpu->setPState(sub_cpu->getPState());
-
- /* Make a process container */
- extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
-
- if (TRACE_vm_is_enabled()) {
- container_t host_container = instr::Container::byName(pm->getName());
- new instr::Container(name, "MSG_VM", host_container);
- instr::Container::byName(getName())->getState("MSG_VM_STATE")->addEntityValue("start", "0 0 1"); // start is blue
- instr::Container::byName(getName())->getState("MSG_VM_STATE")->addEntityValue("suspend", "1 0 0"); // suspend is red
- }
-}
-
-VirtualMachine::~VirtualMachine()
-{
- onDestruction(*this);