Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

ldmp2v (8)

Name

ldmp2v - command-line interface for the Oracle VM Server for SPARC Physical-to-Virtual (P2V) Conversion Tool

Synopsis

ldmp2v collect [-a flash|none] [-O "flarcreate-options"] [-v] [-x mount-point [-x ...]]
  -d data-dir

ldmp2v prepare [-b zvol|file|disk] [-B backend:volume:vdisk [-B ...]]
  [-c cpu] [-m mount-point:size [-m ...]] [-M memsize]
  [-o keep-hostid] [-o keep-mac] [-p prefix]
  [-s] [-v] [-x no-auto-adjust-fs] [-x remove-unused-slices]
  -d data-dir domain-name

ldmp2v prepare -R guest-root  [-c cpu] [-M memsize] [-o keep-hostid] [-o keep-mac]
  [-v] -d data-dir domain-name

ldmp2v prepare -C domain-name

ldmp2v convert -i install-image -d data-dir [-v] [-x skip-ping-test] domain-name

ldmp2v convert [-j] -n interface -d data-dir [-v] [-x skip-ping-test] domain-name

Description

The Oracle VM Server for SPARC Physical-to-Virtual (P2V) Conversion Tool automatically converts an existing physical system to a virtual system that runs the Oracle Solaris 10 OS in a logical domain on a chip multithreading (CMT) system. The source system can be any sun4u SPARC system that runs at least the Solaris 8, Solaris 9, or Oracle Solaris 10 OS, or a non-Logical Domains sun4v system that runs the Oracle Solaris 10 OS. An image of the source system is converted into an Oracle VM Server for SPARC domain, upgrading to the current Oracle Solaris 10 version during the process, if necessary.


Note - The ldmp2v command does not support any SPARC system that runs the Oracle Solaris 10 OS with a ZFS root or the Oracle Solaris 11 OS.

    The conversion from a physical system to a virtual system is performed in the following phases:

  • Collection phase. Runs on the physical source system. collect creates a file system image of the source system based on the configuration information that it collects about the source system.

  • Preparation phase. Runs on the control domain of the target system. prepare creates the logical domain on the target system based on the configuration information collected in the collect phase. The file system image is restored to one or more virtual disks. The image is modified to enable it to run as a logical domain.

  • Conversion phase. Runs on the control domain of the target system. In the convert phase, the created logical domain is converted into a logical domain that runs the Solaris 10 OS by using the standard Solaris upgrade process.

The following sections describe how the conversion from a physical system to a virtual system is performed in phases.

Collection Phase

ldmp2v collect [-a flash|none] [-O "flarcreate-options"] [-v] [-x mount-point [-x ...]]
  -d data-dir

The ldmp2v collect command uses the following options:

–a flash|none

Specifies the archiving method to use. Valid values are flash or none. The default is flash.

–O "flarcreate-options"

Specifies a quoted list of options to pass to the flarcreate command. The only flarcreate options permitted are –c and –x. The –c option compresses the archive, and the –x option excludes files or directories from the archive. You can specify more than one flarcreate option. The –O option can be used only when you use –a flash to specify the flash archive method.

–v

Uses verbose mode, which increases the verbosity of the messages that are issued by ldmp2v.

–x mount-point

Excludes the file system, mounted on mount-point, from the archive.

–d data-dir

Specifies the per-system directory in which to store P2V files. For the collection phase, this directory must be writable by root. Any intermediate directories are created automatically.

Preparation Phase

ldmp2v prepare [-b zvol|file|disk] [-B backend:volume:vdisk [-B ...]] [-c cpu]
  [-m mount-point:size [-m ...]] [-M memsize] [-o keep-hostid] [-o keep-mac]
  [-p prefix] [-s] [-v] [-x no-auto-adjust-fs] [-x remove-unused-slices]
  -d data-dir domain-name
ldmp2v prepare -R guest-root  [-c cpu] [-M memsize] [-o keep-hostid] [-o keep-mac]
  [-v] -d data-dir domain-name
ldmp2v prepare -C domain-name

The ldmp2v prepare command uses the following operand and options:

domain-name

Specifies the logical domain on which to operate.

–b zvol|file|disk

Specifies the back-end type to use. The virtual disks can be backed by ZFS volumes, zvol, plain files, file, or physical disks or volume manager volumes, disk. This option overrides the setting for BACKEND_TYPE in /etc/ldmp2v.conf.

–B backend:volume:vdisk

Specifies the name of the back-end device and, optionally, the name of the volume and virtual disk to create. If the volume or vdisk value is omitted, a default name is used. You can omit values by specifying the colon character (:) for each value to omit. For example, these are valid uses of the –B option: –B ::vdisk01 and –B :volume001.

This option is required for the disk back end and should at least specify a back-end device, such as /dev/dsk/c0t2d0s2 or /dev/md/dsk/d100. For the disk back end, specify one –B option for each disk that is present in the manifest for the physical system.

For the zvol and file back ends, you can use backend to specify a file or ZFS dataset that ldmp2v should create for the virtual disk. For example, –B data/ldom1/disk0. Use the –B option to specify the back-end name and override the default name. The default name is generated by the –p option, or by the BACKEND_PREFIX setting in /etc/ldmp2v.config and the domain name.

–c cpu

Allocates the number of VCPUs to the logical domain. By default, ldmp2v allocates a VCPU for each CPU on the physical system.

–C

Cleans up the specified domain.

–d data-dir

Specifies the per-system directory where the files required for P2V are located.

–m mount-point:size

Resizes the underlying slice and disk for the file system at mount-point. The size is specified as numunit. num is the amount of space and unit is b for blocks, k for Kbytes, m for Mbytes, or g for Gbytes. You can specify this option more than one time. This option disables the automatic resizing of /, /usr, and /var. If mount-point is swap, the first configured swap device is resized to size.

–M memsize

Specifies the amount of memory to allocate to the logical domain. The memory size is specified as numunit, where num is the amount of memory and unit is one of the following:

  • m or M represents Mbytes

  • g or G represents Gbytes

If unit is not specified, the unit is Mbytes.

By default, the ldmp2v command allocates the same amount of memory that is in the physical system to the logical domain. If required, the memory size specified by the –M option is adjusted upward to 1 Gbyte to satisfy the minimum memory size for a guest domain.

–o keep-hostid

Transfers the host ID of the physical system to the logical domain. By default, the Logical Domains Manager assigns a new unique host ID.

–o keep-mac

Transfers the MAC addresses of the physical system to the logical domain. By default the Logical Domains Manager assigns a new unique MAC address.

–p prefix

Specifies the location where backend devices will be created. Denotes the ZFS dataset for the zvol backend, or a directory relative to / for the file backend. This option overrides the BACKEND_PREFIX parameter in /etc/ldmp2v.conf.

–R guest-root

Selects non-automatic mode. The OS image modification steps are applied to the file system rooted at guest-root. Updates the /etc/vfstab of the logical domain to match the file system layout below guest-root.

–s

Creates sparse backend devices. This option overrides the BACKEND_SPARSE parameter in /etc/ldmp2v.conf.

–v

Uses verbose mode, which increases the verbosity of the messages that are issued by ldmp2v.

–x no-auto-adjust-fs

Prevents the automatic size adjustment of the /, /usr, and /var file systems to 10 Gbytes total. Use this option with care because the size of the existing file systems might not be sufficient to upgrade to a newer Solaris release.

You can manually resize file system sizes by using the –m option.

–x remove-unused-slices

Reduces the size of the virtual disk by not creating slices that do not hold a file system or a swap device.

Conversion Phase

ldmp2v convert -i install-image -d data-dir [-v] [-x skip-ping-test] domain-name
ldmp2v convert [-j] -n interface -d data-dir [-v] [-x skip-ping-test] domain-name

The ldmp2v convert command uses the following options:

–d data-dir

Specifies the per-system directory where the files required for P2V are located.

–i install-image

Specifies the path to the Solaris 10 OS DVD ISO image to use for upgrade.

–j

Uses Custom JumpStart, which requires that a JumpStart server and JumpStart client are properly configured.

–n interface

Specifies the virtual network interface from which to boot when using a network install server.

–v

Uses verbose mode, which increases the verbosity of the messages issued by ldmp2v.

–x skip-ping-test

Skips the ping test that is performed to determine whether the IP addresses of the source system are up. Use this option only if you are certain that no duplicate IP addresses will exist, such as when the original system is not active.


Caution  - Before you begin the conversion phase, shut down the original physical system, as the logical domain uses the same IP addresses, and possibly also MAC addresses, as the physical system. If any IP address of the physical system is active, the ldmp2v convert command exits with an error message.


Examples

This section includes examples for the three phases.

Example 1 Collection Phase Examples

    The following examples show how you might use the ldmp2v collect command.

  • Sharing an NFS-mounted file system. The following example shows the simplest way to perform the collect phase, where the source and target systems share an NFS-mounted file system.

    # ldmp2v collect -d /home/dana/p2v/volumia
  • Not sharing an NFS-mounted file system. When the source and target systems do not share an NFS-mounted file system, the file system image can be written to local storage and then later copied to the control domain. Use the flash archiving method that is provided by ldmp2v. The flash tool automatically excludes the archive it creates.

    # ldmp2v collect -d /home/dana/p2v/volumia -a flash
  • Skip file-system backup step. If backups of the system are already available using a third-party backup tool such as NetBackup, you can skip the file system backup step by using the none archiving method. When you use this option, only the system configuration manifest is created.

    # ldmp2v collect -d /home/dana/p2v/volumia -a none

    Note - If the directory specified by –d is not shared by the source and target systems, copy the contents of that directory to the control domain. The directory contents must be copied to the control domain prior to beginning the preparation phase.
  • Exclude a file or directory from the flash archive. When using the flash archiving method, you can exclude a file or directory from the archive by passing options to the flarcreate command. This capability requires that you have at least the following patch revisions installed on the source system:

    • Solaris 8 OS: Patch ID 109318-34

    • Solaris 9 OS: Patch ID 113434-06

    # ldmp2v collect -d /home/dana/p2v/volumia -a flash
      -O "-x /path/to/file -x /some/dir"
Example 2 Preparation Phase Examples

    The following examples show how you might use the ldmp2v prepare command.

  • The following example creates a logical domain called volumia by using the defaults configured in /etc/ldmp2v.conf while keeping the MAC addresses of the physical system:

    # ldmp2v prepare -d /home/dana/p2v/volumia -o keep-mac volumia
  • The following shows how to completely remove a domain and its backend devices by using the –C option:

    # ldmp2v prepare -C volumia
  • The following shows how to resize a file system and the swap device during P2V by using the –m option:

    # ldmp2v prepare -d /home/dana/p2v/normaal -m /:8g -m swap:4g normaal
  • The following shows how to use Solaris Volume Manager metadevices d100 and d101 as back-end devices for the guest domain and to set the name of the first virtual disk to vdisk100:

    # ldmp2v prepare -b disk -B /dev/md/dsk/d100::vdisk100 -B /dev/md/dsk/d101
      -d /p2v/volumia volumia
  • The following shows how to use ZFS volumes with non-default ZFS volume names:

    # ldmp2v prepare -b zvol -B tank/ldom1/zvol1 -B tank/ldom1/zvol2 -d /p2v/volumia
      volumia
Example 3 Conversion Phase Examples

    The following examples show how you might use the ldmp2v convert command.

  • Using a network install server. The ldmp2v convert command boots the logical domain over the network by using the specified virtual network interface. You must run the setup_install_server and add_install_client scripts on the install server.

    Optionally, you can use the Custom JumpStart feature to perform a completely hands-off conversion.

    The following shows how to use a network install server to upgrade your system:

    # ldmp2v convert -n vnet0 -d /p2v/volumia volumia

    The following shows how to use Custom JumpStart to upgrade your system:

    # ldmp2v convert -j -n vnet0 -d /p2v/volumia volumia
  • Using an ISO image. The ldmp2v convert command attaches the Solaris DVD ISO image to the logical domain and boots from it. To upgrade, answer all sysid prompts and select Upgrade.


    Note - The answers to the sysid questions are used only during the upgrade process, so you can select the simplest options (non-networked, no naming service, and so on). The system's original identity is preserved by the upgrade and takes effect on the reboot after the upgrade is complete. The time required to perform the upgrade depends on the Solaris cluster that is installed on the original system.
    # ldmp2v convert -i /tank/iso/s10s_u5.iso -d /home/dana/p2v/volumia volumia

Exit Status

The following exit values are returned:

0

Successful completion.

>0

An error occurred.

Attributes

See the attributes(7) man page for a description of the following attributes.

Attribute Type
Attribute Value
Availability
pkg:/system/ldoms/ldomsmanager
Interface Stability
Uncommitted

See Also

attributes(7), ldm(8)

Oracle VM Server for SPARC 3.6 Administration Guide