Coder Social home page Coder Social logo

alex1528 / windows-openstack-imaging-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudbase/windows-imaging-tools

0.0 2.0 0.0 9.53 MB

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.

PowerShell 94.52% XSLT 5.48%

windows-openstack-imaging-tools's Introduction

windows-openstack-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi, baremetal and more.

Supports any version of Windows starting with Windows 2008 R2 and Windows 7, including:

  • Windows Server 2008 R2
  • Hyper-V Server 2008 R2
  • Windows 7
  • Windows Server 2012
  • Hyper-V Server 2012
  • Windows 8
  • Windows Server 2012 R2
  • Hyper-V Server 2012 R2
  • Windows 8.1

Supports both x64 and x86 images.

How to create a Windows template image

Requirements:

Example PowerShell script:

Import-Module .\WinImageBuilder.psm1

# The disk format can be: VHD, VHDX, QCow2, VMDK or RAW
$virtualDiskPath = "c:\Images\mywindowsimage.qcow2"
# This is the content of your Windows ISO
$wimFilePath = "D:\sources\install.wim"
# Optionally, if you target KVM
$virtIOISOPath = "C:\ISO\virtio-win-0.1-81.iso"

# Check what images are supported in this Windows ISO
$images = Get-WimFileImagesInfo -WimFilePath $wimFilePath
# Select the first one
$image = $images[0]
$image

# The product key is optional
#$productKey = "xxxxx-xxxxx"

# Add -InstallUpdates for the Windows updates (it takes longer and requires
# more space but it's highly recommended)
New-WindowsCloudImage -WimFilePath $wimFilePath -ImageName $image.ImageName `
-VirtualDiskFormat QCow2 -VirtualDiskPath $virtualDiskPath `
-SizeBytes 16GB -ProductKey $productKey -VirtIOISOPath $virtIOISOPath

No extra configurations are needed for specific Windows versions, the New-WindowsCloudImage cmdlet takes care of everything.

How to upload the image in OpenStack

We're not yet done, the next steps consist in:

  • uploading the image to Glance
  • booting an instance on your target hypervisor compute node
  • waiting for the setup to complete (the instance will shutdown once the setup is done)
  • take a snapshot of the instance which will contain the final sysprepped image ready for your deployments

TODO: Add OpenStack scripts

Notes

The Windows host where you plan to create the instance needs either:

  • A version greater or equal to the version of the Windows image that you want to generate
  • A recent Windows ADK installed

E.g. to generate a Windows Server 2012 R2 image, you need a host running either Windows Server 2012 R2 / Hyper-V Server 2012 R2 or Windows 8.1.

windows-openstack-imaging-tools's People

Contributors

alexpilotti avatar ader1990 avatar ociuhandu avatar tomcsanyid avatar gabriel-samfira avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.