Skip to content

Commit

Permalink
katautils: disable template when vsock enabled
Browse files Browse the repository at this point in the history
Vsock conflicts with factory, when both of them are enabled,
kata will try to create a new vm template which is useless,
thus it's better to disable template to save a lot of time.

Fixes: kata-containers#1055

Signed-off-by: fupan <lifupan@gmail.com>
  • Loading branch information
lifupan committed Dec 19, 2018
1 parent bcf995b commit 9915d0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/katautils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,14 @@ func updateConfig(configPath string, tomlConf tomlConfig, config *oci.RuntimeCon
return err
}

// vsock conflicts with factory, when both of them are enabled, kata will try
// to create a new vm template which is useless, thus it's better to disable
// template to save a lot of time.
if config.HypervisorConfig.UseVSock && config.FactoryConfig.Template {
kataUtilsLogger.Warn("vsock conflicts with factory, configure to not use it")
config.FactoryConfig.Template = false
}

if builtIn {
config.ProxyType = vc.KataBuiltInProxyType
config.ShimType = vc.KataBuiltInShimType
Expand Down

0 comments on commit 9915d0e

Please # to comment.