func (m *MigrationWorkspace) ensureProfileZeroTwo(p *api.Profile) bool {
	if p.Config[cfgSchema] == zeroOne {
		p.Config[cfgIsCRI] = p.Config[cfgOldIsSandbox]
		p.Config[cfgSchema] = zeroTwo
		return true
	}
	return false
}
user.is_cri_sandbox has moved to user.cri
package lxf  
import (
	"strconv"
	"time"
	"github.com/lxc/lxd/shared/api"
)
const (
	cfgSchema              = "user.lxe.schema"
	SchemaVersionProfile   = zeroThree
	SchemaVersionContainer = zeroFive
	cfgOldIsSandbox     = "user.is_cri_sandbox"
	cfgOldIsContainer   = "user.is_cri_container"
	cfgOldContainerName = "user.containerName"
	zeroOne   = "0.1"
	zeroTwo   = "0.2"
	zeroThree = "0.3"
	zeroFour  = "0.4"
	zeroFive  = "0.5"
)
type MigrationWorkspace struct {
	lxf *client
}
func NewMigrationWorkspace(l Client) *MigrationWorkspace {
	return &MigrationWorkspace{
		lxf: l.(*client),
	}
}
func IsSchemaCurrent(i interface{}) bool {
	var (
		val string
		has bool
	)
	switch o := i.(type) {
	case api.Container:
		if val, has = o.Config[cfgSchema]; !has {
			return false
		}
		return val == SchemaVersionContainer
	case *api.Container:
		return IsSchemaCurrent(*o)
	case api.Profile:
		if val, has = o.Config[cfgSchema]; !has {
			return false
		}
		return val == SchemaVersionProfile
	case *api.Profile:
		return IsSchemaCurrent(*o)
	default:
		return false
	}
}
func (m *MigrationWorkspace) Ensure() error {  
	profiles, err := m.lxf.server.GetProfiles()
	if err != nil {
		return err
	}
	anyChanges := false
	for k := range profiles {
		p := &profiles[k]
		if p.Config[cfgIsCRI] == "" && p.Config[cfgOldIsSandbox] == "" {
			continue
		}
		counter := 0
		if m.ensureProfileZeroOne(p) {
			counter++
		}
		if m.ensureProfileZeroTwo(p) {
			counter++
		}
		if m.ensureProfileZeroThree(p) {
			counter++
		}
		if counter > 0 {
			anyChanges = true
			err = m.lxf.server.UpdateProfile(p.Name, p.Writable(), "")
			if err != nil {
				return err
			}
		}
	}
	var etag string
	containers, err := m.lxf.server.GetContainers()
	if err != nil {
		return err
	}
	for k := range containers {
		c := &containers[k]
		if c.Config[cfgIsCRI] == "" && c.Config[cfgOldIsContainer] == "" {
			continue
		}
		counter := 0
		if m.ensureContainerZeroOne(c) {
			counter++
		}
		if m.ensureContainerZeroTwo(c) {
			counter++
		}
		if m.ensureContainerZeroThree(c) {
			counter++
		}
		if m.ensureContainerZeroFour(c) {
			counter++
		}
		if m.ensureContainerZeroFive(c) {
			counter++
		}
		if counter > 0 {
			anyChanges = true
			err := m.lxf.opwait.UpdateContainer(c.Name, c.Writable(), etag)
			if err != nil {
				return err
			}
		}
	}
	if anyChanges {
		log.Warn("Migration changes applied successfully")
	}
	return nil
}
func (m *MigrationWorkspace) ensureProfileZeroOne(p *api.Profile) bool {
	if p.Config[cfgSchema] == "" {
		p.Config[cfgMetaUID] = p.Name
		p.Config[cfgSchema] = zeroOne
		return true
	}
	return false
}