Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 8b93c41

Browse files
committed
add script to convert image to vmdk format
1 parent b78466d commit 8b93c41

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

convert_to_vmware.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
self_name=$0
3+
source_img=$1
4+
target_img=$2.vmdk
5+
6+
show_help_exit() {
7+
echo "help: $self_name <source_raw_img> <target_img>"
8+
echo "detail: convert chromiumos raw image to <target_img>.vmdk"
9+
exit 1
10+
}
11+
12+
[ -z "$source_img" ] && show_help_exit
13+
[ ! -f "$source_img" ] && show_help_exit
14+
[ -f ${target_img} ] && rm ${target_img}
15+
qemu-img convert -O vmdk ${source_img} ${target_img}

0 commit comments

Comments
 (0)