feat(region): add virtio vga type support (#14785)

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>

Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
wanyaoqi
2022-08-11 18:00:17 +08:00
committed by GitHub
parent 5b26125806
commit 82d5be2096
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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"
+2 -2
View File
@@ -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:"<SERVER_CPU_COUNT>" 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"`