Get the reference to the "vms" service:
Use the "add" method to create a new virtual machine:
# Get the reference to the "vms" service:
vms_service = connection.system_service.vms_service
# Use the "add" method to create a new virtual machine:
vms_service.add(
OvirtSDK4::Vm.new(
name: 'myvm',
cluster: {
name: 'mycluster'
},
template: {
name: 'Blank'
}
)
)
Copy to ClipboardCopied!Toggle word wrapToggle overflow