clh: memory: remove pmem size argument

Pmem size now is calculated by the hypervisor. This is not required
anymore. Remove it to simplify the code.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Jose Carlos Venegas Munoz 2020-05-26 00:36:06 -07:00 committed by Peng Tao
parent 83891592c1
commit 54f12461db

View File

@ -271,14 +271,8 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
return errors.New("image path is empty")
}
st, err := os.Stat(imagePath)
if err != nil {
return fmt.Errorf("Failed to get information for image file '%v': %v", imagePath, err)
}
pmem := chclient.PmemConfig{
File: imagePath,
Size: st.Size(),
DiscardWrites: true,
}
clh.vmconfig.Pmem = append(clh.vmconfig.Pmem, pmem)