This invention discloses a method, apparatus, medium, and device for deploying virtual machines based on network block devices, belonging to the field of
virtual machine deployment. After obtaining the
virtual machine image to be deployed and the target deployment node, this application maps the
virtual machine image to a
network block device and performs a read-only
mount on the target deployment node. A snapshot is created based on the read-only mounted
network block device, and the virtual
machine is started accordingly. This allows the virtual
machine to run immediately even before the image data is fully localized. Subsequently, during the virtual
machine's operation, the data of the read-only mounted
network block device is copied to the target deployment node, completing the virtual machine deployment. This application effectively solves the problem that existing technologies cannot accurately and efficiently deploy virtual machines.