func NewMinimalVMIWithNS(namespace, name string) *VirtualMachineInstance {
	precond.CheckNotEmpty(name)
	vmi := NewVMIReferenceFromNameWithNS(namespace, name)
	vmi.Spec = VirtualMachineInstanceSpec{Domain: DomainSpec{}}
	vmi.Spec.Domain.Resources.Requests = k8sv1.ResourceList{
		k8sv1.ResourceMemory: resource.MustParse("8192Ki"),
	}
	vmi.TypeMeta = k8smetav1.TypeMeta{
		APIVersion: GroupVersion.String(),
		Kind:       "VirtualMachineInstance",
	}
	return vmi
}
This is meant for testing
package v1
import (
	k8sv1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/resource"
	k8smetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"kubevirt.io/client-go/precond"
)
func NewMinimalVMI(name string) *VirtualMachineInstance {
	return NewMinimalVMIWithNS(k8sv1.NamespaceDefault, name)
}