Quick and easy way to setup Guest Logical Domains using ZFS clone.

Question: I want to install more than one guest domain. Is there any way to speedup process.

Answer: Yes, sure.

This instruction can be used as supplimental to «Run your first Logical Domain in 10 minutes» as well as a separate guide.

  1. First setup the Control Domain and install the First Guest Domain ldg1. Use ZFS volume (In example, data/demo/ldg1) as back end drive for the system drive of guest domain. You can install Solaris either through a Network Install or by mounting a DVD or ISO file.

  2. Log in to the First guest domain Console and do 'sys-unconfig' in the domain.

  3. # sys-unconfig
                            
    WARNING
    
    This program will unconfigure your system.  It will cause it
    to revert to a "blank" system - it will not have a name or know
    about other systems or networks.
    
    This program will also halt the system.
    
    Do you want to continue (y/n) ? y
    
    
  4. Wait for the system to come down and answer h — halt.

  5.  svc.startd: The system is down. 
     syncing file systems... done 
     Program terminated 
      r)eboot, o)k prompt, h)alt?  h

  6. From Control domain verify that guest domain ldg1 is stopped.

  7.  # ldm ls 
     NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME 
     primary active -n-cv SP 4 4G 0.5% 1h 30m 
     ldg1 bound ----- 5000 14 1984M 
  8. Unbind domain

  9.  # ldm unbind ldg1 
  10. Create a ZFS snapshot of the First Guest Domain's disk image:

  11. # zfs snapshot data/demo/ldg1@install
    
  12. Bind and Start domain back

  13. # ldm bind ldg1 
    # ldm start ldg1

  14. Clone the snapshot using the name ldg2 as the target volume

  15. # zfs clone data/demo/ldg1@install data/demo/ldg2
    
  16. Setup 2 nd Guest domain by using newly created ZFS clone data/demo/ldg2 as back-end to system disk.

  17. Repeat steps 8 and 9 for each next domain.


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Roman (pomah) Ivanov, ISV Engineering. Tips how to run Oracle best on Sun. Performance monitoring and tuning for system administrators. OpenSolaris user experience.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today