diff --git a/pkg/compute/models/guests.go b/pkg/compute/models/guests.go index 529f4cfa97..827d1aea84 100644 --- a/pkg/compute/models/guests.go +++ b/pkg/compute/models/guests.go @@ -4263,7 +4263,7 @@ func (self *SGuest) GetDeployConfigOnHost(ctx context.Context, userCred mcclient } func (self *SGuest) getVga() string { - if utils.IsInStringArray(self.Vga, []string{"cirrus", "vmware", "qxl"}) { + if utils.IsInStringArray(self.Vga, []string{"cirrus", "vmware", "qxl", "virtio", "std"}) { return self.Vga } return "std" diff --git a/pkg/mcclient/options/compute/servers.go b/pkg/mcclient/options/compute/servers.go index d740610232..788c1371bf 100644 --- a/pkg/mcclient/options/compute/servers.go +++ b/pkg/mcclient/options/compute/servers.go @@ -400,7 +400,7 @@ type ServerCreateOptionalOptions struct { Iso string `help:"ISO image ID" metavar:"IMAGE_ID" json:"cdrom"` VcpuCount int `help:"#CPU cores of VM server, default 1" default:"1" metavar:"" json:"vcpu_count" token:"ncpu"` InstanceType string `help:"instance flavor"` - Vga string `help:"VGA driver" choices:"std|vmware|cirrus|qxl"` + Vga string `help:"VGA driver" choices:"std|vmware|cirrus|qxl|virtio"` Vdi string `help:"VDI protocool" choices:"vnc|spice"` Bios string `help:"BIOS" choices:"BIOS|UEFI"` Machine string `help:"Machine type" choices:"pc|q35"` @@ -625,7 +625,7 @@ type ServerUpdateOptions struct { Name string `help:"New name to change"` Vmem string `help:"Memory size" json:"vmem_size"` Ncpu *int `help:"CPU count" json:"vcpu_count"` - Vga string `help:"VGA driver" choices:"std|vmware|cirrus|qxl"` + Vga string `help:"VGA driver" choices:"std|vmware|cirrus|qxl|virtio"` Vdi string `help:"VDI protocol" choices:"vnc|spice"` Bios string `help:"BIOS" choices:"BIOS|UEFI"` Desc string `help:"Description" json:"description"`