LDOMs on Solaris

Howto install Logical Domains and Building a Guest Domain from scratch on Solaris 11

This doc walks through installing Logical Domains, creating a guest domain, and installing Solaris on VMs for Oracle VM Server for SPARC 3.4

The installed domain/VM will then can be set up as a master image for cloning further domains.

It is not needed to download and install Ldoms_Manager software anymore as it is embedded in Solaris 11.3

For more information consult Oracle® VM Server for SPARC 3.4 Administration Guide.

Create Default Services

Essential services for providing virtual disk, network, and consoles should be defined in Control Domain. Our control domain is called primary.

Defines a virtual disk server. Virtual disk server (vds) allows importing virtual disks into a logical domain.

# ldm add-vds primary-vds0 primary

Define a vcc that will listen for local connections on ports 5000 to 5100. Virtual console concentrator (vcc) is used as a concentrator for all logical domain consoles.

# ldm add-vcc port-range=5000-5100 primary-vcc0 primary  

Define a virtual L2 switch which is associated with the physical NIC device net0. Virtual switch service (vsw) enables networking between virtual network (vnet) devices in logical domains.

Multiple virtual switches can be defined and attached to different NIC devices or to no NIC device at all.

# ldm add-vsw net-dev=net0 primary-vsw0 primary

Note: To see the network device list and the status of each, type one of the followings:

# ifconfig -a
# dladm show-link
# ipadm show-if
# ipadm show-addr

To list the VDS (Virtual disk server), VCC (Virtual console concentrator), and VSW (Virtual switch service):

# ldm list-services       (To see more use # ldm list-bindings)

Note: It is a good idea to save your initial configuration in a file:

# ldm list-services > ~/initial_config.txt

Configuring the Control Domain

Adding a cryptographic accelerator (if needed) and 4 CPUs:

# ldm set-set-crypto 1 primary
# ldm set-vcpu 4 primary     (or # ldm set-core 4 primary)

Note: You'd better initiate a delayed reconfiguration on the control domain before reboot (why?):

# ldm start-reconf primary

Add memory to the control domain. This setup leaves the remainder of the memory available to guest domains.

# ldm set-memory 3G primary

Save this initial configuration to the service processor (SP) so it will persist after a power cycle. For example, the following command would add a configuration called initial.

# ldm add-config initial

Verify that the configuration:

# ldm list-config

Reboot the server to make the reconfiguration changes take effect:

# reboot

Enabling Networking Between Service Domain and Other Domains

By default, networking on a virtual switch connecting the control domain and guest domains is disabled because of security. You must enable networking by configuring the virtual switch device as a network device. The virtual switch can either replace the underlying physical device as the primary interface or be configured as an additional network interface in the domain.

Guest domains can automatically communicate with the Oracle Solaris 10 service domain as long as the corresponding network back-end device is configured in the same virtual LAN or virtual network.

Important: Perform the following procedure from the Oracle Solaris service domain's console, as the procedure may disrupts your ssh session to the server.

Configure the virtual switch network interface:

# ifconfig vsw0 plumb

Remove the physical interface for the device that is assigned to the virtual switch (net-dev).

# ifconfig nxge0 down unplumb

Note: To determine the backend network devices that are available for the virtual switch:

# ldm list-netdev -b

To migrate properties of the physical network device (nxge0) to the virtual switch device (vsw0), do one of the following:

  • If networking is configured by using a static IP address, reuse the IP and netmask of nxge0 for the virtual switch:
# ifconfig vsw0 10.10.10.10 netmask 256.256.256.0 broadcast + up
  • If networking is configured by using DHCP, enable DHCP for the virtual switch.
# ifconfig vsw0 dhcp start

Now make the required configuration file modifications to make this change permanent.

# mv /etc/hostname.nxge0 /etc/hostname.vsw0
# mv /etc/dhcp.nxge0 /etc/dhcp.vsw0

Enable the Virtual Network Terminal Server Daemon

Enable the virtual network terminal server daemon, vntsd:

# svcadm enable vntsd

Verify that the vntsd daemon is enabled:

# svcs vntsd


Verify the ILOM Interconnect Configuration

Verify service is enabled

# svcs ilomconfig-interconnect

Verify ILOM interconnect is configured properly

# ilomconfig list interconnect

Verify that the ldmd daemon can communicate with the SP.

# ldm list-spconfig

Extra

To add a physical disk:

# ldm add-vdsdev /dev/dsk/c2t1d0s2 vol1@primary-vds0

To add a virtual disk:

# ldm add-vdisk vdisk1 vol1@primary-vds0 ldg1

To determine the CPU utilization of the control domain:

# ldm list

To show the network interfaces:

# dladm show-link

Show the virtual network devices

# ldm list -o network

To list all server resources, bound and unbound:

# ldm list-devices -a