oVirt / ovirt-engine-sdk-go

The generator of Go SDK for oVirt v4.0+
Apache License 2.0
19 stars 23 forks source link

ovirt go sdk cmdline problem #238

Closed nzubarev122 closed 3 years ago

nzubarev122 commented 3 years ago

Hello.

engine version 4.2.7.5-1.el7

ovirtsdk4 latest

I need help creating a virtual machine using https://github.com/oVirt/go-ovirt I need set cmdline vm , Please help me

my create vm configuration, but cmd not set

image.png

Vm( ovirtsdk4.NewVmBuilder(). Name(*name). Console( ovirtsdk4.NewConsoleBuilder(). Enabled(true). MustBuild()).

Memory(ram2 int64(1<<30)). MemoryPolicy( ovirtsdk4.NewMemoryPolicyBuilder(). Guaranteed(int64(ram2) int64(1<<30)). Max(int64(ram2) 2 int64(1<<30)). Ballooning(true). MustBuild()).

// Memory(int64(ram2) * int64(1<<30)).

Os( ovirtsdk4.NewOperatingSystemBuilder(). CustomKernelCmdline("qemu_cmdline").Cmdline("qemu_cmdline").Boot( ovirtsdk4.NewBootBuilder(). DevicesOfAny( ovirtsdk4.BOOTDEVICE_NETWORK, ovirtsdk4.BOOTDEVICE_HD). MustBuild()). MustBuild()).

HighAvailability( ovirtsdk4.NewHighAvailabilityBuilder(). Enabled(true). MustBuild()). Cpu( ovirtsdk4.NewCpuBuilder(). Topology( ovirtsdk4.NewCpuTopologyBuilder(). Cores(cpu2). Sockets(1). MustBuild()). MustBuild()). Cluster( ovirtsdk4.NewClusterBuilder(). Name(Cluster). MustBuild()). Template( ovirtsdk4.NewTemplateBuilder(). Name("Blank"). MustBuild()). MustBuild()). Send()

ghost commented 3 years ago

Closing this issue and continuing the conversation on ovirt/ovirt-site#2563.