mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-26 03:29:02 +00:00
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:
parent
83891592c1
commit
54f12461db
@ -271,14 +271,8 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
|
|||||||
return errors.New("image path is empty")
|
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{
|
pmem := chclient.PmemConfig{
|
||||||
File: imagePath,
|
File: imagePath,
|
||||||
Size: st.Size(),
|
|
||||||
DiscardWrites: true,
|
DiscardWrites: true,
|
||||||
}
|
}
|
||||||
clh.vmconfig.Pmem = append(clh.vmconfig.Pmem, pmem)
|
clh.vmconfig.Pmem = append(clh.vmconfig.Pmem, pmem)
|
||||||
|
Loading…
Reference in New Issue
Block a user