The simplest way to obtain a virtual machine image that works withOpenStack is to download one that someone else has alreadycreated. Most of the images contain the cloud-init package tosupport the SSH key pair and user data injection.Because many of the images disable SSH password authenticationby default, boot the image with an injected key pair.You can SSH into the instance with the private key and defaultlogin account. See Configure access and security for instancesfor more information on how to create and inject key pairs with OpenStack.
Cloudbase Solutions provides the last available trial versionof Windows Server 2012 R2.This image includes cloudbase-init plus VirtIO drivers on KVM.You can build your own image based on Windows Server 2016, 2019,Windows 10 etc) with Cloudbase Imaging Tools.
If your deployment uses QEMU or KVM, we recommend using the imagesin qcow2 format, with name ending in .img.The most recent version of the 64-bit amd64-arch QCOW2 image forUbuntu 18.04 isbionic-server-cloudimg-amd64-disk.img.
The installer may ask you to choose a host name.The default (ubuntu) is fine. We will install the cloud-initpackage later, which will set the host name on boot when a newinstance is provisioned using this image.
When building Ubuntu images cloud-init must beexplicitly configured for the metadata source in use.The OpenStack metadata server emulates the EC2 metadataservice used by images in Amazon EC2.
The underlying image file that you created with theqemu-img create command, such as/var/lib/libvirt/images/bionic.qcow2,is now ready for uploading to the Image service by using theopenstack image create command. For more information,see the Glance User Guide.
Ubuntu Cloud Images are the official Ubuntu images and are pre-installeddisk images that have been customized by Ubuntu engineering to run onpublic clouds that provide Ubuntu Certified Images, Openstack, LXD, and more.
Also, what about the elusive cloud-init options to guest images? Where can I find instructions on how to use those? From the terminal and from the web UI? I once had to go fishing for this information in the source code.
What I found so far is the site listing the available images, but one that doesn't state what are the formats of the images - I always have to google for this information. There is the UEC wiki that lists many recipes on how to create your own images, but not how to use existing ones (or the premade ubuntu cloud images). Then there is the most easily found "cloud" category on ubuntu.com that only links to some promotional pamphlets and the uninformative cloud images listing.
I was having the same issue, so I ended up downloading all the "trusty-server-cloudimg-amd64" prefixed images. There was a tar which when unzipped contained a README.files that provided some information:
This compressed tar archive contains files relevant to this machine image.Each filename is prefixed by a constant string denoting release andarchitecture information. The prefix, for example, may be'maverick-server-cloudimg-amd64', in which case files will be named like maverick-server-cloudimg-amd64.img maverick-server-cloudimg-amd64-vmlinuz-virtual
-floppyThis file is a floppy disk image. It is not useful or relevant torunning inside of EC2 or UEC.The purpose of this file is to allow booting the .img outside a cloud.To boot outside of a cloud environment (where a metadata service is notpresent), the following kvm command line can be used: kvm -boot a -fda -floppy -drive file=.img,if=virtioThis is not necessary, and generally obsolete, if -disk1.img isavailable.
If you landed here searching for clues on how to get cloud-images working in virt-manager or on KVM using virsh commands, see my answer regarding the modern file formats here: What are the different versions available as Ubuntu cloud-images?
In the previous recipe, we installed and configured OpenStack. Now, to start using the service, we need to upload virtual machine images. The OpenStack installation uploads a test image named Cirros. This is a small Linux distribution designed to be used as a test image in the cloud. We will upload prebuilt cloud images available from Ubuntu.
Select the cloud image of your choice and get its download URL. Here, we will use the Trusty Ubuntu Server image. The selected image format is QCOW2, though OpenStack support various other image formats. The following is the URL for the selected image:
OpenStack is a cloud virtualization platform and needs operating system images to launch virtual machines in the cloud. The Glance OpenStack imaging service provides the image-management service. It supports various types of image, including Qemu format, raw disk files, ISO images, and images from other virtualization platforms, as well as Docker images. Like every other thing in OpenStack, image management works with the help of APIs provided by Glance.
OpenStack, being a cloud platform, is expected to have ready-to-use images that can be used to quickly start a virtual instance. It is possible to upload the operating system installation disk and install the OS to a virtual instance, but that would be a waste of resources. Instead, it is preferable to have prebuilt cloud images. Various popular operating systems provide their respective cloud images, which can be imported to cloud systems. In the previous example, we used the Ubuntu Cloud image for the Ubuntu Trusty release.
We imported the image by specifying its source URI. Local image files can also be uploaded by selecting the image file as an image source. You can also build your own images and upload them to the image store to be used in the cloud. Along with the image source, we need to provide a few more parameters, which include the type of the image being uploaded and the minimum resource requirements of that image. Once the image has been uploaded, it can be used to launch a new instance in the cloud. Also, the image can be marked as public so that it is accessible to all OpenStack users. You will need specific rights for your OpenStack account to create public images.
Here are some shortcuts to get you up and running with Ubuntu on various public clouds. You can also use our Ubuntu Cloud image finder to search for the ids of specific Ubuntu images on various public clouds by location, architecture, release and more.
My assumption is, the password property you are setting gets reset when the VM is starting, because the cloud-init disables the password-authentication by default. May be you can try mounting the image and configure the cloud.cfg as below:
The image you have has cloud-init installed. This means you can useNoCloud datasource to load the configuration from a floppy(vfat) or cd(ISO9660) image.In that image you can have a cloud-config file where you can configure the ssh keys
But,
I did find the following which describes recommended settings for building openSUSE/SUSE cloud images which assuming was applied to the image should get you logged in(basically no root password, make SSH keys available with standard client setup as described in LEAP documentation)
=SUSE_Cloud/Images
Thanks tsu2! I initially tried building my own image from the generic iso using VirtualBox and then converting to qcow2, but I ran into issues after uploading to OpenStack because it was trying to find a disk by UUID. After a few minutes of trying to edit different files to overcome that without success, I reverted to the pre-built cloud images.
I'm having some issues with some private code, and as part of the debugging process, would like to know exactly what packages are on the image, and particularly how the cloud image differs from the Ubuntu Server and Ubuntu Desktop.
My day-to-day involves generating Ubuntu cloud images. A useful skill fornew hires is to know how to launch these cloud images locally. WhileMultipass andLXD VMsmake running Ubuntu in a VM super easy, sometimes it is necessary to launch acustom image with specific parameters.
Ubuntu creates cloud images for use with a wide variety of platforms. Fromimages uploaded to various public clouds, like Amazon Web Services, MicrosoftAzure, and Google Cloud, to local images that are bootable with QEMU, VMware,Vagrant, and others. These local images are published at -images.ubuntu.com.
Images are published daily when any package in the images change. In practice,this means a new image may not be available every day. A release image ispublished when one of a specific set of packages that are critical to theimage is updated, like the kernel, grub, or cloud-init. Additionally, if asecurity update occurs that is critical a release image may get published.
Most of the images found on the cloud-images.ubuntu.com are the standard serverimage. However, there are also a set ofminimal Ubuntu images, whichhave a reduced package for a smaller image and reduced attack surface. Theseimages also come with a custom kernel for even faster operations.
When instances are launched in a cloud deploymentcloud-init will search for adatasource to retrieve instance metadata. This data is used to determine whatusers to create, set a hostname, networking configuration, and many otherpossible configuration settings. Cloud images will take in two types of data:
In the case of launching a local QEMU image, the user needs to provide alocal datasource for the cloud image to read from. From this datasource, theinstance can read both the metadata and/or user data to configure the system.
To provide the local datasource, users create a seed image containing themetadata, user data, and even networking information. The cloud-localdscommand from the cloud-image-utils package is used to generate the seed image.
-nographic disables the graphical output and makes the command treat theQEMU command as a CLI application. This is nice since most use cases forcloud images do not need graphical output and it is helpful to see the serialconsole during boot. Type x to quit the process. More on thisin the QEMU Escape Keys section below.
df19127ead