clh: Clear the "PCIAddr" field while blk device hotplug

[ port from runtime commit 5b96e01f1ba3b0458539c1c920d0c1aab7d5968e ]

We explicitly set "PCIAddr" to NULL, so that the "VirtPath" field can be
used by the agent to create the container.

Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Bo Chen 2020-06-29 20:57:04 -07:00 committed by Peng Tao
parent 2d6c0731eb
commit 6da49a0418

View File

@ -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 {