Opennebula 5.10 Operation Guide Release 5.10.5
Total Page:16
File Type:pdf, Size:1020Kb
OpenNebula 5.10 Operation Guide Release 5.10.5 OpenNebula Systems Sep 21, 2020 This document is being provided by OpenNebula Systems under the Creative Commons Attribution-NonCommercial- Share Alike License. THE DOCUMENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM- PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DOCUMENT. i CONTENTS 1 Hosts and Clusters Management1 1.1 Overview.................................................1 1.2 Hosts...................................................1 1.3 Clusters..................................................7 1.4 Scheduler................................................. 12 1.5 Datastores................................................ 17 1.6 NUMA and CPU Pinning........................................ 19 2 Users and Groups 28 2.1 Overview................................................. 28 2.2 Managing Users............................................. 29 2.3 Managing Groups............................................ 38 2.4 Managing VDCs............................................. 45 2.5 Managing Permissions.......................................... 48 2.6 Managing ACL Rules.......................................... 52 2.7 Managing Quotas............................................. 57 2.8 Accounting Client............................................ 64 2.9 Showback................................................. 72 3 Virtual Network Management 77 3.1 Overview................................................. 77 3.2 Virtual Networks............................................. 77 3.3 Virtual Routers.............................................. 96 3.4 Security Groups............................................. 100 3.5 Virtual Networks Templates....................................... 104 3.6 Virtual Network Self-Provisioning.................................... 106 4 Virtual Machine Management 108 4.1 Overview................................................. 108 4.2 Managing Images............................................ 108 4.3 Managing Virtual Machine Templates.................................. 117 4.4 Managing Virtual Machines Instances.................................. 135 4.5 vCenter Specifics............................................. 159 5 Virtual Machine Setup 167 5.1 Overview................................................. 167 5.2 Open Cloud Contextualization...................................... 167 5.3 vCenter Contextualization and Customization.............................. 171 5.4 vCenter Contextualization........................................ 172 5.5 Adding Content to Your Cloud...................................... 178 ii 6 Cloud End-User 189 6.1 Overview................................................. 189 6.2 Self-service Cloud View......................................... 189 6.3 Group Admin View........................................... 198 7 References 209 7.1 Overview................................................. 209 7.2 Virtual Machine Definition Template.................................. 209 7.3 Virtual Machines States Reference.................................... 233 7.4 Image Definition Template........................................ 236 7.5 Image States Reference......................................... 238 7.6 Host States Reference.......................................... 239 7.7 Virtual Network Definition........................................ 239 7.8 Command Line Interface......................................... 244 iii CHAPTER ONE HOSTS AND CLUSTERS MANAGEMENT 1.1 Overview A Host is a server that has the ability to run Virtual Machines and that is connected to OpenNebula’s Front-end server. OpenNebula can work with Hosts with a heterogeneous configuration, i.e. you can connect Hosts to the same OpenNebula with different hypervisors or Linux distributions. To learn how to prepare the hosts you can read the Node Installation guide. Clusters are pools of hosts that share datastores and virtual networks. 1.1.1 How Should I Read This Chapter In this chapter there are four guides describing these objects. • Host Management: Host management is achieved through the onehost CLI command or through the Sun- stone GUI. You can read about Host Management in more detail in the Managing Hosts guide. • Cluster Management: Hosts can be grouped in Clusters. These Clusters are managed with the onecluster CLI command, or through the Sunstone GUI. You can read about Cluster Management in more detail in the Managing Clusters guide. • Scheduler: Where you’ll learn how to change the scheduling configuration to suit your needs. For example changing the scheduling policies or the number of VMs that will be sent per host. • Datastore: Where you’ll learn about how to confgure and manage the different types of datastore types. You should read all the guides in this chapter to familiarize with these objects. For small and homogeneous clouds you may not need to create new clusters. 1.1.2 Hypervisor Compatibility These guides are compatible with all hypervisors. Note: Linux hosts will be mentioned when the information is applicable to LXD and KVM 1.2 Hosts In order to use your existing physical nodes, you have to add them to the system as OpenNebula Hosts. To add a host only its hostname and type is needed. Hosts are usually organized in Clusters, you can read more about it in the 1 OpenNebula 5.10 Operation Guide, Release 5.10.5 Managing Clusters guide. Warning: Before adding a Linux host check that you can ssh to it without being prompt for a password. 1.2.1 Create and Delete Hosts Hosts are the servers managed by OpenNebula responsible for Virtual Machine execution. To use these hosts in OpenNebula you need to register them so they are monitored and made available to the scheduler. Creating a host: $ onehost create host01 --im kvm --vm kvm ID:0 The parameters are: • --im/-i: Information Manager driver. • --vm/-v: Virtual Machine Manager driver. To remove a host, just like with other OpenNebula commands, you can either specify it by ID or by name. The following commands are equivalent: $ onehost delete host01 $ onehost delete0 1.2.2 Showing and Listing Hosts To display information about a single host the show command is used: HOST0 INFORMATION ID :0 NAME : server CLUSTER : server STATE : MONITORED IM_MAD : kvm VM_MAD : kvm LAST MONITORING TIME : 05/28 00:30:51 HOST SHARES TOTAL MEM :7.3G USED MEM(REAL):4.4G USED MEM(ALLOCATED) : 1024M TOTAL CPU : 400 USED CPU(REAL): 28 USED CPU(ALLOCATED): 100 TOTAL VMS :1 LOCAL SYSTEM DATASTORE #0 CAPACITY TOTAL: : 468.4G USED: : 150.7G FREE: : 314.7G MONITORING INFORMATION ARCH="x86_64" 1.2. Hosts 2 OpenNebula 5.10 Operation Guide, Release 5.10.5 CPUSPEED="1599" HOSTNAME="server" HYPERVISOR="kvm" IM_MAD="kvm" MODELNAME="Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz" NETRX="0" NETTX="0" RESERVED_CPU="" RESERVED_MEM="" VERSION="5.00.0" VM_MAD="kvm" WILD VIRTUAL MACHINES NAME IMPORT_ID CPU MEMORY VIRTUAL MACHINES ID USER GROUP NAME STAT UCPU UMEM HOST TIME 13 oneadmin oneadmin kvm1-13 runn0.0 1024M server 8d 06h14 The information of a host contains: • General information of the hosts including its name and the drivers used to interact with it. • Capacity information (Host Shares) for CPU and memory. • Local datastore information (Local System Datastore) if the Host is configured to use a local datastore (e.g. Filesystem in ssh transfer mode). • Monitoring Information, including PCI devices • Virtual Machines actives on the hosts. Wild are virtual machines actives on the host but not started by Open- Nebula, they can be imported into OpenNebula. To see a list of all the hosts: $ onehost list ID NAME CLUSTER RVM ALLOCATED_CPU ALLOCATED_MEM STAT 0 server server1 100/ 400(25%) 1024M /7.3G(13%) on 1 kvm1 kvm0 - - off 2 kvm2 kvm0 - - off The above information can be also displayed in XML format using -x. 1.2.3 Host Life-cycle: Enable, Disable, Offline and Flush In order to manage the life cycle of a host it can be set to different operation modes: enabled (on), disabled (dsbl) and offline (off). The different operation status for each mode is described by the following table: 1.2. Hosts 3 OpenNebula 5.10 Operation Guide, Release 5.10.5 OP. MODE MONITORINGVM DEPLOY- MEANING MENT MAN- SCHED UAL ENABLED Yes Yes Yes The host is fully operational (on) UPDATE Yes Yes Yes The host is being monitored (update) DISABLED Yes Yes No Disabled, e.g. to perform maintenance operations (dsbl) OFFLINE No No No Host is totally offline (off) ERROR (err) Yes Yes No Error while monitoring the host, use onehost show for the error description. RETRY Yes Yes No Monitoring a host in error state (retry) The onehost tool includes three commands to set the operation mode of a host: disable, offline and enable, for example: $ onehost disable0 To re-enable the host use the enable command: $ onehost enable0 Similarly to put the host offline: $ onehost offline0 The flush command will migrate all the active VMs in the specified host to another server with enough capac- ity. At the same time, the specified host will be disabled, so no more Virtual Machines are deployed in it. This command is useful to clean a host of active VMs. The migration process can be done by a resched action or by a recover delete-recreate action, it can be configured at the /etc/one/cli/onehost.yaml by setting the