Creare una macchina virtuale Windows 10 su Google Cloud Compute Engine

C

Google Cloud Compute Engine è il servizio di macchine virtuali offerto da Google. Tramite questo servizio è possibile creare e avviare numerose macchine virtuali completamente gestite, basate su immagini pubbliche di sistemi operativi o immagini personalizzate.

Google fornisce unicamente immagini pubbliche windows per ambiente windows server in modalità abbonamento. Per lanciare una macchina windows 10 è quindi necessario muoversi in 2 modi:

A) Tramite la creazione di un ambiente nested virtualizzato, ovvero tramite il deploy di macchine virtuali Windows 10 di livello 2 che vengono gestite da una macchina virtuale di L1 dotata di un virtualizzatore, la quale gira sull’infrastruttura kvm di google. Google permette di fare questo unicamente tramite macchine virtuali di L1 basate su Linux (KVM).

2) Tramite la creazione di un immagine personalizzata avviabile per Google Cloud Compute Engine contenente Windows 10

Analizziamo il caso 2 e procediamo a creare un immagine personalizzata per Windows 10 avviabile tramite Google Cloud Compute Engine.

Google fornisce vari strumenti di build che teoricamente permettono di creare un immagine avviabile partendo da un file .iso o da un disco virtuale VHD o VMDK.

La procedura per la creazione di una build partendo da un immagine ISO , precisamente l’immagine iso di windows 10 scaridabile tramite il tool di creazione media di microsoft, fallisce in qualsiasi modo si provi a importarla.

La procedura per convertire comunque il file install.esd in install.wim necessario per provare la build è la seguente

3] Using Command Prompt
To convert install.esd to install.wim file in Windows 11/10 using Command Prompt, do the following:

Press Windows key + E to open File Explorer.
Mount the Windows ISO image.
Next, go to C:\ drive and create a folder Win10 and copy all files from Windows 10 ISO image into it.
After you have copied all files, go to Sources, find install.esd and make a copy of this file.
Now create another folder on your C:\ drive – name it ESD.
Paste the install.esd file into this folder.
Next, press Windows key + R to invoke the Run dialog.
In the Run dialog box, type cmd and then press CTRL + SHIFT + ENTER to open Command Prompt in admin/elevated mode.
In the command prompt window, type the command below and hit Enter.
cd c:\esd
Next, run the following command to list all Windows editions in your image:

dism /Get-WimInfo /WimFile:install.esd
From the output, find the index number of the Windows 11/10 edition you need. For the purpose of this tutorial, we are choosing Index 1 for the Windows 10 Pro edition.

4] Using PowerShell
To convert install.esd to install.wim file in Windows 11/10 using PowerShell, do the following:

Get-WindowsImage -ImagePath “f:\sourcesinstall.esd”
Now you can use the Export-WindowsImage cmdlet to convert Install.ESD to Install.WIM with PowerShell by running the command below:
Export-WindowsImage -SourceImagePath F:sourcesinstall.esd -SourceIndex 10 -DestinationImagePath C:\esd\install.wim -CheckIntegrity
Exit PowerShell once the conversion is completed.

About the author

Avatar photo
Matteo Lavaggi