diff --git a/README.md b/README.md new file mode 100644 index 0000000..9d2ee24 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Building on Windows + +1. Install Cygwin with packages; I install to C:\Cygwin64 as per defaults + * python39 + * python39-setuptools + * python39-cryptography + * python39-pip + * openssl-devel + * libffi-devel + * python3-devel + * zlib + * zlib-devel +1. Inside of Cygwin + 1. Create a venv *with system packages* enabled + 1. Install windows/ansible-requirements.txt into the venv + 1. Update the path in ansible/hyperv-wrapper.py to point to your VENV + 1. Execute pyinstaller --onefile ansible/hyperv-wrapper.py \ No newline at end of file diff --git a/distros/archlinux/supports.yml b/distros/archlinux/supports.yml index 72a1159..294aa67 100644 --- a/distros/archlinux/supports.yml +++ b/distros/archlinux/supports.yml @@ -5,3 +5,5 @@ rolling: provider: virtualbox-iso - arch: x86_64 provider: vmware-iso + - arch: x86_64 + provider: hyperv-iso \ No newline at end of file diff --git a/sources/build.pkr.hcl b/sources/build.pkr.hcl index ee6ada3..3a2f46f 100644 --- a/sources/build.pkr.hcl +++ b/sources/build.pkr.hcl @@ -16,6 +16,10 @@ packer { version = ">= 1.0" source = "github.com/hashicorp/vmware" } + hyperv = { + version = "= 1.1.1" + source = "github.com/hashicorp/hyperv" + } } } @@ -23,7 +27,8 @@ build { sources = [ "source.qemu.x86_64", "source.virtualbox-iso.x86_64", - "source.vmware-iso.x86_64" + "source.vmware-iso.x86_64", + "source.hyperv-iso.x86_64" ] # If anything needs specific support for one of the distros diff --git a/sources/hyperv-iso.pkr.hcl b/sources/hyperv-iso.pkr.hcl new file mode 100644 index 0000000..0d7b08f --- /dev/null +++ b/sources/hyperv-iso.pkr.hcl @@ -0,0 +1,26 @@ +source "hyperv-iso" "x86_64" { + iso_url = var.iso.url + iso_checksum = var.iso.checksum + output_directory = "output/libvirt/${local.name}" + + boot_command = var.boot_command + shutdown_command = var.shutdown_command + boot_wait = var.boot_wait + ssh_timeout = local.ssh.timeout + ssh_username = local.ssh.username + ssh_password = local.ssh.password + ssh_handshake_attempts = local.ssh.handshake_attempts + ssh_private_key_file = local.ssh.private_key_file + + vm_name = "packer-${local.name}" + disk_size = "${local.disk_size}000" + cpus = local.cpus + memory = local.memory + headless = var.headless + + http_content = var.http_files + http_directory = var.http_directory + cd_content = var.cd_content + cd_files = var.cd_files + cd_label = var.cd_label +}