TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.57k stars 245 forks source link

Missing required properties: disks.1.size even for non zvol disks #892

Open sjorge opened 4 years ago

sjorge commented 4 years ago
[root@boron ~]# vmadm create -f bsd.json
Missing required properties: disks.1.size

Disk 1 is a nocreate disk that will be the install media file, so it has no size.

    {
      "model": "virtio",
      "media": "disk",
      "path": "/install66.fs",
      "nocreate": true
    }

If I add a size it works, but the property is not use!

    {
      "model": "virtio",
      "media": "disk",
      "path": "/install66.fs",
      "size": "450",
      "nocreate": true
    }
[root@boron ~]# vmadm get ca8c724f-0642-675d-b806-c231fc1b1fc0 | json disk
[
  {
    "path": "/dev/zvol/rdsk/zones/ca8c724f-0642-675d-b806-c231fc1b1fc0/disk0",
    "boot": false,
    "model": "virtio",
    "media": "disk",
    "pci_slot": "0:4:0",
    "uuid": "6be6d3db-a279-c205-92ea-f2aa9ed9fe8f",
    "zfs_filesystem": "zones/ca8c724f-0642-675d-b806-c231fc1b1fc0/disk0",
    "zpool": "zones",
    "size": 10240,
    "compression": "off",
    "refreservation": 10563,
    "block_size": 8192
  },
  {
    "path": "/install66.fs",
    "boot": false,
    "model": "virtio",
    "media": "disk",
    "pci_slot": "0:4:1",
    "uuid": "f068b082-2358-4222-ceb8-d4e569876fac",
    "missing": true
  }
]

So for non zvol (nocreate) the size restriction should probably relaxed.

sjorge commented 4 years ago

@mgerdts I remeber this use to work just fine at some point in the past, maybe this go introduced with the flexible disks sizing