Utility to help create virtual machine image for NeCTAR.
q-image-create.sh
This script runs the qemu-kvm emmulator and glance client program with parameters for creating virtual machine images for use on the NeCTAR deployment of OpenStack.
Usage: q-image-create [options] commandArguments Commands:
-c | --create disc.iso disk.img
Create a new disk image and boot off the ISO.
-r | --run disk.img
Run the disk image.
-u | --upload disk.img [imageName] (default name: "Test image ...")
Upload a disk image to OpenStack glance.
Create options: -s | --size numBytes size of disk to create (default: 10G) -f | --format fmt disk image format to save to (default: qcow2)
Create or run options: -d | --display num VNC server display (default: 0) -D | --disk-type intf virtual QEMU disk interface (default: virtio) -e | --extra-opts str extra options to pass to QEMU
Upload options: -O | --os-type value set os_type property for image (e.g. "windows")
Common options: -h | --help show this help message -v | --verbose show extra information
Guides are available to show the use of this script for creating images for:
Creation host system requires QEMU KVM and the OpenStack glance client.
On systems using YUM:
# yum install qemu-kvm
# yum install python-glanceclient
On systems using apt-get:
# apt-get install qemu-kvm cloud-utils
# apt-get install glance
This script is has been tested on CentOS 6.5 and Ubuntu.
Some commands of this script must be run with root privileges.
The OpenStack glance client has not been installed. Install it.
The guest operating system does not support APIC. Inform QEMU to use
"noapic" option when booting. Add --extra-opts "--noapic"
when
using the create or run commands.
The RAM size for the guest is too large for the host. Use a creation host system with more memory. Alternatively, edit the script and reduce the RAM_SIZE variable.
Please send feedback and queries to Hoylen Sue at [email protected].