November 11, 2013

Creating Virtual DVD resource

In order to mount a virtual DVD device to your LPAR, you will need to create DVD repository, virtual optical device and map it to your vhost.

Following commands have to be run on VIO server under padmin user.

Create the Virtual Media Repository.
$ lsrep
The DVD repository has not been created yet.

$ mkrep -sp rootvg -size 6G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
Create a virtual optical media disk in the Virtual Media Repository.
$ mkvopt -name AIX61000_64_os_0601_us.iso -file /home/padmin/aix61000_64_os_0601_us.iso

$ ls -la /var/vio/VMLibrary
total 5314696
drwxr-xr-x    3 root     system          256 Nov 24 17:31 .
drwxr-xr-x    3 root     staff           256 Nov 24 17:28 ..
-rw-------    1 root     staff    2721122304 Nov 24 17:31 AIX61000_64_os_0601_us.iso
drwxr-xr-x    2 root     system          256 Nov 24 17:28 lost+found
Add a virtual optical device to the system.

vhost3 is a host associated with your LPAR.

$ mkvdev -fbo -vadapter vhost3
$ loadopt -vtd vtopt0 -disk AIX61000_64_os_0601_us.iso

Now you can reboot your LPAR to SMS mode and boot from DVD. (CD/DVD -> SCSI -> List all devices).

When you don’t need DVD to be loaded anymore, don’t forget to unload virtual optical device.

$ unloadopt -vtd vtopt0