Save HyperV VM as ISO
I have a virtual machine running at my local machine in Hyper-V and need to move this VM to the cloud. I have received an advise to use https://vultr.com to do this since not all of the users have access to Microsoft DevOps. I need to create an ISO image from the VM to add it to vultr.com. Alas, it seems to be quite hard to create an ISO. Please, can anyone tell me how to make the ISO? I think that I don't need sysprep, since the existing VM will not be used anymore. The VM is a copy from Production, so I don't want to change too much.
I have read Creating an ISO from a Hyper-V Machine but couldn't find my answer in that topic. Or I didn't understand it.
Solution 1:
An ISO can be created natively by installing the Windows ADK and using oscdimg
, otherwise, any 3rd party program could be used (for example, Alcohol 120%).
- You may wish to first compress the VHD into a
7z
orzip
archive first via 7zip, then create an ISO of a directory containing just the archive.
oscdimg
-
Install: Windows ADK (8 & 10) || AIK (7)
-
ADK:
- Windows <=10: Windows ADK
- Select: Deployment Tools
- Windows <=10: Windows ADK
-
AIK:
- Windows <=7 Windows AIK
-
Run:
StartCD.exe
> Windows AIK Setup
-
Run:
- Windows <=7 Windows AIK
-
ADK:
-
oscdimg –n –d –m "source" "target.iso"`
-
-n
: Permits file names longer than DOS 8.3 file names -
-d
: Permits lower case file names -
-m
: Ignores the maximum size limit of an image -
source
: Directory containing VHD file -
target
: ISO file
Example:PS $ oscdimg -n -d -m ".\Shared" ".\Shared.iso" Scanning source tree Scanning source tree complete (1 files in 1 directories) Computing directory information complete Image file is 4701857792 bytes Writing 1 files in 1 directories to ".\Shared.iso" 100% complete Final image file is 4701857792 bytes Done. PS $ ls Directory: "V:\VM\Hyper-V\VHDs\Data" Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 2019.11.14 08:12:09 Shared -a---- 2019.09.07 08:33:17 4,701,814,784 Shared.vhdx -a---- 2019.11.14 08:08:35 639,322,915 Shared.vhdx.7z -a---- 2019.11.14 07:50:25 4,701,857,792 Shared.iso -a---- 2019.11.14 08:08:35 639,322,915 Shared.vhdx.7z.iso
-