JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle VM Server for SPARC 2.1 Administration Guide     Oracle VM Server for SPARC
search filter icon
search icon

Document Information

Preface

Part I Oracle VM Server for SPARC 2.1 Software

1.  Overview of the Oracle VM Server for SPARC Software

2.  Installing and Enabling Software

3.  Security

4.  Setting Up Services and the Control Domain

5.  Setting Up Guest Domains

Creating and Starting a Guest Domain

Create and Start a Guest Domain

Installing Oracle Solaris OS on a Guest Domain

Install Oracle Solaris OS on a Guest Domain From a DVD

Install Oracle Solaris OS on a Guest Domain From a Oracle Solaris ISO File

Perform a JumpStart Operation on a Guest Domain

6.  Setting Up I/O Domains

7.  Using Virtual Disks

8.  Using Virtual Networks

9.  Migrating Domains

10.  Managing Resources

11.  Managing Configurations

12.  Performing Other Administration Tasks

Part II Optional Oracle VM Server for SPARC Software

13.  Oracle VM Server for SPARC Physical-to-Virtual Conversion Tool

14.  Oracle VM Server for SPARC Configuration Assistant

15.  Using the Oracle VM Server for SPARC Management Information Base Software

16.  Logical Domains Manager Discovery

17.  Using the XML Interface With the Logical Domains Manager

Glossary

Index

Creating and Starting a Guest Domain

The guest domain must run an operating system that understands both the sun4v platform and the virtual devices presented by the hypervisor. Currently, this means that you must run at least the Oracle Solaris 10 11/06 OS. Running the Oracle Solaris 10 9/10 OS provides you with all the Oracle VM Server for SPARC 2.1 features. See the Oracle VM Server for SPARC 2.1 Release Notes for any specific patches that might be necessary. Once you have created default services and reallocated resources from the control domain, you can create and start a guest domain.

Create and Start a Guest Domain

  1. Create a logical domain.

    For example, the following command would create a guest domain named ldg1.

    primary# ldm add-domain ldg1
  2. Add CPUs to the guest domain.

    For example, the following command would add eight virtual CPUs to guest domain ldg1.

    primary# ldm add-vcpu 8 ldg1
  3. Add memory to the guest domain.

    For example, the following command would add 2 gigabytes of memory to guest domain ldg1.

    primary# ldm add-memory 2G ldg1
  4. Add a virtual network device to the guest domain.

    For example, the following command would add a virtual network device with these specifics to the guest domain ldg1.

    primary# ldm add-vnet vnet1 primary-vsw0 ldg1

    Where:

    • vnet1 is a unique interface name to the logical domain, assigned to this virtual network device instance for reference on subsequent set-vnet or remove-vnet subcommands.

    • primary-vsw0 is the name of an existing network service (virtual switch) to which to connect.


    Note - Steps 5 and 6 are simplified instructions for adding a virtual disk server device (vdsdev) to the primary domain and a virtual disk (vdisk) to the guest domain. To learn how ZFS volumes and file systems can be used as virtual disks, see Export a ZFS Volume as a Single-Slice Disk and Using ZFS With Virtual Disks.


  5. Specify the device to be exported by the virtual disk server as a virtual disk to the guest domain.

    You can export a physical disk, disk slice, volumes, or file as a block device. The following examples show a physical disk and a file.

    • Physical Disk Example. The first example adds a physical disk with these specifics.

      primary# ldm add-vdsdev /dev/dsk/c2t1d0s2 vol1@primary-vds0

      Where:

      • /dev/dsk/c2t1d0s2 is the path name of the actual physical device. When adding a device, the path name must be paired with the device name.

      • vol1 is a unique name you must specify for the device being added to the virtual disk server. The volume name must be unique to this virtual disk server instance, because this name is exported by this virtual disk server to the clients for adding. When adding a device, the volume name must be paired with the path name of the actual device.

      • primary-vds0 is the name of the virtual disk server to which to add this device.

    • File Example. This second example is exporting a file as a block device.

      primary# ldm add-vdsdev backend vol1@primary-vds0

      Where:

      • backend is the path name of the actual file exported as a block device. When adding a device, the back end must be paired with the device name.

      • vol1 is a unique name you must specify for the device being added to the virtual disk server. The volume name must be unique to this virtual disk server instance, because this name is exported by this virtual disk server to the clients for adding. When adding a device, the volume name must be paired with the path name of the actual device.

      • primary-vds0 is the name of the virtual disk server to which to add this device.

  6. Add a virtual disk to the guest domain.

    The following example adds a virtual disk to the guest domain ldg1.

    primary# ldm add-vdisk vdisk1 vol1@primary-vds0 ldg1

    Where:

    • vdisk1 is the name of the virtual disk.

    • vol1 is the name of the existing volume to which to connect.

    • primary-vds0 is the name of the existing virtual disk server to which to connect.


    Note - The virtual disks are generic block devices that are associated with different types of physical devices, volumes, or files. A virtual disk is not synonymous with a SCSI disk and, therefore, excludes the target ID in the disk label. Virtual disks in a logical domain have the following format: cNdNsN, where cN is the virtual controller, dN is the virtual disk number, and sN is the slice.


  7. Set auto-boot? and boot-device variables for the guest domain.

    The first example command sets auto-boot? to true for guest domain ldg1.

    primary# ldm set-var auto-boot\?=true ldg1

    The second example command sets boot-device to vdisk for the guest domain ldg1.

    primary# ldm set-var boot-device=vdisk1 ldg1
  8. Bind resources to the guest domain ldg1 and then list the domain to verify that it is bound.
    primary# ldm bind-domain ldg1
    primary# ldm list-domain ldg1
    NAME          STATE    FLAGS  CONS   VCPU MEMORY   UTIL  UPTIME
    ldg1          bound    -----  5000   8    2G
  9. To find the console port of the guest domain, you can look at the output of the preceding list-domain subcommand.

    You can see under the heading CONS that logical domain guest 1 (ldg1) has its console output bound to port 5000.

  10. Connect to the console of a guest domain from another terminal by logging into the control domain and connecting directly to the console port on the local host.
    $ ssh hostname.domain-name
    $ telnet localhost 5000
  11. Start the guest domain ldg1.
    primary# ldm start-domain ldg1