2/12/2023 0 Comments Ubuntu 18.04 kvm qemu![]() Now we need to see are we able to detect and use this disk on virtual machine or ~]# sfdisk -s | grep vdc In above command we attach Disk to virtual machine. Now we attach Qcow2 on Virtual Machine with below command.In previous post we did it earlier ▶ virsh attach-disk centos7_1 -source /data/vm_images/centos7_1/vdisk1 -target vdc -driver qemu If we check these files with qemu-img info # qemu-img info vdisk1 rw-r-r- 1 ssirohi ssirohi 193K Apr 19 16:30 vdisk1Ībove we create 40 GB of file, But this file don’t have meta-data and both have only 193 KB of size. # qemu-img create -f qcow2 vdisk1 40Gįormatting 'vdisk1', fmt=qcow2 size=42949672960 cluster_size=65536 lazy_refcounts=off refcount_bits=16 How to create Qcow2 image on host machine and attach it Virtual Machine. Qemu-img version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.23)Ĭopyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers In this setup we are using KVM virtual machine on Ubuntu 18.04 Sometime when we attach Qcow2 image disk on kvm virtual machine, these images are not usable on these virtual machine. So in this post we will see how we could create Qcow2 image with Meta-data Qcow2 could create through qemu-img command but by-default this command don’t create Meta-data on these files, we have to mention it or otherwise we can convert these Qcow2 image files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |