lxd/container.go
func containerCreateAsEmpty(d *Daemon, args db.ContainerArgs) (container, error) {
	// Create the container
	c, err := containerCreateInternal(d.State(), args)
	if err != nil {
		return nil, err
	}

	// Now create the empty storage
	err = c.Storage().ContainerCreate(c)
	if err != nil {
		c.Delete()
		return nil, err
	}

	// Apply any post-storage configuration
	err = containerConfigureInternal(c)
	if err != nil {
		c.Delete()
		return nil, err
	}

	return c, nil
}
func containerCreateAsEmpty(d *Daemon, args db.ContainerArgs) (container, error) {
	// Create the container
	c, err := containerCreateInternal(d.State(), args)
	if err != nil {
		return nil, err
	}

	// Now create the empty storage
	err = c.Storage().ContainerCreate(c)
	if err != nil {
		c.Delete()
		return nil, err
	}

	// Apply any post-storage configuration
	err = containerConfigureInternal(c)
	if err != nil {
		c.Delete()
		return nil, err
	}

	return c, nil
}
func containerCreateAsEmpty ( d * Daemon , args db . ContainerArgs ) ( container , error ) { // Create the container c , err := containerCreateInternal ( d . State ( ) , args ) if err != nil { return nil , err } // Now create the empty storage err = c . Storage ( ) . ContainerCreate ( c ) if err != nil { c . Delete ( ) return nil , err } // Apply any post-storage configuration err = containerConfigureInternal ( c ) if err != nil { c . Delete ( ) return nil , err } return c , nil }
// Loader functions
Loader functions