mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright (C) 2011 Citrix Systems, Inc. All rights reserved
|
|
#
|
|
# This software is licensed under the GNU General Public License v3 or later.
|
|
#
|
|
# It is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or any later version.
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
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"
|