- Oracle VM Server for SPARC 3.6 Administration Guide
- Using Virtual Disks
- Virtual Disk Back End
- File and Volume Exporting
- How to Export a File as a Full Disk
How to Export a File as a Full Disk
- 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-Mbyte blank file to get a 100-Mbyte 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 domainldg1
.primary# ldm add-vdisk fdisk fdisk0@primary-vds0 ldg1
- After the guest domain is started and running the Oracle Solaris OS, verify that the disk is accessible and is a full disk.
A full disk is a regular disk with eight 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