From 5b96e01f1ba3b0458539c1c920d0c1aab7d5968e Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 1 Jun 2020 18:03:45 -0700 Subject: [PATCH] clh: Clear the "PCIAddr" field while blk device hotplug We explicitly set "PCIAddr" to NULL, so that the "VirtPath" field can be used by the agent to create the container. Fixes: #2720 Signed-off-by: Bo Chen --- virtcontainers/clh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtcontainers/clh.go b/virtcontainers/clh.go index a0d7c7b722..cff907a3f6 100644 --- a/virtcontainers/clh.go +++ b/virtcontainers/clh.go @@ -412,6 +412,9 @@ func (clh *cloudHypervisor) hotplugBlockDevice(drive *config.BlockDrive) error { return openAPIClientError(err) } + //Explicitly set PCIAddr to NULL, so that VirtPath can be used + drive.PCIAddr = "" + if drive.Pmem { err = fmt.Errorf("pmem device hotplug not supported") } else {