Retrieve disk format and virtual size directly (#1274)

When uploading disks to libvirt storage it is unnecessary to require
that the virtual size or the format be provided as these can be
retrieved by calling qemu-img on the box files to retrieve the required
information.

Update the handle box image support to separate the handling of the two
different formats and remove the need to specify the additional settings
in the case of the V2 format for multi disk boxes.
This commit is contained in:
Darragh Bailey
2021-05-10 23:02:25 +01:00
committed by GitHub
parent 70c4136836
commit 98ff2dfb51
5 changed files with 86 additions and 50 deletions

View File

@@ -17,15 +17,12 @@ then
cat > "${NEW_PATH}/${BOX_VERSION}/libvirt/metadata.json" <<EOF
{
"provider": "libvirt",
"format": "qcow2",
"disks" : [
{
"virtual_size": 2
},
{
{
},
{
"path":"disk2.qcow2",
"virtual_size":10
}
}
]
}
EOF