Changeset View
Changeset View
Standalone View
Standalone View
release/Makefile.vm
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# | # | ||||
# Makefile for building virtual machine and cloud provider disk images. | # Makefile for building virtual machine and cloud provider disk images. | ||||
# | # | ||||
VMTARGETS= vm-image | VMTARGETS= vm-image | ||||
VMFORMATS?= vhd vmdk qcow2 raw | VMFORMATS?= vhd vmdk qcow2 raw | ||||
VMFS?= ufs | |||||
VMSIZE?= 4096m | VMSIZE?= 4096m | ||||
SWAPSIZE?= 1g | SWAPSIZE?= 1g | ||||
VMBASE?= vm | VMBASE?= vm | ||||
VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image | VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image | ||||
VMDK_DESC= VMWare, VirtualBox disk image | VMDK_DESC= VMWare, VirtualBox disk image | ||||
QCOW2_DESC= Qemu, KVM disk image | QCOW2_DESC= Qemu, KVM disk image | ||||
RAW_DESC= Unformatted raw disk image | RAW_DESC= Unformatted raw disk image | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf | ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf | ||||
. endif | . endif | ||||
cw-${_CW:tl}: emulator-portinstall | cw-${_CW:tl}: emulator-portinstall | ||||
mkdir -p ${.OBJDIR}/${.TARGET} | mkdir -p ${.OBJDIR}/${.TARGET} | ||||
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ | env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ | ||||
QEMUSTATIC=${QEMUSTATIC} \ | QEMUSTATIC=${QEMUSTATIC} \ | ||||
${.CURDIR}/scripts/mk-vmimage.sh \ | ${.CURDIR}/scripts/mk-vmimage.sh \ | ||||
-C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ | -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ | ||||
-i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ | -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW:tu}_FORMAT} \ | ||||
-S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} | -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW:tu}IMAGE} -c ${${_CW:tu}CONF} | ||||
touch ${.TARGET} | touch ${.TARGET} | ||||
cw${_CW:tl}-package: | cw${_CW:tl}-package: | ||||
@# Special target to handle packaging cloud images in the formats | @# Special target to handle packaging cloud images in the formats | ||||
@# specific to each hosting provider. | @# specific to each hosting provider. | ||||
.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) | .if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) | ||||
Show All 17 Lines | |||||
vm-base: vm-image | vm-base: vm-image | ||||
vm-image: | vm-image: | ||||
.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) | .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) | ||||
. for FORMAT in ${VMFORMATS} | . for FORMAT in ${VMFORMATS} | ||||
mkdir -p ${.OBJDIR}/${.TARGET} | mkdir -p ${.OBJDIR}/${.TARGET} | ||||
env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ | env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ | ||||
${.CURDIR}/scripts/mk-vmimage.sh \ | ${.CURDIR}/scripts/mk-vmimage.sh \ | ||||
-C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ | -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \ | ||||
-i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ | -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ | ||||
-S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} | -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} | ||||
. endfor | . endfor | ||||
.endif | .endif | ||||
touch ${.TARGET} | touch ${.TARGET} | ||||
vm-cloudware: ${CLOUDTARGETS} | vm-cloudware: ${CLOUDTARGETS} | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |