Hi,
For a VM update you can try to use this example and change what is necessary that you wish to update:
https://github.com/oVirt/ovirt-engine-sdk/blob/5dfd8af72f79c906eea54cec3defc8ef162166b1/sdk/examples/set_vm_serial_number.py

Regards,
Liran.

On Sun, Mar 29, 2020 at 4:30 PM zhouhao@vip.friendtimes.net <zhouhao@vip.friendtimes.net> wrote:
Dear ALL
    Is there anyone know how to update the VM's configue through the ovirtsdk4?
    The examples in the github review below,I have no idea to modify the vm's configure through the sdk.
  
add_affinity_label.pyAdd examples of how to work with affinity labels3 years ago
add_bond.pyAdd bonding example3 years ago
add_cluster.pyUse Python logging4 years ago
add_data_center.pyUse Python logging4 years ago
add_fence_agent.pyAdd fence agent example2 years ago
add_floating_disk.pyClarify the units of `provisioned_size`3 years ago
add_group.pyAlign names of objects with 'my*' convention2 years ago
add_host.pyUse Python logging4 years ago
add_independet_vm.pyAdd execution permissions to examples4 years ago
add_instance_type.pyAdd example showing how to create a instance type3 years ago
add_iscsi_data_storage_domain.pyAlign names of objects with 'my*' convention2 years ago
add_logical_network.pyAlign names of objects with 'my*' convention2 years ago
add_lun_disk_to_vm.pyAdd example how to attach LUN disk to VM3 years ago
add_mac_pool.pyAdd example of how to add a MAC address pool4 years ago
add_nfs_data_storage_domain.pyUse Python logging4 years ago
add_nfs_iso_storage_domain.pyUse Python logging4 years ago
add_openstack_image_provider.pyImprove example showing how to add a Glance storage domain3 years ago
add_role.pyAlign names of objects with 'my*' convention2 years ago
add_tag.pyAdd examples of how to work with tags3 years ago
add_template.pyAdd create template example3 years ago
add_user_ssh_public_key.pyAdd example of how to add a public SSH key to a user3 years ago
add_vm.pyUse Python logging4 years ago
add_vm_disk.pyUse DiskAttachment.active explicitly3 years ago
add_vm_from_template_version.pyAdd example how to specify storage of disks of vm3 years ago
add_vm_nic.pyUse Python logging4 years ago
add_vm_pool.pyAdd VM pool create example3 years ago
add_vm_snapshot.pyUse Python logging4 years ago
add_vm_with_sysprep.pyAdd Sysprep example3 years ago
add_vnc_console.pyAdd VNC console example3 years ago
assign_affinity_label_to_vm.pyAdd examples of how to work with affinity labels3 years ago
assign_network_to_cluster.pyAlign names of objects with 'my*' convention2 years ago
assign_permission.pyAdd execution permissions to examples4 years ago
assign_permission_to_vms.pyAdd example of assigning permissions to VMs2 years ago
assign_tag_to_vm.pyAdd examples of how to work with tags3 years ago
asynchronous_inventory.pyFix permissions of examples3 years ago
attach_nfs_data_storage_domain.pyUse Python logging4 years ago
attach_nfs_iso_storage_domain.pyUse Python logging4 years ago
change_vm_cd.pyAdd example of changing VM CD4 years ago
clone_vm_from_snapshot.pyAdd clone VM from snapshot example3 years ago
connection_builder.pyUse Python logging4 years ago
deactivate_disk_attachment.pyDeactivate Vm's disk attachment example3 years ago
disable_compression.pyEnable HTTP compression by default4 years ago
download_disk.pyDon't extend image transfer when downloading a disk2 years ago
download_disk_snapshots.pyAlign names of objects with 'my*' convention2 years ago
download_vm_ovf.pyAdd execution bit for examples2 years ago
enable_serial_console.pyAdd example showing how to enable serial console4 years ago
export_template.pyexamples: export template to an export domain2 years ago
export_template_as_ova.pyexamples: add export template as OVA2 years ago
export_vm.pyexamples: improve documentation of export vm to export domain2 years ago
export_vm_as_ova.pychmod +x sdk/examples/export_vm_as_ova.py2 years ago
extend_disk.pyAdd Example to extend disk size2 years ago
fix_dup_nic_macs.pyexamples: Introduce example to fix duplicate macs.2 years ago
follow_vm_links.pyUse Python logging4 years ago
get_display_ticket.pyAdd console ticket example3 years ago
import_glance_image.pyAdd import Glance image example3 years ago
import_vm.pyFix permissions of examples3 years ago
import_vm_from_ova.pyExamples of external VM import3 years ago
import_vm_from_vmware.pyExamples of external VM import3 years ago
list_affinity_labels.pyAdd examples of how to work with affinity labels3 years ago
list_glance_images.pyAdd example showing how to list Glance images3 years ago
list_host_statistics.pyAdd example that list host statistics3 years ago
list_roles.pyAdd example showing how to list system roles3 years ago
list_tags.pyAdd examples of how to work with tags3 years ago
list_tags_of_vm.pyAdd examples of how to work with tags3 years ago
list_vm_disks.pyClarify that DiskAttachment.disk is only a link4 years ago
list_vm_snapshots.pyAdd example that lists VM snapshots3 years ago
list_vms.pyUse Python logging4 years ago
page_vms.pyUse Python logging4 years ago
pin_vm.pyAdd pin VM example3 years ago
poll_events.pyAdd event poll example3 years ago
print_vm_mac_duplicates.pyAdd example which print duplicated MAC address2 years ago
register_vm.pyAdd example of virtual machine registration3 years ago
remove_host.pyUse Python logging4 years ago
remove_tag.pyAdd examples of how to work with tags3 years ago
remove_vm.pyUse Python logging4 years ago
search_vms.pyUse Python logging4 years ago
set_vm_lease_storage_domain.pyAdd VM lease example3 years ago
set_vm_serial_number.pyUse Python logging4 years ago
show_summary.pyUse Python logging4 years ago
sparsify_disk.pyFix permissions of examples3 years ago
start_vm.pyUse Python logging4 years ago
start_vm_with_boot_devices.pyFix permissions of examples3 years ago
start_vm_with_cloud_init.pyUpdate cloud-init example with custom script3 years ago
stop_vm.pyUse Python logging4 years ago
test_connection.pyUse Python logging4 years ago
unassign_tag_to_vm.pyAdd examples of how to work with tags3 years ago
update_data_center.pyUse Python logging4 years ago
update_fencing_options.pyAdd example of how to change fencing option3 years ago
update_quota_limits.pyAdd quota limit update example3 years ago
upgrade_host.pyAdd upgrade host example2 years ago
upload_disk.pyEnsure transfer.transfer_url is not None.2 years ago
upload_disk_snapshots.pyAlign names of objects with 'my*' convention2 years ago
upload_ova_as_template.pyexamples: upload ova as a virtual machine template2 years ago
upload_ova_as_vm.pyEnhance the example of uploading OVA2 years ago
vm_backup.py


An other question:   How to get the cpu cores from the vm-template



_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/JXLSLJ7MGFJVS3QPHGL66TBQJ3YD2LR2/