Introduction to Containers and Docker. Containerization is an approach to software development in which an application or service, its dependencies, and its configuration (abstracted as deployment manifest files) are packaged together as a container image. The containerized application can be tested as a unit and deployed as a container image. Use raw disk image and not qcow2. Consider using raw image or partition for a partition, especially with Microsoft SQL database files because qcow2 can be very slow under such type of load. Trace Flag T8038 with Microsoft SQL Server. Setting the trace flag -T8038 will drastically reduce the number of context switches when running SQL 2005 or 2008. @alexskysilk, Raw format can be used with NFS too and allows clone VM at runtime. Despite of more features that qcow may offer, I think they are useless for many people. I think Performance gain is above any other feature (as far as I know) provided by qcow2 format. These new sectors are appended to the.qcow2 file causing it to grow in size, until it eventually becomes fully allocated. It stops growing when it hits this maximum size. You can stop Docker and delete this file, however deleting it will also remove all your containers and images. And Docker will recreate this file on start.
This guide is for existing VM’s.
Backup VM config
Replace vmname
with Virtual Machine (Domain) name. You can find correct name by running virsh list --all
Image Conversion
Find path of existing image (in qcow2) format
Will show something like:
Conversion
Docker Qcow2 Vs Rawlings
Sample command is:
Docker Qcow2 Vs Raw Data
So in this case, it will be:
At this point conversion is complete.
Edit VM Configuration
Edit VM Config
Run following command to open editor.
Docker Mac Raw Vs Qcow2
Find lines like below:
Replaceqcow2
withraw
Ain 2 places highlighted above.
Your update config will look like below:
Save your changes and exit editor.
Start VM
Run following command:
At this point you can run your disk I/O benchmarks again to check speed.