Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Allow creation of VMs with different OS than Windows Server 2012 #10

Open
pvandervelde opened this issue Aug 21, 2014 · 16 comments
Open
Labels

Comments

@pvandervelde
Copy link

It looks like at the moment only VMs with a Windows Server 2012 OS can be created if I read builder.go (lines 174 - 187) correctly. It would be awesome if packer could create other OS's on Hyper-V as well, e.g. Win7, Win8 and any flavor of Linux.

@pvandervelde
Copy link
Author

@v-vlshch Anybody have any idea on what needs to be done to move this forward? I unfortunately have little time and no experience with Go :( but it would be awesome if we could get this code extended to work with different OSes.

@uchagani
Copy link

Couldn't you just fork this repo and add the other Windows versions yourself?

@pvandervelde
Copy link
Author

If I had time then yes I could do that, but it would be nicer if all that code was in one spot and I was hoping that there was some momentum behind this plugin. On the other hand when I have time to play with this more I might be able to add the additional Windows versions etc.

@vladimir-shcherbakov
Copy link
Contributor

@eduardkoller Are we going to move this forward?

@kouk
Copy link

kouk commented Oct 15, 2014

@v-vlshch @eduardkoller yes, please tell, is this going to happen anytime soon? I can help with testing and perhaps even bug fixes.

@petro-rudenko
Copy link

Is there a way to build a linux image on hyper-v with this plugin?

@vladimir-shcherbakov
Copy link
Contributor

Unfortunately, the plugin targets restricted by Windows Server 2012.

@pbolduc
Copy link

pbolduc commented Dec 12, 2014

I have been working on a fork that supports an expanded OS selection. Linux is on backlog but I am currently focusing on supporting all supported version of Windows OS first.

In the other providers, like Virtual Box, they are able to send key strokes to the console to instruct the linux installer to use a install template. Is there another way to do this? I do not think we can send key strokes to the Hyper-V console of a VM.

@uchagani
Copy link

What do you mean by "install template"
On Dec 12, 2014 5:37 PM, "Phil Bolduc" [email protected] wrote:

I have been working on a fork https://github.com/pbolduc/packer-hyperv
that supports an expanded OS selection. Linux is on backlog but I am
currently focusing on supporting all supported version of Windows OS first.

In the other providers, like Virtual Box, they are able to send key
strokes to the console to instruct the linux installer to use a install
template. Is there another way to do this? I do not think we can send key
strokes to the Hyper-V console of a VM.


Reply to this email directly or view it on GitHub
#10 (comment)
.

@pbolduc
Copy link

pbolduc commented Dec 15, 2014

See 'Boot Command' in VIRTUALBOX BUILDER (FROM AN ISO)

The boot_command configuration is very important: it specifies the keys to type when the virtual machine is first booted in order to start the OS installer. This command is typed after boot_wait, which gives the virtual machine some time to actually load the ISO.

@pbolduc
Copy link

pbolduc commented Dec 15, 2014

By install template, I think I meant a config file for the linux environment. However, I just read How do I create a completely unattended install of Ubuntu? and it appears you do not need to have to send any key strokes. I would assume something similar can be done for other linix distros, ie CentOS, etc

@andyburton
Copy link

For Debian you use preseed to specify the options during install - https://wiki.debian.org/DebianInstaller/Preseed e.g. https://github.com/box-cutter/debian-vm/blob/master/http/preseed.cfg

Currently we use Packer to build virualbox/vmware/aws images using the following, but we do not have the ability to use packer for hyper-v as there is no plugin to support the build commands required -

        "boot_command": [
            "<esc><wait>",
            "install",
            " auto",
            " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
            " debian-installer=en_US",
            " locale=en_US",
            " keymap=us",
            " netcfg/get_hostname=vagrant",
            " netcfg/get_domain=vm ",
            "<enter>"
        ],

+1 for a hyper-v packer plugin that supports Debian/Ubuntu :)

@spuder
Copy link

spuder commented Feb 24, 2015

+1 Very eagerly looking forward to linux support

@marcofranssen
Copy link

+1 would love to have the hyperv builder so I can run my VM's on hyper-v and also be able to deploy them to azure.

@marcofranssen
Copy link

Would also be awesome to have some documentation on the packer website on how to use the hyper-v stuff with packer. Could someone experienced with the hyper-v stuff add some docs on the packer website, this also might give a boost to people interesting to further develop the hyper-v support. Probably few people know of the existence of packer + hyper-v. A pull request here should make the docs appear on the packer website. https://github.com/mitchellh/packer/tree/master/website

@taliesins
Copy link

See: hashicorp/packer#2576 for full support of other operating system with Hyper-V

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants