This appendix covers the following topics:
The Logical Domains P2V Migration Tool automatically converts an existing physical system to a virtual system that runs in a logical domain on a chip multithreading (CMT) system. The source system can be any of the following:
Any sun4u SPARC system that runs at least the Solaris 8 Operating System
Any sun4v system that runs the Solaris 10 OS, but does not run in a logical domain
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.
For information about the P2V migration tool, see the ldmp2v(1M) man page.
The following sections describe how the conversion from a physical system to a virtual system is performed in phases.
This phase runs on the system to be converted. To create a consistent file system image, ensure that the system is as quiet as possible and that all applications are stopped. ldmp2v creates a backup of all mounted UFS file systems, so ensure that any file systems to be migrated to the logical domain are mounted. You can exclude mounted file systems by using the -x.
No changes are required on the source system. The only thing required is the ldmp2v script that was installed on the control domain. Depending on the selected archiving method you intend to use, ensure that the ufsdump or flarcreate utility is present on the source system.
The preparation phase uses the data collected during the collection phase to create a logical domain that is comparable to the source system.
You can use the ldmp2v prepare command in one of the following ways:
Automatic mode. Automatically creates virtual disks and restores file system data.
Creates the logical domain and the required virtual disks of the same size as on the source system.
Partitions the disks and restores the file systems.
If the combined size of the /, /usr, and /var file systems is less than 10 Gbytes, the sizes of these file systems are automatically adjusted to allow for the larger disk space requirements of the Solaris 10 OS. Automatic resize can be disabled by using the -x no-auto-adjust-fs option or by using the -m option to manually resize a file system.
Modifies the OS image of the logical domain to replace all references to physical hardware with versions that are appropriate for a logical domain. This enables you to upgrade the system to the Solaris 10 OS by using the normal Solaris upgrade process. Modifications include updating the /etc/vfstab file to account for new disk names. Any SVM mirrored disks are automatically unencapsulated during this process.
Non-automatic mode. You must create the virtual disks and restore the file system data. This enables you to change the size and number of disks, the partitioning, and the file system layout. The preparation phase in this mode only runs the logical domain creation and the OS image modification steps on the file system rooted at guest-root.
Cleanup mode. Removes a logical domain and all of the underlying backend devices that are created by ldmp2v.
In the conversion phase, the logical domain uses the Solaris upgrade process to upgrade to the Solaris 10 OS. The upgrade operation removes all existing packages and installs the Solaris 10 sun4v packages, which automatically performs a sun4u-to-sun4v conversion. The convert phase can use a Solaris DVD iso image or a network install image. You can also use Custom JumpStart to perform a fully automated hands-off upgrade operation.
The Logical Domains P2V Migration Tool must only be installed and configured on the control domain. If the P2V tool is not installed in a directory that is shared between the source and target systems, you must copy the bin/ldmp2v script to the source system.
Before you can run the Logical Domains P2V Migration Tool, ensure that the following are true:
Target system runs at least Logical Domains 1.1 on the following:
Solaris 10 10/08 OS
Solaris 10 5/08 OS with the appropriate Logical Domains 1.1 patches
Guest domains run at least the Solaris 10 5/08 OS
Source system runs at least the Solaris 8 OS
In addition to these prerequisites, configure an NFS file system to be shared by both the source and target systems. This file system should be writable by root. However, if a shared file system is not available, use a local file system that is large enough to hold a file system dump of the source system on both the source and target systems.
Version 1.0 of the Logical Domains P2V Migration Tool has the following limitations:
Only UFS file systems are supported.
Each guest domain can have only a single virtual switch and virtual disk service.
The flash archiving method silently ignores excluded file systems.
Go to the Logical Domains download page at http://www.sun.com/servers/coolthreads/ldoms/get.jsp.
Download the P2V software package, SUNWldmp2v.
Become superuser.
Use the pkgadd command to install the SUNWldmp2v package.
# pkgadd -d . SUNWldmp2v |
Create the /etc/ldmp2v.conf file to configure the following properties:
VDS – Name of the virtual disk service, such as VDS="primary-vds0"
VSW – Name of the virtual switch, such as VSW="primary-vsw0"
VCC – Name of the virtual console concentrator, such as VCC="primary-vcc0"
BACKEND_TYPE – Backend type of zvol or file
BACKEND_SPARSE – Whether to create backend devices as sparse volumes or files BACKEND_SPARSE="yes", or non-sparse volumes or files BACKEND_SPARSE="no"
BACKEND_PREFIX – Location to create virtual disk backend devices
When BACKEND_TYPE="zvol", specify the BACKEND_PREFIX value as a ZFS dataset name. When BACKEND_TYPE="files", the BACKEND_PREFIX value is interpreted as a path name of a directory that is relative to /.
For example, BACKEND_PREFIX="tank/ldoms" would result in having ZVOLs created in the tank/ldoms/domain-name dataset, and files created in the /tank/ldoms/domain-name subdirectory.
BOOT_TIMEOUT – Timeout for Solaris OS boot in seconds
For more information, see the ldmp2v.conf.sample configuration file that is part of the downloadable bundle.
This section includes examples for the three phases.
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 step where the source and target systems share an NFS-mounted file system.
As superuser, ensure that all required UFS file systems are mounted.
volumia# df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c1t1d0s0 16516485 463289 15888032 3% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd mnttab 0 0 0 0% /etc/mnttab /dev/dsk/c1t1d0s3 8258597 4304 8171708 1% /var swap 4487448 16 4487432 1% /var/run swap 4487448 16 4487432 1% /tmp /dev/dsk/c1t0d0s0 1016122 9 955146 1% /u01 vandikhout:/u1/home/dana 6230996752 1051158977 5179837775 17% /home/dana |
The following shows how to run the collection tool when the source and target systems share an NFS-mounted file system:
volumia# ldmp2v collect -d /home/dana/p2v/volumia Collecting system configuration ... Archiving file systems ... DUMP: Writing 63 Kilobyte records DUMP: Date of this level 0 dump: vr 28 nov 2008 15:04:03 MET DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rdsk/c1t1d0s0 (volumia:/) to /home/dana/p2v/ufsdump.0. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Estimated 950240 blocks (463,98MB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: 950164 blocks (463,95MB) on 1 volume at 6215 KB/sec DUMP: DUMP IS DONE DUMP: Writing 63 Kilobyte records DUMP: Date of this level 0 dump: vr 28 nov 2008 15:05:27 MET DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rdsk/c1t0d0s0 (volumia:/u01) to /home/dana/p2v/ufsdump.1. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Estimated 282 blocks (141KB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: 250 blocks (125KB) on 1 volume at 8928 KB/sec DUMP: DUMP IS DONE DUMP: Writing 63 Kilobyte records DUMP: Date of this level 0 dump: vr 28 nov 2008 15:05:27 MET DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rdsk/c1t1d0s3 (volumia:/var) to /home/dana/p2v/ufsdump.2. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Estimated 13324 blocks (6,51MB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: 13228 blocks (6,46MB) on 1 volume at 1146 KB/sec DUMP: DUMP IS DONE |
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 be later copied to the control domain. Since it is not possible to use ufsdump to exclude files, use the flash archiving method that is provided by ldmp2v. The flash tool automatically excludes the archive that it creates.
volumia# ldmp2v collect -d /home/dana/p2v/volumia -a flash Collecting system configuration ... Archiving file systems ... Determining which filesystems will be included in the archive... Creating the archive... 895080 blocks Archive creation complete. |
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.
volumia# ldmp2v collect -d /home/dana/p2v/volumia -a none Collecting system configuration ... The following file system(s) must be archived manually: / /u01 /var |
Note that 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.
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 Creating vdisks ... Creating file systems ... Populating file systems ... Modifying guest domain OS image ... Removing SVM configuration ... Unmounting guest file systems ... Creating domain volumia ... Attaching vdisks to domain volumia ... |
The following command shows information about the volumia logical domain:
# ldm list -l volumia NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME volumia inactive ------ 2 4G NETWORK NAME SERVICE DEVICE MAC MODE PVID VID vnet0 primary-vsw0 00:03:ba:1d:7a:5a 1 DISK NAME DEVICE TOUT MPGROUP VOLUME SERVER disk0 volumia-vol0@primary-vds0 disk1 volumia-vol1@primary-vds0 |
The following shows that you can completely remove a domain and its backend devices by using the -C option:
# ldmp2v prepare -C volumia Cleaning up domain volumia ... Removing vdisk disk0 ... Removing vdisk disk1 ... Removing domain volumia ... Removing volume volumia-vol0@primary-vds0 ... Removing ZFS volume tank/ldoms/volumia/disk0 ... Removing volume volumia-vol1@primary-vds0 ... Removing ZFS volume tank/ldoms/volumia/disk1 ... |
The following shows that you can resize one or more file systems during P2V by specifying the mount point and the new size with the -m option:
# ldmp2v prepare -d /home/dana/p2v/normaal -m /:8g normaal Resizing file systems ... Creating vdisks ... Creating file systems ... Populating file systems ... Modifying guest domain OS image ... Removing SVM configuration ... Modifying file systems on SVM devices ... Unmounting guest file systems ... Creating domain normaal ... Attaching vdisks to domain normaal ... |
The following examples show how you might use the ldmp2v convert command.
Using a network installation 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 installation server.
You can use the Custom JumpStart feature to perform a completely hands-off conversion. This feature requires that you create and configure the appropriate sysidcfg and profile files for the client on the JumpStart server. The profile should consist of the following lines:
install_type upgrade root_device c0d0s0 |
The sysidcfg file is only used for the upgrade operation, so a configuration such as the following should be sufficient:
name_service=NONE root_password=uQkoXlMLCsZhI system_locale=C timeserver=localhost timezone=Europe/Amsterdam terminal=vt100 security_policy=NONE nfs4_domain=dynamic network_interface=PRIMARY {netmask=255.255.255.192 default_route=none protocol_ipv6=no} |
For more information about using Custom JumpStart, see Solaris 10 5/09 Installation Guide: Custom JumpStart and Advanced Installations.
# ldmp2v convert -j -n vnet0 -d /p2v/volumia volumia LDom volumia started Waiting for Solaris to come up ... Using Custom JumpStart Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Connecting to console "volumia" in group "volumia" .... Press ~? for control options .. SunOS Release 5.10 Version Generic_137137-09 64-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. onfiguring devices. Using RPC Bootparams for network configuration information. Attempting to configure interface vnet0... Configured interface vnet0 Reading ZFS config: done. Setting up Java. Please wait... Serial console, reverting to text install Beginning system identification... Searching for configuration file(s)... Using sysid configuration file 129.159.206.54:/opt/SUNWjet/Clients/volumia/sysidcfg Search complete. Discovering additional network configuration... Completing system identification... Starting remote procedure call (RPC) services: done. System identification complete. Starting Solaris installation program... Searching for JumpStart directory... Using rules.ok from 129.159.206.54:/opt/SUNWjet. Checking rules.ok file... Using begin script: Clients/volumia/begin Using profile: Clients/volumia/profile Using finish script: Clients/volumia/finish Executing JumpStart preinstall phase... Executing begin script "Clients/volumia/begin"... Begin script Clients/volumia/begin execution completed. Searching for SolStart directory... Checking rules.ok file... Using begin script: install_begin Using finish script: patch_finish Executing SolStart preinstall phase... Executing begin script "install_begin"... Begin script install_begin execution completed. WARNING: Backup media not specified. A backup media (backup_media) keyword must be specified if an upgrade with disk space reallocation is required Processing profile Loading local environment and services Generating upgrade actions Checking file system space: 100% completed Space check complete. Building upgrade script Preparing system for Solaris upgrade Upgrading Solaris: 10% completed [...] |
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.
The answers to the sysid questions are only used 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 Testing original system status ... LDom volumia started Waiting for Solaris to come up ... Select 'Upgrade' (F2) when prompted for the installation type. Disconnect from the console after the Upgrade has finished. Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Connecting to console "volumia" in group "volumia" .... Press ~? for control options .. Configuring devices. Using RPC Bootparams for network configuration information. Attempting to configure interface vnet0... Extracting windowing system. Please wait... Beginning system identification... Searching for configuration file(s)... Search complete. Discovering additional network configuration... Configured interface vnet0 Setting up Java. Please wait... Select a Language 0. English 1. French 2. German 3. Italian 4. Japanese 5. Korean 6. Simplified Chinese 7. Spanish 8. Swedish 9. Traditional Chinese Please make a choice (0 - 9), or press h or ? for help: [...] - Solaris Interactive Installation -------------------------------------------- This system is upgradable, so there are two ways to install the Solaris software. The Upgrade option updates the Solaris software to the new release, saving as many modifications to the previous version of Solaris software as possible. Back up the system before using the Upgrade option. The Initial option overwrites the system disks with the new version of Solaris software. This option allows you to preserve any existing file systems. Back up any modifications made to the previous version of Solaris software before starting the Initial option. After you select an option and complete the tasks that follow, a summary of your actions will be displayed. ------------------------------------------------------------------------------- F2_Upgrade F3_Go Back F4_Initial F5_Exit F6_Help |