Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> 關於Linux >> Linux系統怎麼選擇qcow2和raw鏡像格式

Linux系統怎麼選擇qcow2和raw鏡像格式

日期:2017/1/25 10:23:41      編輯:關於Linux

  在Linux系統虛擬機中做虛擬化的時候可以選擇兩種格式,raw和qcow2這兩種格式可以說是各有優勢。那麼到底Linux系統中qcow2、raw鏡像格式怎麼選擇?本文就來分析一下這兩種格式。

Linux系統怎麼選擇qcow2和raw鏡像格式

  raw

  (default) the raw format is a plain binary image of the disc image, and is very portable. On filesystems that support sparse files, images in this format only use the space actually used by the data recorded in them.

  老牌的格式,隨便dd一個file就模擬了一個raw格式的鏡像。目前來 看,KVM和XEN默認的格式好像還是這個格式。因為其原始,有很多原生的特性,例如直接掛載也是一件簡單的事情。支持轉換成其它格式的虛擬機鏡像,空間 使用來看,這個很像磁盤,使用多少就是多少(du -h看到的大小就是使用大小),但如果你要把整塊磁盤都拿走的話得全盤拿了(copy鏡像的時候),會比較消耗網絡帶寬和I/O。如果那天硬盤不夠用了, 再買一塊盤,可以在原來的盤上追加空間:

  dd if=/dev/zero of=zeros.raw bs=1024k count=4096(先創建4G的空間)

  cat foresight.img zeros.raw 》 new-foresight.img(追加到原有的鏡像之後)

  不支持snapshot,當年用LVM做虛擬機的鏡像,那性能槓槓的。 上一頁12下一頁共2頁

Copyright © Windows教程網 All Rights Reserved