I know Hyper-v can be installed using PXE server but most of the article that I see use Windows Deployment Services or uses two servers, one Linux and one Windows. Is there a way I can automate installation of Hyper-V using PXE in Linux the same way as we install Linux or ESXi?
2 Answers
I've done this. It's difficult if you don't know what you're doing. Like, mind numbingly, soul crushingly difficult.
First you need to remap /
to \
for all of your TFTP activity on your TFTP server. tdtpd supports this. This immediately breaks relative paths for anything that isn't Windows.
Then, you need to create a custom BCD bootloader that is aware of the relative path of all of your boot files on the PXE server. Yes, you need to manually re-create the boot structure and track down all of the files involved and make sure you're in the right spot. Even things like font files.
Then, you need to make sure that all of the Windows-specific "things" that happen during this process are handled (like the aforementioned slash remapping).
This will just make it so that your boot.wim is bootable. This isn't even counting what you need to do to actually get an installation image running (though, that's much more well documented).
When I was put in charge of imaging, the first thing I did was ditch that unsupported Frankenstein's Monster for WDS. If you're using Hyper-V, you obviously have Windows licenses. Just take the few minutes to set WDS up and save yourself a lot of headaches.
To answer your question, yes it can be done, and bits and pieces of the puzzle are scattered around the Googles, but it's really a whacky idea. It might be fun to do in a lab, but please just use WDS or WDS/MDT in production.
If I still had my notes about all of the config needed for this to work, I'd certainly pass them on, but it was multiple pages of customization that was needed and it changed from Windows version to Windows version, leaving you to beat your head against the wall every release.

- 100,734
- 32
- 197
- 329
Installation of Windows (and for these purposes, Hyper-V is Windows) over a network can be done through PXE. This is made relatively easy using Windows Deployment Services (WDS). I have no experience with trying to install Windows from a Linux-based PXE server, but I suspect it could be done, if you could figure out how to prepare the boot images manually, which is much of what WDS does.
Widen your search. Look for people who are installing Windows through a Linux-based PXE server. The answers will apply.

- 5,146
- 18
- 15