Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nutanix AHV の VM からディスク イメージを作成する。
#!/bin/bash
VM_NAME=$1
[ x == x"$VM_NAME" ] && echo "VM Name wo kudasare."
TS=`date "+%Y%m%d%H%M%S"`
acli vm.disk_list $VM_NAME | grep ^scsi | awk '{print $2}' | while read L
do
DISK_ADDR=`echo 'scsi.'$L`
IMAGE_NAME=${VM_NAME}_${DISK_ADDR}_${TS}
FRMM_VMDISK=vm:${VM_NAME}:${DISK_ADDR}
acli image.create ${IMAGE_NAME} image_type=kDiskImage clone_from_vmdisk=${FRMM_VMDISK}
done
@gowatana

This comment has been minimized.

Copy link
Owner Author

commented Dec 25, 2018

下記の投稿むけ。

Nutanix AHV の VM からディスク イメージを作成する。(Bash)
http://blog.ntnx.jp/entry/2018/12/25/235025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.