Govc vm.disk.change -vm Ubuntu1804Template -disk.label "Hard disk 1" -size 60G govc import.ova -options=ubuntu.json ~/Downloads/Ĭhange the VM size to 4 vCPUs, 4GB RAM, 60GB disk and set the disk.enableUUID=1 flag (needed for disk identification from the vSphere Cloud Provider in Kubernetes) govc vm.change -vm Ubuntu1804Template -c 4 -m 4096 -e="disk.enableUUID=1"
Ubuntu vmware image for mac download#
"Value": "ssh-rsa ]]] "ĭeploy the OVA with the customised OVF spec (you can pass the OVA URL to the below command instead of the file on your system, but it will first download to your local computer, then upload to the vCenter, it doesn’t hand off the download operation so is no faster).
You can get your SSH public key by running cat ~/.ssh/id_rsa.pub – note if you run this command and you don’t get an output – you probably need to generate an SSH key with ssh-keygen. It is necessary to set public-keys as Ubuntu cloud images (which the OVAs are) only allow SSH key auth from first-boot – no password-only auth. I changed hostname, public-keys, Password, Network and Name. Use govc to pull the OVF spec from the Ubuntu OVA we just downloaded, for customisation (this will output the spec to a file in your current directory called ubuntu.json): govc import.spec ~/Downloads/ | python -m json.tool > ubuntu.json UUID: 1bd33d4e-555f-4d8b-9b77-8d155f612155īuilding the image Extract the OVF spec from the OVA Next, we need to load the variables into our current shell session: source govcvars.shĪt this point we should be able to connect to and query our vCenter: $ govc about I created a file called govcvars.sh with the following content – create one for yourself filling in the relevant details: $ cat govcvars.shĮxport GOVC_INSECURE=1 # Don't verify SSL certs on vCenterĮxport GOVC_URL=10.198.17.84 # vCenter IP/FQDNĮxport # vCenter usernameĮxport GOVC_PASSWORD=Admin\!23 # vCenter passwordĮxport GOVC_DATASTORE=vsanDatastore # Default datastore to deploy toĮxport GOVC_NETWORK="VM Network" # Default network to deploy toĮxport GOVC_RESOURCE_POOL='*/Resources' # Default resource pool to deploy to With the OVA downloaded, we need to configure a few variables for govc to connect to our vCenter, handily, rather than having to define them on the CLI for every command, we can just export them as variables to our current shell.
We are going to need the Ubuntu 18.04 LTS Cloud image OVA from Canonical’s repo downloaded to our local machine in order to extract the OVF specifications from it, the OVA can be found here:
Ubuntu vmware image for mac install#