Skip to content
Merged
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
5 changes: 2 additions & 3 deletions pkg/container/qemu_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func createMicroVM(ctx context.Context, cfg *Config) error {

if cfg.CacheDir != "" {
baseargs = append(baseargs, "-fsdev", "local,security_model=mapped,id=fsdev101,path="+cfg.CacheDir)
baseargs = append(baseargs, "-device", "virtio-9p-pci,id=fs101,fsdev=fsdev101,mount_tag="+cfg.CacheDir)
baseargs = append(baseargs, "-device", "virtio-9p-pci,id=fs101,fsdev=fsdev101,mount_tag=melange_cache")
}

// if no size is specified, let's go for a default
Expand Down Expand Up @@ -792,13 +792,12 @@ func createMicroVM(ctx context.Context, cfg *Config) error {
if cfg.CacheDir != "" {
clog.FromContext(ctx).Infof("qemu: setting up melange cachedir: %s", cfg.CacheDir)
setupMountCommand := fmt.Sprintf(
"mkdir -p %s %s /mount/upper /mount/work && mount -t 9p %s %s && "+
"mkdir -p %s %s /mount/upper /mount/work && mount -t 9p melange_cache %s && "+
"mount -t overlay overlay -o lowerdir=%s,upperdir=/mount/upper,workdir=/mount/work %s",
cfg.CacheDir,
filepath.Join("/mount", DefaultCacheDir),
cfg.CacheDir,
cfg.CacheDir,
cfg.CacheDir,
filepath.Join("/mount", DefaultCacheDir),
)
if setupMountCommand != ": " {
Expand Down