func Stop(uuid string) error {
	disconnectedCh := make(chan struct{})
	cfg := qemu.QMPConfig{}
	q, _, err := qemu.QMPStart(context.Background(), fmt.Sprintf("/tmp/qmp-%s", uuid), cfg, disconnectedCh)
	if err != nil {
		return fmt.Errorf("%v", err)
	}
	err = q.ExecuteQMPCapabilities(context.Background())
	if err != nil {
		return fmt.Errorf("%v", err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	err = q.ExecuteSystemPowerdown(ctx)
	cancel()
	if err != nil {
		err = q.ExecuteQuit(context.Background())
		if err != nil {
			return fmt.Errorf("%v", err)
		}
	}
	q.Shutdown()
	err = os.Remove(fmt.Sprintf("/tmp/qmp-%s", uuid))
	if err != nil {
		return fmt.Errorf("%v", err)
	}
	return nil
}
Stop will allow us to stop a VM
package vmm
import (
	"fmt"
	"math/rand"
	"os"
	"os/exec"
	"time"
	log "github.com/sirupsen/logrus"
	"context"
	"github.com/intel/govmm/qemu"
)
func Start(mac, uuid, nicPrefix string, foreground, vnc bool) error {
	var vncPort int
	params := make([]string, 0, 32)
	params = append(params, "-drive", fmt.Sprintf("file=%s.qcow2,aio=threads,format=qcow2", uuid))
	net := fmt.Sprintf("tap,model=virtio-net-pci,mac=%s,ifname=%s-%s", mac, nicPrefix, uuid)
	params = append(params, "-nic", net)
	params = append(params, "-enable-kvm", "-cpu", "host")
	params = append(params, "-m", "4096", "-display", "none")
	if foreground {
		params = append(params, "-curses")
		return foreGroundRunner(params)
	}
	if vnc {
		vncPort = vncPortGenerator()
		params = append(params, "-vnc", fmt.Sprintf(":%d", vncPort))
	}
	params = append(params, "-daemonize", "-qmp", fmt.Sprintf("unix:/tmp/qmp-%s,server,nowait", uuid))
	details, err := qemu.LaunchCustomQemu(context.Background(), "", params, nil, nil, nil)
	if err != nil {
		return fmt.Errorf("%v", details)
	}
	fmt.Printf("Network Device:\t%s-%s\nVM MAC Address:\t%s\nVM UUID:\t%s\n", nicPrefix, uuid, mac, uuid)
	if vnc {
		fmt.Printf("VNC Port:\t%d\n", (vncPort + 5900))
	}
	return nil
}