Reputation: 35374
gcloud compute instance to have hard disk size under 200Gb get warning but when set to 200Gb will get another warning.
When we create instance template, as command 01 below, we have this warning if setting hard disk size 10Gb
WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance
Though when we do set it to 200Gb, we get this warning when creating instance from that template
WARNING: Some requests generated warnings: Disk size: '200 GB' is larger than image size: '10 GB'. You might need to resize the root repartition manually if the operating system does not support automatic resizing. See https://cloud.google.com/compute/docs/disks/persistent-disks#repartitionrootpd for details.
So why you gcloud warn us from the start about the 200Gb? And what should we do to get things set up correctly with no warning?
*command 01 - create instance template
gcloud compute instance-templates create TEMPLATE-NAME
--image='projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20190212' \
--custom-cpu=1 --custom-memory=2 \
--boot-disk-size=200 --boot-disk-type=pd-standard
command 02 - create compute instance from instance template
gcloud compute instances create INSTANCE_NAME \
--source-instance-template TEMPLATE_NAME \
--project=$GC_PROJECT --zone=$zone
Upvotes: 6
Views: 1396