File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2929#include "ch_monitor.h"
3030#include "ch_process.h"
3131#include "ch_cgroup.h"
32+ #include "ch_hostdev.h"
3233#include "virnuma.h"
3334#include "viralloc.h"
3435#include "virerror.h"
@@ -699,6 +700,11 @@ int virCHProcessStart(virCHDriverPtr driver,
699700 if (chProcessNetworkPrepareDevices (driver , vm ) < 0 )
700701 goto cleanup ;
701702
703+ VIR_DEBUG ("Preparing host devices" );
704+ if (chHostdevPrepareDomainDevices (driver , vm -> def ,
705+ VIR_HOSTDEV_COLD_BOOT ) < 0 )
706+ goto cleanup ;
707+
702708 if (!priv -> monitor ) {
703709 /* And we can get the first monitor connection now too */
704710 if (!(priv -> monitor = virCHProcessConnectMonitor (driver , vm ))) {
@@ -775,6 +781,8 @@ int virCHProcessStop(virCHDriverPtr driver G_GNUC_UNUSED,
775781 priv -> monitor = NULL ;
776782 }
777783
784+ chHostdevReAttachDomainDevices (driver , vm -> def );
785+
778786retry :
779787 if ((ret = chRemoveCgroup (vm )) < 0 ) {
780788 if (ret == - EBUSY && (retries ++ < 5 )) {
You can’t perform that action at this time.
0 commit comments