This section shows examples of the following Oracle VM Server for SPARC template tasks:
The following ovmtcreate command creates a template based on the ldg1 domain called ovmtcreate_example. Note that the resulting template name has the .ova suffix.
# ovmtcreate -d ldg1 -o ovmtcreate_example Oracle Virtual Machine for SPARC Template Creation Utility ovmtcreate Version: 3.3.0.0.12 Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. STAGE 1 - EXAMINING SYSTEM AND ENVIRONMENT ------------------------------------------- Performing platform & prerequisite checks Checking user permissions Checking for required packages Checking for required services Checking directory permissions STAGE 2 - ANALYZING DOMAIN --------------------------- Retrieving and processing attributes Checking domain state Getting domain resource settings Discovering network topology Discovering disk topology STAGE 3 - ARCHIVE CREATION --------------------------- Checking destination and current directory capacity Compressing disk image Creating XML configuration Calculating manifest checksums Creating archive file Checking archive PROCESS COMPLETED ------------------ Started: Tue Aug 18 15:29:14 PDT 2015 Completed: Tue Aug 18 15:41:25 PDT 2015 Elapsed time: 0:12:11Example 77 Configuring Oracle VM Server for SPARC Template Properties
You can use the ovmtconfig and ovmtprop utilities to specify Oracle VM Server for SPARC template property values and Oracle Solaris OS property values, respectively.
The following ovmtconfig command performs configuration operations directly on the ldg1 domain's file system.
The –c option specifies the /opt/ovmtutils/share/scripts/ovmt_s11_scprofile.sh script to set property values. The –p option specifies particular values for the com.oracle.solaris.network.ipaddr and com.oracle.solaris.system.computer-name properties.
# ovmtconfig -v -d ldg1 -f -s \ -c /opt/ovmtutils/share/scripts/ovmt_s11_scprofile.sh \ -p com.oracle.solaris.network.ipaddr.0=10.153.118.211,\ com.oracle.solaris.system.computer-name=system1 Oracle Virtual Machine for SPARC Configuration Utility ovmtconfig Version: 3.3.0.0.12 Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. STAGE 1/7 - EXAMINING SYSTEM AND ENVIRONMENT -------------------------------- Checking operating system Checking platform type Checking user permissions Checking packages Checking host domain name Checking host domain type Checking services STAGE 2/7 - PROCESSING COMMAND LINE OPTIONS ------------------------------- Parsing individual properties Creating consolidated properties list STAGE 3/7 - ANALYZING TARGET DOMAIN ----------------------- Stopping domain ldg1 Analyzing domain disk topology for domain ldg1 Discovering 1 volumes for vDisks Examining 1 backend devices unbinding domain ldg1 Creating 1 virtual disks for back mount Created virtual disk 0 STAGE 4/7 - PERFORMING BACKMOUNT -------------------- Finding Solaris device for vdisks Importing zpools for 1 Solaris devices Detected conflicting zpool name, attempting rename Getting boot file system for properties in 1 zpool Setting properties in 1 zpools Mounting ZFS file systems Mounting ZFS found in zpool rpool_1 STAGE 5/7 - PERFORMING ACTIONS ON TARGET DOMAIN ----------------------------------- STAGE 6/7 - UNMOUNTING AND RESTORING DOMAIN STATE ------------------------------------- Rolling back commands DEBUG [20150819-07:02:42]: Rolling back 8 /usr/sbin/zfs unmount -f rpool_1/ROOT/solaris/var completed STAGE 7/7 - SETTING TARGET DOMAIN ENVIRONMENT --------------------------------- Checking 2 properties to set as domain variables /opt/ovmtutils/bin/agent/lib/ldoms/ldmxml.py:1692: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if outgoing: .. Starting domain Process completed
The following ovmtprop command specifies Oracle Solaris OS property values.
# ovmtprop set-prop com.oracle.solaris.system.computer-name=test ldg1 Oracle Virtual Machine for SPARC Properties Utility ovmtprop Version: 3.3.0.0.12 Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. /opt/ovmtutils/bin/agent/lib/ldoms/ldmxml.py:1692: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if outgoing: solaris property set via VM-API
Use the ldm list -l command to verify that the value for the com.oracle.solaris.system.computer-name property is test.
# ldm ls -l ldg1 NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME ldg1 active -n---- 5000 16 16G 0.0% 0.0% 2h 7m .. CONSTRAINT VARIABLES auto-boot?=true VMAPI TO GUEST com.oracle.solaris.fmri.count=0 com.oracle.solaris.system.computer-name=test
The following ovmtdeploy command creates a domain called ldg1 by using the ovmtcreate_example.ova Oracle VM Server for SPARC template in the /export/ovmtdeploy directory.
# ovmtdeploy -d ldg1 -o /export/ovmtdeploy ovmtcreate_example.ova Oracle Virtual Machine for SPARC Deployment Utility ovmtdeploy Version 3.3.0.0.12 Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. STAGE 1 - EXAMINING SYSTEM AND ENVIRONMENT ------------------------------------------ Checking user privilege Performing platform & prerequisite checks Checking for required services Named resourced available STAGE 2 - ANALYZING ARCHIVE & RESOURCE REQUIREMENTS --------------------------------------------------- Checking .ova format and contents Validating archive configuration Checking sufficient resources present WARNING: Virtual switch primary-vsw0 already exists STAGE 3 - EXTRACTING ARCHIVE ---------------------------- Extracting archive Validating checksums Decompressing disk image(s) STAGE 4 - DEPLOYING DOMAIN -------------------------- Creating domain and adding resources Validating deployment Domain created:
The ldm list output shows that you have created a new domain called ldg1.
# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME primary active -n-cv- UART 8 40G 1.4% 1.1% 6d 2h 18m ldg1 active -n---- 5000 8 8G 41% 38% 28sExample 79 Managing the Oracle VM Server for SPARC Template Library
The ovmtlibrary command manages a database and file-system-based repository for Oracle VM Server for SPARC templates by organizing files and by storing, retrieving, and editing information in the database.
The following command creates a template library in export/user1/ovmtlibrary_example:
# ovmtlibrary -c init -l /export/user1/ovmtlibrary_example Oracle Virtual Machine for SPARC Template Library Utility ovmtlibrary Version: 3.3.0.0.12 Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. Init complete
The following command stores the sol-11_2-ovm-2-sparc.ova template in the export/user1/ovmtlibrary_example library:
# ovmtlibrary -c store -d "ovmtlibrary example" -o http://system1.example.com/s11.2/templates/sol-11_2-ovm-2-sparc.ova -l /export/user1/ovmtlibrary_example Oracle Virtual Machine for SPARC Template Library Utility ovmtlibrary Version: 3.3.0.0.12 Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. Templates present in path "/export/user1/ovmtlibrary_example" event id is 2 ******************************************************************************** converted 'http://system1.example.com/s11.2/templates/sol-11_2-ovm-2-sparc.ova' (646) -> 'http://system1.example.com/s11.2/templates/sol-11_2-ovm-2-sparc.ova' (UTF-8) --2015-08-18 16:37:17-- http://system1.example.com/s11.2/templates/sol-11_2-ovm-2-sparc.ova Resolving system1.example.com (system1.example.com)... 10.134.127.18 Connecting to system1.example.com (system1.example.com)|10.134.127.18|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1018341888 (971M) [text/plain] Saving to: '/export/user1/ovmtlibrary_example/repository/templates/1/1/sol-11_2-ovm-2-sparc.ova' /export/user1/ovmtlibrary_example/repo 100% [==============================================================================>] 971.17M 6.05MB/s in 5m 37s 2015-08-18 16:42:55 (2.88 MB/s) - '/export/user1/ovmtlibrary_example/repository/templates/1/1/sol-11_2-ovm-2-sparc.ova' saved [1018341888/1018341888] ******************************************************************************** Download complete Extracting the ova file... Extract complete Decompress file System.img.gz Store complete
The following command lists the contents of the export/user1/ovmtlibrary_example library:
# ovmtlibrary -c list -l /export/user1/ovmtlibrary_example Oracle Virtual Machine for SPARC Template Library Utility ovmtlibrary Version: 3.3.0.0.12 Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. Templates present in path "/export/user1/ovmtlibrary_example" ID Name Version Description Date -------------------------------------------------------------------------------- 1 sol-11_2-ovm-2-sparc 1 ovmtlibrary example 2015-08-18
The following command shows a detailed listing of the export/user1/ovmtlibrary_example library:
# ovmtlibrary -c list -i 1 -o -l /export/user1/ovmtlibrary_example Oracle Virtual Machine for SPARC Template Library Utility ovmtlibrary Version: 3.3.0.0.12 Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. Templates present in path "/export/user1/ovmtlibrary_example" ID Name Type Path Size(bytes) -------------------------------------------------------------------------------- 1 sol-11_2-ovm-2-sparc.ova ova /export/user1/ovmtlibrary_example/repository/templates/1/1/sol-11_2-ovm-2-sparc.ova 1018341888 2 sol-11_2-ovm-sparc.ovf ovf /export/user1/ovmtlibrary_example/repository/templates/1/1/sol-11_2-ovm-sparc.ovf 3532 3 sol-11_2-ovm-sparc.mf mf /export/user1/ovmtlibrary_example/repository/templates/1/1/sol-11_2-ovm-sparc.mf 137 4 System.img img /export/user1/ovmtlibrary_example/repository/templates/1/1/System.img 21474836480