[OSGeoLive] Hyper-V VMs

Seth G sethg at geographika.co.uk
Thu May 10 12:43:24 PDT 2018

Hi Brian,

Thanks for getting back to me. I've been trying out the conversion process using MS tools to avoid reliance on software, that whilst currently free, may not be in the future (the https://www.starwindsoftware.com/converter). Full steps are at the end of the email. 

I'm fine with disabling Hyper-V for upcoming workshops - but it may make things a little easier for users in Windows environments to work directly with Hyper-V in the future. 

The resultant .vhdx file is 10.3 GB. Using 7-zip this produces a 3.2 GB file. This is essentially the same as the VirtualBox HD file, but in Hyper-V format. It can then be used directly in Hyper-V on Windows 10 Professional (and presumably other versions). I'd be happy to create the vhdx file for Sourceforge and a Hyper-V installation page for the docs if people think this is worthwhile addition to the OSGeoLive project (and should be able to do the same for the v12 planned in the summer). 

One drawback with Hyper-V / Lubuntu is there is no equivalent to the "Guest Additions" of Virtual Box. The shared clipboard and automatic full screen don't seem to be available. It looks like this may be on the way later this year - https://blogs.technet.microsoft.com/virtualization/2018/02/28/sneak-peek-taking-a-spin-with-enhanced-linux-vms/

Conversion steps for OSGeoLive 11.0 vmdk for reference are as follows:

- Download the Microsoft Virtual Machine Converter 3.0 from https://www.microsoft.com/en-us/download/details.aspx?id=42497 and install
- Download the "DS File Ops Kit" from http://members.ozemail.com.au/~nulifetv/freezip/freeware/dsfok.zip and unzip
- Open PowerShell (with admin rights)
- Run the following command to get the disk descriptor from the OSGeoLive vmdk:

cd D:\osgeo-live-11.0-vm
D:\tools\dsfo.exe .\osgeo-live-11.0-vm.vmdk 512 1024 descriptor1.txt

- This saves the disk description to the "descriptor1.txt" file. Open this in Notepad / a text editor and comment out the following lines (using hashes). This metadata is VirtualBox specific and is not recognised by the converter. 


- Run the following command to insert the disk descriptor back into the .vmdk

D:\tools\dsfi.exe .\osgeo-live-11.0-vm.vmdk 512 1024 descriptor1.txt

Failing to do the above steps will result in the error "ConvertTo-MvmcVirtualHardDisk : The entry 0247ca9d-f9aa-4910-9e8c-1c14d83a7749 is not a supported disk database entry for the descriptor."

- Finally run the conversion process:

Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
cd D:\osgeo-live-11.0-vm
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath .\osgeo-live-11.0-vm.vmdk -VhdFormat Vhdx 

Above steps based on https://stackoverflow.com/a/49768353/179520 and http://semantive.com/converting-ova-vm-to-hyper-v-format/



twitter: @geographika

On Thu, May 10, 2018, at 6:26 PM, Brian M Hamlin wrote:
> On Thu, 10 May 2018 18:01:47 0200, Seth G <sethg at geographika.co.uk> wrote:
> > Hi list,
> >
> > I'm currently preparing a Python workshop for the OSGeo Ireland
> > meetup, using OSGeo Live as the training environment - it is an
> > exceptional resource.
>   Hi Seth
> > Several users have Windows 10 Professional machines which are enabled
> > to run Hyper-V, Microsoft's virtualisation software. If this is
> > enabled then VirtualBox doesn't have a x64 option for creating new
> > Linux machines. This feature can be disabled at the command line, or
> > using the https://unclassified.software/en/apps/hypervswitch tool
> > which automates this.
> Either option requires a reboot, and means using Hyper-V VMs would
> require enabling the setting and another reboot.
>   ok, new to me, but if I understand, Windows 10 plus Hyper-V has some
> 'features' which prevent people from executing a VM ..
> a small tool works around this..
> > An alternative is to run the VM under Hyper-V, but this requires
> > converting the .vmdk HD to .vhd. There are a few commandline options
> > and hacks around to do this but only the
> > https://www.starwindsoftware.com/converter option worked for me. The
> > converted OSGeoLive VM then ran fine on Hyper-V.
>   So, you take the VirtualBox VM setup, and then convert just the disk
> image ?  and the result runs without more steps under Hyper-V ?
> > Is there an option of adding this download to
> > https://sourceforge.net/projects/osgeo-live/files/11.0/ ? It would be
> > another large file to host, and would likely need to be done manually
> > for each release.
>    Yes, a new file could be added to sourceforge.. What is it and do
> we want it is the next part  :-)
> > Are final builds / uploading to SourceForge currently a manual process?
>    builds and uploads are automated with manual steps, might be one
> way to say it..
> What is the time frame for your setup? 
>   This is the first time anyone has requested Hyper-V support, that I
> know of..
> --
> Brian M Hamlin
> OSGeo California
> blog.light42.com

More information about the osgeolive mailing list