Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/preload-images/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func createImageTarball(tarballFilename, containerRuntime string) error {
dirs = append(dirs, "./lib/containers")
}

args := []string{"exec", profile, "sudo", "tar", "-I", "lz4", "-C", "/var", "-cf", tarballFilename}
args := []string{"exec", profile, "sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-cf", tarballFilename}
args = append(args, dirs...)
cmd := exec.Command("docker", args...)
cmd.Stdout = os.Stdout
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cruntime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func (r *Containerd) Preload(cc config.ClusterConfig) error {

t = time.Now()
// extract the tarball to /var in the VM
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
return errors.Wrapf(err, "extracting tarball: %s", rr.Output())
}
klog.Infof("Took %f seconds to extract the tarball", time.Since(t).Seconds())
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cruntime/crio.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func (r *CRIO) Preload(cc config.ClusterConfig) error {

t = time.Now()
// extract the tarball to /var in the VM
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
return errors.Wrapf(err, "extracting tarball: %s", rr.Output())
}
klog.Infof("Took %f seconds to extract the tarball", time.Since(t).Seconds())
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (r *Docker) Preload(cc config.ClusterConfig) error {
klog.Infof("Took %f seconds to copy over tarball", time.Since(t).Seconds())

// extract the tarball to /var in the VM
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
return errors.Wrapf(err, "extracting tarball: %s", rr.Output())
}

Expand Down