cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
656 stars 225 forks source link

Add a function to build volume images #354

Open Kuanlin-Chen opened 3 years ago

Kuanlin-Chen commented 3 years ago

Add function New-VolumeImage to build volume images, the volume image can be used as a D disk on Openstack instances.

How to use:

Set-IniFileValue -Path (Resolve-Path $ConfigFilePath) -Section "DEFAULT" `
                                                      -Key "image_path" `
                                                      -Value "C:\CloudImage\40G-D-Volume.img"
Set-IniFileValue -Path (Resolve-Path $ConfigFilePath) -Section "DEFAULT" `
                                                      -Key "image_type" `
                                                      -Value "MAAS"
Set-IniFileValue -Path (Resolve-Path $ConfigFilePath) -Section "vm" `
                                                      -Key "disk_size" `
                                                      -Value "42949672960"
New-VolumeImage -ConfigFilePath $ConfigFilePath
AppVeyorBot commented 3 years ago

:white_check_mark: Build windows-openstack-imaging-tools 1.0.265 completed (commit https://github.com/cloudbase/windows-openstack-imaging-tools/commit/5cde37fa03 by @Kuanlin-Chen)

Kuanlin-Chen commented 2 years ago

Excuse me, do you have any plan to promote this feature? If not, it's ok to close this thread.

ader1990 commented 11 months ago

Hello, thank you for the PR. Is there any reason you would like to have a volume image? Maybe dual boot or rescue images?

Kuanlin-Chen commented 11 months ago

It was for our VDI (Virtual Desktop) project which runs on OpenStack platform, customers required a particular volume size like 50GB, 200GB, or even 1TB, the volume will be attached to the Nova instances and works as a D drive on Windows OS.

My purpose was to generate volume images fast and automatically, but I can barely remember the reason why I did this through windows-openstack-imaging-tools rather than using OpenStack cli command, perhaps, we just tried to avoid increasing too much load for OpenStack.