I have installed OpenNebula and Sunstone, but I have no images available for running.
I found documentation on how to create image template and submit it to OpenNebula, but this documentation assumes that I already have an image of OS and I do not know how to make one.
I want to run Ubuntu Server instances on my cloud. Is there any prepared images for OpenNebula that I could download and register with my cloud system?
Another interesting way would be to take existing OS Installation (Disk Image) and submit is as such to cloud? Is that开发者_如何学JAVA possible with KVM and OpenNebula?
The straight-way to achieved this, it's to install something like virt-manager on your desktop pc and use it to make a minimal Ubuntu Server installation (using RAW or QCOW2 as disk format, depending on what hypervisors you plans to use in OpenNebula).
Use the Contextualization guide to setup it: http://opennebula.org/documentation:rel3.0:cong
When it's ready, transfer the image into your OpenNebula cloud and it will work.
You can use virt-manager. If you use virtio disks in OpenNebula make sure you use virtio in virt-manager also or else you'll have to fiddle with /etc/fstab once you import the image in OpenNebula.
When installing, you can remove the swap partition, OpenNebula can add a separate swap disk when you instantiate the template.
After the base system is installed you can add additional software/repos as required.
The next step is to prepare the VM image for contextualization. Basically this involves installing the one-context package, which will remove the network/cd udev rules, network configs, and add an init script to run at boot time. This script reads /etc/one.context.d/* and executes each file in order. More details
If you want to walk the extra mile, you should also remove the host ssh keys, clean root's bash history and clean the logs, temp files and caches (we want the new VMs fresh, don't we?) More details
You can do all this from sunstone: 1) upload an iso of your favorite OS installer. Store this as a CD image. 2) create an empty datablock image large enough to boot off of. 3) create a template that uses the above two images as local drives. 4) instantiate the template 5) when the VM boots, go through the install, then shutdown. 6) remove the installer CD from the template and the instance
You can now create more instances of the template.
Install the opennebula software latest version by following the guidelines given by https://github.com/OpenNebula/addon-lxdone/blob/master/Setup.md and then set the host. 1) Download the iso file of your desired Operating system. And upload the iso file in storage function by selecting the image option and click create and add new image 2) Also Add an HDD storage image for the ios file as Datablock 3)Then Create Template for the VM with the Image that we have created 4) using that image upload the VM
精彩评论