middleware icon indicating copy to clipboard operation
middleware copied to clipboard

NAS-128903 / 24.10 / API call for vm.import_disk_image

Open kmoore134 opened this issue 1 year ago • 3 comments

Bar the gates. Hide the children. Cower in fear. Kris has gone and tried his hand at Python. Yes, you should be that afraid, here be :dragon:

This new disk_utils.py extension to our vm plugin provides an endpoint which can be used to convert and import a VM disk image (VMDK, QCOW2, VDI, etc) to a specified ZVOL for usage by a VM.

It takes two arguments, the local location of the VM disk image, and then the target zvol. In the background it runs qemu-img to do the conversion / copy. It reports progress along the way since the import may take a little while depending on image size, pool speeds, etc.

Special Thank you to @william-gr for a review of my noob Python code.

kmoore134 avatar May 10 '24 14:05 kmoore134

Jira URL: https://ixsystems.atlassian.net/browse/NAS-128903

bugclerk avatar May 10 '24 14:05 bugclerk

Jira URL: https://ixsystems.atlassian.net/browse/NAS-128903

bugclerk avatar May 10 '24 14:05 bugclerk

@themylogin need you to spot-check me on the lock= arguments in this PR. IIRC, we had weirdness when 2 methods share the same lock name and lock_queue_size=1.

yocalebo avatar May 14 '24 00:05 yocalebo

This PR has been merged and conversations have been locked. If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

bugclerk avatar May 17 '24 12:05 bugclerk