+HostImpl* HostImpl::set_englobing_zone(routing::NetZoneImpl* englobing_zone)
+{
+ englobing_zone_ = englobing_zone;
+ return this;
+}
+
+std::vector<s4u::ActorPtr> HostImpl::get_all_actors()
+{
+ std::vector<s4u::ActorPtr> res;
+ for (auto& actor : actor_list_)
+ res.emplace_back(actor.get_ciface());
+ return res;
+}
+size_t HostImpl::get_actor_count() const
+{
+ return actor_list_.size();
+}
+
+std::vector<s4u::Disk*> HostImpl::get_disks() const
+{
+ std::vector<s4u::Disk*> disks;
+ for (auto const& [_, d] : disks_)
+ disks.push_back(d->get_iface());
+ return disks;
+}
+
+s4u::VirtualMachine* HostImpl::create_vm(const std::string& name, int core_amount, size_t ramsize)
+{
+ auto* host_vm = new kernel::resource::VirtualMachineImpl(name, get_iface(), core_amount, ramsize);
+ auto* vm = new s4u::VirtualMachine(host_vm);
+ host_vm->set_piface(vm);
+ return create_vm(name, vm);
+}
+
+s4u::VirtualMachine* HostImpl::create_vm(const std::string& name, s4u::VirtualMachine* vm)
+{
+ vms_[name] = vm->get_vm_impl();
+
+ // Create a VCPU for this VM
+ std::vector<double> speeds;
+ for (unsigned long i = 0; i < get_iface()->get_pstate_count(); i++)
+ speeds.push_back(get_iface()->get_pstate_speed(i));
+
+ auto* cpu =
+ englobing_zone_->get_cpu_vm_model()->create_cpu(vm, speeds)->set_core_count(vm->get_vm_impl()->get_core_amount());
+
+ if (get_iface()->get_pstate() != 0)
+ cpu->set_pstate(get_iface()->get_pstate());
+
+ cpu->seal();
+
+ /* Currently, a VM uses the network resource of its physical host */
+ vm->set_netpoint(get_iface()->get_netpoint());
+
+ vm->seal();
+
+ return vm;
+}
+
+void HostImpl::move_vm(VirtualMachineImpl* vm, HostImpl* destination)
+{
+ xbt_assert(vm && destination);
+
+ vms_.erase(vm->get_name());
+ destination->vms_[vm->get_name()] = vm;
+}
+
+void HostImpl::destroy_vm(const std::string& name)