How-to Deploy openSUSE Linux instance virtual machines
Currently ITS Private Cloud Portal UI does not support cloud-init configuration.
Objective
Create an openSUSE virtual machine in the ITS Private Cloud using the VSS-CLI. This guide covers two installation methods: traditional ISO-based installation and cloud-init configuration.
Pre-requisites
A working local VSS-CLI environment
Steps
Create virtual machine through the VSS-CLI
Choose one of the following methods to create your openSUSE VM:
Method 1: ISO-based Installation
Search for the openSUSE iso you need:
vss-cli compute iso public ls -f name=openSUSE%output:
id path name ---- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------- 1053 [vss-Library] ISOs/Linux/OpenSuse/openSUSE-Leap-42.3-DVD-x86_64.iso openSUSE-Leap-42.3-DVD-x86_64.iso 1054 [vss-Library] ISOs/Linux/OpenSuse/openSUSE-Leap-42.3-NET-x86_64.iso openSUSE-Leap-42.3-NET-x86_64.iso 2757 [vss-Library] contentlib-d1fbd8a3-4aaf-4b97-b417-d4f99aac0491/af662d23-7699-4306-b304-f8dedc5ed74a/openSUSE-MicroOS-DVD-x86_64-Current_2ff81abf-8e02-4407-8b0e-afbe660c55f3.iso openSUSE-MicroOS-DVD-x86_64-Current 2758 [vss-Library] contentlib-d1fbd8a3-4aaf-4b97-b417-d4f99aac0491/98e33533-b568-4cd1-8e00-0b39f24eea9f/openSUSE-Tumbleweed-DVD-x86_64-Current_db86cce0-e0ed-4b60-8d58-9464785f8cf3.iso openSUSE-Tumbleweed-DVD-x86_64-Current 2759 [vss-Library] contentlib-d1fbd8a3-4aaf-4b97-b417-d4f99aac0491/9f318200-65ef-4061-9ecf-cfb050ea1ca7/openSUSE-Tumbleweed-NET-x86_64-Current_c7e36be7-dbae-4518-82c8-6ac4b58ad72f.iso openSUSE-Tumbleweed-NET-x86_64-Current 2508 [vss-Library] contentlib-d1fbd8a3-4aaf-4b97-b417-d4f99aac0491/ded3f3be-b654-4666-8d84-a3149cd27aaf/openSUSE-Leap-15.4-NET-x86_64-Media_bbccd27e-8057-4096-b4de-aa168b6ae9fd.iso openSUSE-Leap-15.4-NET-x86_64-MediaRepeat the steps for Network and Folder:
Search for the Network you need:
vss-cli compute net lsYou can filter the Network list with the following command:
vss-cli compute net ls -f name=PUBLICSearch for a Folder:
vss-cli compute folder ls -f name=ORYou can filter the Folder list with the following command:
vss-cli compute folder ls
Create local environment variables for the iso, network and folder using “export” command to simplify the vss-cli command in the next step:
export ISO='[vss-Library] contentlib-d1fbd8a3-4aaf-4b97-b417-d4f99aac0491/9f318200-65ef-4061-9ecf-cfb050ea1ca7/openSUSE-Tumbleweed-NET-x86_64-Current_c7e36be7-dbae-4518-82c8-6ac4b58ad72f.iso' export NET=<dvportgroup-XXXXX> export FOLDER=<group-YYYYY>Create a virtual machine using the vss-cli command and your specifications:
vss-cli --wait compute vm mk shell \ --memory 4 --cpu 2 \ --disk 100 --firmware efi \ --description 'Suse Tumbleweed Server' \ --client EIS --os opensuse64Guest --usage Dev \ --folder $FOLDER --net $NET \ --iso $ISO --storage-type ssd \ --notes 'Suse Tumbleweed demo' \ --vss-service N/A --power-on openSuseTest99Access the server console through vSphere and continue the installation:
vss-cli compute vm get <VM-ID> vsphere-link -l
Method 2: Cloud-init Configuration
Clone the repo from Github
git clone git@github.com:EIS-ITS/cloudinit-openSUSE.gitNavigate to the
cloudinit-openSUSEdirectory in the cloned repo.cd cloudinit-openSUSECustomize your configuration by editing the following files:
cloud-init/network.yamlcloud-init/userdata.yamlspec/openSUSE-Tumbleweed-spec.yaml
Use one of the scripts from the repo, listed below and execute it:
deploy_cli.shdeploy_spec.sh
You can access the virtual machine via
sshssh vss-admin@XXX.XXX.XXX.XXX The authenticity of host 'XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)' can't be established. ED25519 key fingerprint is SHA256:WgvWDq2aTO8tyee4eX8nlAsrVC/K/DW8/LN9QyfQfy8. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'XXX.XXX.XXX.XXX' (ED25519) to the list of known hosts. Have a lot of fun... vss-admin@opensuse-cloud-test:~>
Reference
https://documentation.suse.com/sles/15-SP4/single-html/SLES-minimal-vm/index.html
https://en.opensuse.org/Portal:Tumbleweed
How-to Deploy an Ubuntu Server or AlmaLinux instance with the vss-cli
University of Toronto - Since 1827