Patent ID: 8694685

Claim:
A method for migrating virtual machine images, the method comprising: dividing, by a data processing system, an image for a virtual machine into blocks; determining, by the data processing system, whether to compress the blocks prior to transmitting the blocks to a destination for the image based on a determination that using a first number of resources in the data processing system needed to compress the blocks does not reduce available resources in the data processing system to perform other operations running on the data processing system; determining, by the data processing system, whether to compress the blocks prior to transmitting the blocks to the destination for the image based on a second number of resources needed to transmit the blocks over a network system from the data processing system to the destination for the image; determining, by the data processing system, for each block in the blocks, whether to compress the each block prior to transmitting the each block to the destination for the image based on the first number of resources in the data processing system needed to compress the each block and the second number of resources needed to transmit the each block to the destination for the image; responsive to the data processing system determining, for each block in the blocks, to compress the each block prior to transmitting the each block to the destination for the image based on the first number of resources in the data processing system needed to compress the each block and the second number of resources needed to transmit the each block to the destination for the image, compressing, by the data processing system, the blocks to form a compressed set of blocks; and sending, by the data processing system, the compressed set of blocks and any uncompressed blocks remaining in the blocks to the destination for the image of the virtual machine.