<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>F. A. Q. - Recent questions and answers in Firewalls</title>
<link>https://clearpointhosting.com/q2a/index.php/qa/networking/firewalls</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: How to Convert VirtualBox Disk Image (VDI) to Qcow2 format?</title>
<link>https://clearpointhosting.com/q2a/index.php/9/how-to-convert-virtualbox-disk-image-vdi-to-qcow2-format?show=10#a10</link>
<description>&lt;header class=&quot;td-post-title&quot;&gt;&lt;h1 class=&quot;entry-title&quot;&gt;Convert VirtualBox Disk Image (VDI) to Qcow2 format&lt;/h1&gt;&lt;div class=&quot;td-module-meta-info&quot;&gt;&lt;div class=&quot;td-post-author-name&quot;&gt;&lt;div class=&quot;td-author-by&quot;&gt;By&lt;/div&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://computingforgeeks.com/author/mutai-josphat/&quot;&gt;Josphat Mutai&lt;/a&gt;&lt;div class=&quot;td-author-line&quot;&gt;-&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;td-post-date&quot;&gt;&lt;time class=&quot;entry-date updated td-module-date&quot; datetime=&quot;2016-02-20T17:11:00+03:00&quot;&gt;October 15, 2022&lt;/time&gt;&lt;/span&gt;&lt;div class=&quot;td-post-views&quot;&gt;&lt;span class=&quot;td-nr-views-58&quot;&gt;55196&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;td-post-comments&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://computingforgeeks.com/convert-virtualbox-disk-image-vdi-to-qcow2-format/#respond&quot;&gt;0&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/header&gt;&lt;div class=&quot;td-pb-row&quot;&gt;&lt;div class=&quot;td-pb-span8 td-main-content&quot; role=&quot;main&quot;&gt;&lt;div class=&quot;td-ss-main-content&quot;&gt;&lt;div class=&quot;td-post-content tagdiv-type&quot;&gt;&lt;div class=&quot;td-g-rec td-g-rec-id-content_top tdi_3 td_block_template_1&quot;&gt;&lt;/div&gt;&lt;p&gt;This simple guide will show you the easiest way to convert VDI disk image to use on your &lt;a rel=&quot;noopener noreferrer nofollow&quot; href=&quot;https://computingforgeeks.com/category/openstack/&quot; target=&quot;_blank&quot;&gt;Openstack &lt;/a&gt;Cloud environment. It’s easy to use and you just have to install few packages.&lt;/p&gt;&lt;div id=&quot;google_ads_iframe_/1254144,21789414456/computingforgeeks_com-box-3_0__container__&quot; style=&quot;border: 0pt none;&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div id=&quot;ez-video-wrap-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f&quot; class=&quot;ez-video-wrap&quot; style=&quot;align-self: stretch; height: auto;&quot;&gt;&lt;div style=&quot;max-width:640px&quot; class=&quot;ez-video-center&quot;&gt;&lt;div id=&quot;ez-video-container-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f&quot; class=&quot;ez-video-container ez-float-right&quot; style=&quot;flex-wrap: wrap; z-index: 10000005;&quot;&gt;&lt;div class=&quot;video-js ez-vid-placeholder vjs-fluid ez-video-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f-dimensions vjs-controls-enabled vjs-workinghover vjs-v7 vjs-max-quality-selector vjs-vtt-thumbnails vjs-has-started vjs-share vjs-videojs-share vjs-vtt-links vjs-paused vjs-user-inactive&quot; id=&quot;ez-video-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f&quot; tabindex=&quot;-1&quot; role=&quot;region&quot; aria-label=&quot;Video Player&quot; style=&quot;&quot; lang=&quot;en-us&quot;&gt;&lt;span class=&quot;ezoic-autoinsert-video ezoic-under_first_paragraph&quot;&gt;&lt;/span&gt;&lt;div class=&quot;vjs-text-track-display&quot; aria-live=&quot;off&quot; aria-atomic=&quot;true&quot;&gt;&lt;div style=&quot;position: absolute; inset: 0px; margin: 1.5%;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;vjs-control-bar&quot; dir=&quot;ltr&quot; style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;vjs-volume-control vjs-control vjs-volume-horizontal&quot;&gt;&lt;/div&gt;&lt;div class=&quot;vjs-progress-control vjs-control&quot;&gt;&lt;/div&gt;&lt;div class=&quot;vjs-progress-control vjs-control&quot;&gt;&lt;div class=&quot;vjs-vtt-thumbnail-display&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;vjs-remaining-time vjs-time-control vjs-control&quot;&gt;&lt;span class=&quot;ezoic-autoinsert-video ezoic-under_first_paragraph&quot;&gt;&lt;span role=&quot;presentation&quot; class=&quot;vjs-control-text&quot;&gt;Remaining Time&amp;nbsp;&lt;/span&gt;&lt;span aria-hidden=&quot;true&quot;&gt;-&lt;/span&gt;&lt;span aria-live=&quot;off&quot; role=&quot;presentation&quot; class=&quot;vjs-remaining-time-display&quot;&gt;3:53&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;vjs-menu-button vjs-menu-button-popup vjs-control vjs-button vjs-max-quality-selector-button&quot;&gt;&lt;/div&gt;&lt;div class=&quot;vjs-menu-button vjs-menu-button-popup vjs-control vjs-button vjs-max-quality-selector-button&quot;&gt;&lt;/div&gt;&lt;div class=&quot;ez-video-wrap&quot; style=&quot;align-self: stretch; height: auto;&quot;&gt;&lt;div style=&quot;max-width:640px&quot; class=&quot;ez-video-center&quot;&gt;&lt;div class=&quot;ez-video-container ez-float-right&quot; style=&quot;flex-wrap: wrap; z-index: 10000005;&quot;&gt;&lt;div class=&quot;video-js ez-vid-placeholder vjs-fluid ez-video-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f-dimensions vjs-controls-enabled vjs-workinghover vjs-v7 vjs-max-quality-selector vjs-vtt-thumbnails vjs-has-started vjs-share vjs-videojs-share vjs-vtt-links vjs-paused vjs-user-inactive&quot; tabindex=&quot;-1&quot; role=&quot;region&quot; aria-label=&quot;Video Player&quot; style=&quot;&quot; lang=&quot;en-us&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;ez-video-links-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f&quot; style=&quot;position: absolute; display: block;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class=&quot;ezoic-autoinsert-video ezoic-under_first_paragraph&quot;&gt;&lt;a id=&quot;ez-video-link-ed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f&quot; class=&quot;ez-video-link&quot; rel=&quot;nofollow&quot; href=&quot;https://humix.com/redirect?url=https%3A%2F%2F51sec.org%2Fhumix%2Fvideo%2Fed80e3cff858e57b5024c961d3551d04a9114ca478dfe57764e6450eb5b86a9f&quot; target=&quot;_self&quot;&gt;DD Install Windows 2008 to Google Cloud (GCP) Linux VM&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;We have covered many tutorials previously on VDI and VMDK including:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://computingforgeeks.com/add-extra-hard-disk-to-virtualbox-vm/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener nofollow&quot;&gt;How to extend Vdi and VMDK Hard disks on VirtualBox&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://computingforgeeks.com/create-vagrant-box-from-existing-virtualbox-vm/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener nofollow&quot;&gt;Step by step guide on using existing virtual machines with Vagrant&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://computingforgeeks.com/create-vagrant-box-from-existing-virtualbox-vm/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer noopener nofollow&quot;&gt;Easiest way to create Vagrant Box from existing Virtualbox VM&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;What is Virtual desktop infrastructure (VDI)&lt;/h2&gt;&lt;p&gt;Virtual desktop infrastructure (VDI) is defined as the process of hosting a desktop operating system within a virtual machine (VM) running on a centralized server. VDI is a variation on the client/server computing model, sometimes referred to as server-based computing. The term was coined by VMware Inc.&lt;/p&gt;&lt;div class=&quot;td-g-rec td-g-rec-id-content_inline tdi_2 td_block_template_1&quot;&gt;&lt;/div&gt;&lt;h2&gt;What is QCOW2&lt;/h2&gt;&lt;p&gt;One of the disk image formats supported by QEMU processor emulator is the Qcow/Qcow2. It is a representation of a fixed size block device in a file.&lt;/p&gt;&lt;div id=&quot;google_ads_iframe_/1254144,21789414456/computingforgeeks_com-medrectangle-3_0__container__&quot; style=&quot;border: 0pt none; display: inline-block; width: 580px; height: 400px;&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Qcow2 is an updated version of the qcow format, intended to supersede it. The main difference with the original is that qcow2 supports multiple virtual machine snapshots through a new, flexible model for storing snapshots. Users can easily convert qcow disk images to the qcow2 format.&lt;/p&gt;&lt;p&gt;We’ll cover steps of converting VDI to Qcow on the Fedora, CentOS and Ubuntu.&lt;/p&gt;&lt;div id=&quot;google_ads_iframe_/1254144,21789414456/computingforgeeks_com-medrectangle-4_0__container__&quot; style=&quot;border: 0pt none; display: inline-block; width: 300px; height: 250px;&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Fedora / CentOS 8:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Install qemu and kvm packages to use in conversion&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;sudo dnf -y install qemu-kvm libvirt virt-install bridge-utils &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;CentOS 7&lt;/strong&gt;&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;sudo yum -y install qemu-kvm libvirt virt-install bridge-utils&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ubuntu / Debian:&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;sudo apt-get -y install qemu-kvm libvirt-bin virtinst bridge-utils&lt;/code&gt;&lt;/pre&gt;&lt;h2&gt;Convert vdi to qcow2.&lt;/h2&gt;&lt;p&gt;Navigate to the directory containing vdi image file&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;cd ~
cd VirtualBox VMs/ubuntu-server/&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As you can see, i have VMDK file called&lt;strong&gt; box-disk1.vmdk, &lt;/strong&gt;i will first clone it to VDI format then make qcow2 image.&lt;/p&gt;&lt;p&gt;The following command is used to clone vmdk to vdi. The virtual appliance should be off.&lt;/p&gt;&lt;div id=&quot;google_ads_iframe_/1254144,21789414456/computingforgeeks_com-banner-1_0__container__&quot; style=&quot;border: 0pt none;&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;VBoxManage clonehd &lt;em&gt;&lt;mark style=&quot;background-color:initial&quot; class=&quot;has-inline-color has-pale-pink-color&quot;&gt;box-disk1.vmdk&lt;/mark&gt;&lt;/em&gt; &lt;em&gt;&lt;mark style=&quot;background-color:initial&quot; class=&quot;has-inline-color has-vivid-purple-color&quot;&gt;ubuntu.vdi &lt;/mark&gt;&lt;/em&gt;--format vdi&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If it’s successful on cloning, you should see a vdi disk image file.&lt;/p&gt;&lt;p&gt;Now lets convert VDI created to Qcow2 format using qemu. Basically what we are doing is converting vdi to a raw disk images.&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;qemu-img convert -f vdi -O qcow2 &lt;em&gt;&lt;mark style=&quot;background-color:initial&quot; class=&quot;has-inline-color has-vivid-purple-color&quot;&gt;ubuntu.vdi&lt;/mark&gt;&lt;/em&gt; &lt;em&gt;&lt;mark style=&quot;background-color:initial&quot; class=&quot;has-inline-color has-vivid-cyan-blue-color&quot;&gt;ubuntu.qcow2 &lt;/mark&gt;&lt;/em&gt;&lt;/code&gt;&lt;/pre&gt;&lt;figure class=&quot;wp-block-image&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-8a0tgdC-zrM/Vshx-TuTYDI/AAAAAAAABCc/QIAM141GGV4/s1600/convert-vd-to-qcow2.png&quot; rel=&quot;noopener nofollow&quot;&gt;&lt;img src=&quot;https://computingforgeeks.com/ezoimgfmt/2.bp.blogspot.com/-8a0tgdC-zrM/Vshx-TuTYDI/AAAAAAAABCc/QIAM141GGV4/s640/convert-vd-to-qcow2.png?ezimgfmt=rs:640x349/rscb23/ng:webp/ngcb23&quot; alt=&quot;convert vd to qcow2&quot; title=&quot;Convert VirtualBox Disk Image (VDI) to Qcow2 format 1&quot; data-ezsrc=&quot;https://computingforgeeks.com/ezoimgfmt/2.bp.blogspot.com/-8a0tgdC-zrM/Vshx-TuTYDI/AAAAAAAABCc/QIAM141GGV4/s640/convert-vd-to-qcow2.png?ezimgfmt=rs:640x349/rscb23/ng:webp/ngcb23&quot; class=&quot;ezlazyloaded&quot;&gt;&lt;/a&gt;&lt;/figure&gt;&lt;h2&gt;Convert vdi to raw img&lt;/h2&gt;&lt;p&gt;In case you would like to first create raw uncompressed image of format .&lt;strong&gt;img&lt;/strong&gt;, here is how to do it.&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;VBoxManage clonehd --format RAW ubuntu.vdi ubuntu.img&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; When you do convert a&lt;strong&gt; .vdi &lt;/strong&gt;to a &lt;strong&gt;.img&lt;/strong&gt;, The format .&lt;strong&gt;img &lt;/strong&gt;file is uncompressed vdi and it will be the maximum size that you set your&lt;em&gt; .vdi&lt;/em&gt; to grow up to, maximum size it can grow up to.&lt;/p&gt;&lt;h2&gt;Convert .img to qcow2&lt;/h2&gt;&lt;p&gt;You can as well convert .img to qcow2&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;qemu-img convert -f raw ubuntu.img -O qcow2 ubuntu.qcow2 &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you would like to &lt;strong&gt;.img&lt;/strong&gt; back to&lt;strong&gt; .vdi&lt;/strong&gt;, run&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;VBoxManage convertdd ubuntu.img ubuntu.vdi &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That’s all.You are done doing any of above processes.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Firewalls</category>
<guid isPermaLink="true">https://clearpointhosting.com/q2a/index.php/9/how-to-convert-virtualbox-disk-image-vdi-to-qcow2-format?show=10#a10</guid>
<pubDate>Wed, 30 Nov 2022 04:19:11 +0000</pubDate>
</item>
</channel>
</rss>