The following command would create a guest domain named ldg1.
primary# ldm add-domain ldg1
Do one of the following:
The following command would add eight virtual CPUs to guest domain ldg1.
primary# ldm add-vcpu 8 ldg1
The following command would add two whole cores to guest domain ldg1.
primary# ldm add-core 2 ldg1
The following command would add 2 gigabytes of memory to guest domain ldg1.
primary# ldm add-memory 2G ldg1
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.
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. This 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 example exports 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.
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.
The following example command sets auto-boot? to true for guest domain ldg1.
primary# ldm set-var auto-boot\?=true ldg1
The following example command sets boot-device to vdisk1 for guest domain ldg1.
primary# ldm set-var boot-device=vdisk1 ldg1
primary# ldm bind-domain ldg1 primary# ldm list-domain ldg1 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME ldg1 bound ----- 5000 8 2G
You can see under the heading CONS that logical domain guest 1 (ldg1) has its console output bound to port 5000.
$ ssh hostname.domain-name $ telnet localhost 5000
primary# ldm start-domain ldg1