- 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());
-}
-
-VirtualMachine::~VirtualMachine()
-{
- on_destruction(*this);
-
- XBT_DEBUG("destroy %s", get_cname());
-
- /* FIXME: this is really strange that everything fails if the next line is removed.
- * This is as if we shared these data with the PM, which definitely should not be the case...
- *
- * We need to test that suspending a VM does not suspends the processes running on its PM, for example.
- * Or we need to simplify this code enough to make it actually readable (but this sounds harder than testing)
- */
- extension_set<simgrid::simix::Host>(nullptr);