mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
format conversion utilities
This commit is contained in:
parent
ee818c23e1
commit
00722aea65
11
patches/systemvm/debian/qemuconvert.sh
Executable file
11
patches/systemvm/debian/qemuconvert.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
echo "Converting raw image to qcow2"
|
||||
qemu-img convert -f raw -O qcow2 systemvm.img systemvm.qcow2
|
||||
echo "Compressing qcow2..."
|
||||
bzip2 -c systemvm.qcow2 > systemvm.qcow2.bz2
|
||||
echo "Done qcow2"
|
||||
echo "Converting raw image to vmdk"
|
||||
qemu-img convert -f raw -O vmdk systemvm.img systemvm.vmdk
|
||||
echo "Compressing vmdk..."
|
||||
bzip2 -c systemvm.vmdk > systemvm.vmdk.bz2
|
||||
echo "Done vmdk"
|
||||
20
patches/systemvm/debian/vhdconvert.sh
Executable file
20
patches/systemvm/debian/vhdconvert.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# BUILDING vhd-util on Linux
|
||||
# The xen repository has a tool called vhd-util that compiles and runs on any linux system
|
||||
# (http://xenbits.xensource.com/xen-4.0-testing.hg?file/8e8dd38374e9/tools/blktap2/vhd/ or full Xen source at http://www.xen.org/products/xen_source.html).
|
||||
# Apply this patch: http://lists.xensource.com/archives/cgi-bin/mesg.cgi?a=xen-devel&i=006101cb22f6%242004dd40%24600e97c0%24%40zhuo%40cloudex.cn.
|
||||
# Build the vhd-util tool:
|
||||
# cd tools/blktap2
|
||||
# make
|
||||
# sudo make install
|
||||
#
|
||||
|
||||
echo "Backing up systemvm.img"
|
||||
cp systemvm.img systemvm.img.tmp
|
||||
echo "Converting raw image to fixed vhd"
|
||||
vhd-util convert -s 0 -t 1 -i systemvm.img.tmp -o systemvm.vhd
|
||||
echo "Converting fixed vhd to dynamic vhd"
|
||||
vhd-util convert -s 1 -t 2 -i systemvm.vhd -o systemvm.vhd
|
||||
echo "Compressing..."
|
||||
bzip2 -c systemvm.vhd > systemvm.vhd.bz2
|
||||
echo "Done"
|
||||
Loading…
x
Reference in New Issue
Block a user