Difference between revisions of "Creating a base LDOM image"
Line 39: | Line 39: | ||
This creates a virtual disk device called '''base-vol1@primary-vds0''' that is then assigned to the LDOM '''base'''. ldm list-services should now look like this: | This creates a virtual disk device called '''base-vol1@primary-vds0''' that is then assigned to the LDOM '''base'''. ldm list-services should now look like this: | ||
− | + | VCC | |
+ | NAME LDOM PORT-RANGE | ||
+ | primary-vcc0 primary 5000-5100 | ||
+ | |||
+ | VSW | ||
+ | NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE | ||
+ | primary-vsw0 primary 00:14:4f:fa:40:c8 e1000g0 0 switch@0 1 1 1500 | ||
+ | |||
+ | VDS | ||
+ | NAME LDOM VOLUME OPTIONS MPGROUP DEVICE | ||
+ | primary-vds0 primary base-vol1 /dev/zvol/dsk/storage/base/disk0 | ||
7. Add a virtual network interface to the new LDOM | 7. Add a virtual network interface to the new LDOM | ||
ldm add-vnet vnet1 primary-vsw0 base | ldm add-vnet vnet1 primary-vsw0 base |
Revision as of 04:09, 1 June 2011
Now that the Control domain is setup, you can start creating LDOM's at will. The idea here is to create a base LDOM image that can be cloned to quickly provision new servers.
1. Create a ZFS file system to store the disk image for our LDOM
zfs create storage/base
This will create a ZFS file system called storage/base that will be mounted at /storage/base
2. Create a ZFS disk image to hold the LDOM's data
zfs create -V 36gb storage/base/disk0
This will create a 36Gb disk image. You can see the results in the zfs list output:
# zfs list NAME USED AVAIL REFER MOUNTPOINT storage 37.1G 630G 36.5K /storage storage/base 37.1G 630G 34.9K /storage/base storage/base/disk0 37.1G 667G 26.6K - .....
3. Create the new LDOM
ldm add-domain base
4. Assign virtual CPU's to the new LDOM
ldm add-vcpu 8 base
5. Assign memory to the new LDOM
ldm add-memory 2G base
6. Create a virtual disk device and assign it to the new LDOM
ldm add-vdsdev /dev/zvol/dsk/storage/base/disk0 base-vol1@primary-vds0 ldm add-vdisk vdisk1 base-vol1@primary-vds0 base
This creates a virtual disk device called base-vol1@primary-vds0 that is then assigned to the LDOM base. ldm list-services should now look like this:
VCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100 VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vsw0 primary 00:14:4f:fa:40:c8 e1000g0 0 switch@0 1 1 1500 VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary base-vol1 /dev/zvol/dsk/storage/base/disk0
7. Add a virtual network interface to the new LDOM
ldm add-vnet vnet1 primary-vsw0 base