<commit_before>#!/bin/bash
#
# Creates a fresh KVM VM via libvirt.  This can be used to create both
# the Crowbar admin node VM and subsequent PXE-booting Crowbar nodes.
#
# FIXME: ideally this would eventually be replaced by one or more
# Vagrantfiles.

DEFAULT_HYPERVISOR="qemu:///system"
DEFAULT_FSSIZE="24"
DEFAULT_CPUS=4
DAFAULT_USE_CPU_HOST=true

usage () {
    # Call as: usage [EXITCODE] [USAGE MESSAGE]
    exit_code=1
    if [[ "$1" == [0-9] ]]; then
        exit_code="$1"
        shift
    fi
    if [ -n "$1" ]; then
        echo >&2 "$*"
        echo
    fi

    me=`basename $0`

    cat <<EOF >&2
Usage: $me [options] VM-NAME VM-QCOW2-DISK VBRIDGE [FILESYSTEM-PATH]

If VM-QCOW2-DISK does not already exist, it will be created.

FILESYSTEM-PATH should be a directory on the host which you want<commit_msg>fixup! Make --cpu host optional<commit_after>#!/bin/bash
#
# Creates a fresh KVM VM via libvirt.  This can be used to create both
# the Crowbar admin node VM and subsequent PXE-booting Crowbar nodes.
#
# FIXME: ideally this would eventually be replaced by one or more
# Vagrantfiles.

DEFAULT_HYPERVISOR="qemu:///system"
DEFAULT_FSSIZE="24"
DEFAULT_CPUS=4
DEFAULT_USE_CPU_HOST=true

usage () {
    # Call as: usage [EXITCODE] [USAGE MESSAGE]
    exit_code=1
    if [[ "$1" == [0-9] ]]; then
        exit_code="$1"
        shift
    fi
    if [ -n "$1" ]; then
        echo >&2 "$*"
        echo
    fi

    me=`basename $0`

    cat <<EOF >&2
Usage: $me [options] VM-NAME VM-QCOW2-DISK VBRIDGE [FILESYSTEM-PATH]

If VM-QCOW2-DISK does not already exist, it will be created.

FILESYSTEM-PATH should be a directory on the host which you want
{'fraction_non_alphanumeric': 0.11385542168674699, 'fraction_numerical': 0.016867469879518072, 'mean_word_length': 3.0611246943765282, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4079314', 'n_tokens_mistral': 603, 'n_tokens_neox': 590, 'n_words': 197}