Revert "vm_image_util: add qemu_xen image type for testing"

This reverts commit fe9db4157badb64909bf575091dd551de761f2fb.
This commit is contained in:
Benjamin Gilbert 2017-06-08 14:47:23 -07:00
parent 78c50c50f2
commit 6878bd8f5f
2 changed files with 0 additions and 74 deletions

View File

@ -1,51 +0,0 @@
#!/bin/sh
SCRIPT_DIR="`dirname "$0"`"
VM_NAME=
VM_IMAGE=
VM_MEMORY=
VM_NCPUS="`grep -c ^processor /proc/cpuinfo`"
SSH_PORT=2222
USAGE="Usage: $0 [-p PORT] [--] [qemu options...]
Options:
-p PORT The port on localhost to map to the VM's sshd. [2222]
-h this ;-)
QEMU wrapper script for a VM that is compatible with Xen:
- No x2apic, everything APIC related breaks when it is on.
- No virtio, simply does not work whatsoever under Xen.
Any arguments after -p will be passed through to qemu, -- may be
used as an explicit separator. See the qemu(1) man page for more details.
"
while [ $# -ge 1 ]; do
case "$1" in
-p|-ssh-port)
SSH_PORT="$2"
shift 2 ;;
-v|-verbose)
set -x
shift ;;
-h|-help|--help)
echo "$USAGE"
exit ;;
--)
shift
break ;;
*)
break ;;
esac
done
qemu-system-x86_64 \
-machine accel=kvm \
-cpu host,-x2apic \
-smp "${VM_NCPUS}" \
-name "$VM_NAME" \
-m ${VM_MEMORY} \
-net nic,vlan=0,model=e1000 \
-net user,vlan=0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-drive if=scsi,file="${SCRIPT_DIR}/${VM_IMAGE}" \
"$@"
exit $?

View File

@ -15,7 +15,6 @@ VALID_IMG_TYPES=(
qemu
qemu_uefi
qemu_uefi_secure
qemu_xen
rackspace
rackspace_onmetal
rackspace_vhd
@ -55,7 +54,6 @@ VALID_OEM_PACKAGES=(
hyperv
rackspace
rackspace-onmetal
xendom0
vagrant
vagrant-key
vmware
@ -132,12 +130,6 @@ IMG_qemu_uefi_secure_DISK_FORMAT=qcow2
IMG_qemu_uefi_secure_DISK_LAYOUT=vm
IMG_qemu_uefi_secure_CONF_FORMAT=qemu_uefi_secure
IMG_qemu_xen_DISK_FORMAT=qcow2
IMG_qemu_xen_DISK_LAYOUT=vm
IMG_qemu_xen_CONF_FORMAT=qemu_xen
IMG_qemu_xen_OEM_PACKAGE=oem-xendom0
IMG_qemu_xen_MEM=2048
## xen
IMG_xen_CONF_FORMAT=xl
@ -762,21 +754,6 @@ _write_qemu_uefi_secure_conf() {
flash-var "$(_dst_dir)/${flash_rw}" "db" "${VM_TMP_DIR}/DB.esl"
}
_write_qemu_xen_conf() {
local script="$(_dst_dir)/$(_dst_name ".sh")"
local dst_name=$(basename "$VM_DST_IMG")
local vm_mem="$(_get_vm_opt MEM)"
sed -e "s%^VM_NAME=.*%VM_NAME='${VM_NAME}'%" \
-e "s%^VM_IMAGE=.*%VM_IMAGE='${dst_name}'%" \
-e "s%^VM_MEMORY=.*%VM_MEMORY='${vm_mem}'%" \
"${BUILD_LIBRARY_DIR}/qemu_xen.sh" > "${script}"
checkbashisms --posix "${script}" || die
chmod +x "${script}"
VM_GENERATED_FILES+=( "${script}" )
}
_write_pxe_conf() {
local script="$(_dst_dir)/$(_dst_name ".sh")"
local vmlinuz_name="$(_dst_name ".vmlinuz")"