Its still completely compatible with Windows 10 since Vagrant will simply use the Hyper-V Powershell cmdlets to create a new VM. Vagrant expects this XML file and inspects it for several bits of metadata that it uses to create a new VM when you "vagrant up". ![]() Prior to Windows 10, Hyper-V stored virtual machine metadata in an XML file. These all have to be archived in a specific folder structure. There are 2 key bits that we need to create: A Hyper-V xml file that defines the VM metadata and vagrant metadata json as well as an optional Vagrantfile. However, just the vhd alone is not enough for Vagrant to produce a Hyper-V VM. So you now have a vhd file that can be sucked into any Hyper-V VM. Laying out the Hyper-V and Vagrant metadata On windows images, the sysinterals tool sdelete does a good job at that. It is highly advisable that you "0 out" all unused disk space as the last step of the image creation to assist the compression. This is simply because the VHD is uncompressed and we'll take care of that in the last step. Note that this may likely produce a vhd file that is much larger than the vmdk or vdi image from which the conversion took place. The conversion takes a few minutes to complete on my system. This uses the clonehd command and takes the location of the VirtualBox disk and the path of the vhd to be created. You just need the path to the VirtualBox VM's hard disk. This is a simple one liner using VBoxManage.exe which installs with VirtualBox. VMDK file generated which is what automatically happens when you create a VirtualBox VM. That is all you need to do to get started here. ![]() However, if you are interested in this topic, I'm assuming you are able to create a VirtualBox VM. This post will not cover the creation of the image. I am currently working on another post (hopefully due to publish this week) that will go into detail on creating Windows images with Packer and Boxstarter and cover many gory details around, unattend.xml files, sysprep, and tips to get the image as small as possible. Of course I used Boxstarter to set it all up.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |