Esempio n. 1
0
func NewQemuCluster(image string) (Cluster, error) {
	lc, err := local.NewLocalCluster()
	if err != nil {
		return nil, err
	}

	qc := &qemuCluster{
		LocalCluster: lc,
		machines:     make(map[string]*qemuMachine),
		image:        image,
	}
	return Cluster(qc), nil
}
Esempio n. 2
0
func NewQemuCluster(conf QEMUOptions) (Cluster, error) {
	lc, err := local.NewLocalCluster()
	if err != nil {
		return nil, err
	}

	qc := &qemuCluster{
		LocalCluster: lc,
		machines:     make(map[string]*qemuMachine),
		conf:         conf,
	}
	return Cluster(qc), nil
}
Esempio n. 3
0
// NewQemuCluster creates a Cluster instance, suitable for running virtual
// machines in QEMU.
func NewQemuCluster(conf QEMUOptions) (Cluster, error) {
	lc, err := local.NewLocalCluster()
	if err != nil {
		return nil, err
	}

	bc, err := newBaseCluster()
	if err != nil {
		return nil, err
	}

	qc := &QEMUCluster{
		baseCluster:  bc,
		conf:         conf,
		LocalCluster: lc,
	}

	return Cluster(qc), nil
}