From the service domain, create a file (fdisk0 for example) to use as the virtual disk.
service# mkfile 100m /ldoms/domain/test/fdisk0 |
The size of the file defines the size of the virtual disk. This example creates a 100- megabyte blank file to get a 100-megabyte virtual disk.
From the control domain, export the file as a virtual disk.
primary# ldm add-vdsdev /ldoms/domain/test/fdisk0 fdisk0@primary-vds0 |
In this example, the slice option is not set, so the file is exported as a full disk.
From the control domain, assign the disk to a guest domain.
For example, assign the disk (fdisk) to guest domain ldg1.
primary# ldm add-vdisk fdisk fdisk0@primary-vds0 ldg1 |
After the guest domain is started and running the Solaris OS, verify that the disk is accessible and is a full disk.
A full disk is a regular disk with 8 slices.
The following example shows how to list the disk, c0d5, and verify that it is accessible and is a full disk.
ldg1# ls -1 /dev/dsk/c0d5s* /dev/dsk/c0d5s0 /dev/dsk/c0d5s1 /dev/dsk/c0d5s2 /dev/dsk/c0d5s3 /dev/dsk/c0d5s4 /dev/dsk/c0d5s5 /dev/dsk/c0d5s6 /dev/dsk/c0d5s7 |