Update OpenStack Glance images

Upload new image(s)

 
IMGDIR=/var/www/images
 
# Windows Server 2016 Standard
openstack image create "Windows Server 2016 Standard (NEW)" \
    --file ${IMGDIR}/windows-server-2016-standard.raw \
    --disk-format raw \
    --min-disk 20 \
    --min-ram 2048 \
    --community \
    --property hw_scsi_model=virtio-scsi \
    --property hw_disk_bus=scsi \
    --property hw_qemu_guest_agent=yes \
    --property os_distro=windows \
    --property os_admin_user=Administrator \
    --property os_version="2016" \
    --property os_build="14393.3384"
#    --protected \
 
openstack image set --protected "Windows Server 2016 Standard"
 
 
# Windows Server 2019 Standard
openstack image create "Windows Server 2019 Standard (NEW)" \
    --file $IMGDIR/windows-server-2019-standard.raw \
    --disk-format raw \
    --min-disk 20 \
    --min-ram 2048 \
    --community \
    --property hw_scsi_model=virtio-scsi \
    --property hw_disk_bus=scsi \
    --property hw_qemu_guest_agent=yes \
    --property os_distro=windows \
    --property os_admin_user=Administrator \
    --property os_version="2019" \
    --property os_build="17763.914"
#    --protected \
 
openstack image set --protected "Windows Server 2019 Standard"

Show community images (unprivileged user

# List community images
openstack image list --community
 
# Create test VMs
openstack server create foo-win2016-new \
    --image $(openstack image list --community --name "Windows Server 2016 Standard (NEW)" -c ID -f value) \
    --flavor m1.medium
 
openstack server create foo-win2019-new \
    --image $(openstack image list --community --name "Windows Server 2019 Standard (NEW)" -c ID -f value) \
    --flavor m1.small

Update images

# Windows Server 2016 Standard
openstack image set --community "Windows Server 2016 Standard"
openstack image set --name "Windows Server 2016 Standard (14393.2670)" "Windows Server 2016 Standard"
 
openstack image set --name "Windows Server 2016 Standard" "Windows Server 2016 Standard (NEW)"
openstack image set --public "Windows Server 2016 Standard"
 
# Windows Server 2019 Standard
openstack image set --community "Windows Server 2019 Standard"
openstack image set --name "Windows Server 2019 Standard (17763.194)" "Windows Server 2019 Standard"
 
openstack image set --name "Windows Server 2019 Standard" "Windows Server 2019 Standard (NEW)"
openstack image set --public "Windows Server 2019 Standard"