A small How-to for beginners to work with Solaris and the Oracle VM Server for SPARC virtualization platform, formerly known as Sun Logical Domains.
Logical Domains is a virtualization and physical resource sharing technology for the SPARC V9-based UNIX line of servers introduced in May 2007 by Sun Microsystems.
It is possible to control the hypervisor from the command line or visual control interfaces, the latter will not be considered here.
Examples are given for Solaris 10 OS, in Solaris 11 it is worth considering the features of network configuration.
In Sun terminology, virtual machines are referred to as domains; there are several types of domains.
Domain roles
Control Domain - The control domain, in which Oracle VM Server works, is created during installation by default from the system where Oracle VM Server is installed, it is called primary. There can only be one management domain.
Service Domain - The domain of virtual devices such as virtual switches, virtual disks, etc. Any domain can be configured as a Service Domain; by default, the Control Domain is already a Service Domain.
I / O Domain - A domain that has access to physical PCIe devices on the server. May provide access to these devices if configured as a Service Domain. It has better performance compared to Guest Domain, almost comparable to a non-virtualized server. The maximum number of domains is limited by the number of PCIe buses on the server. The use of such domains complicates migration. By default, the Control Domain acts as an I / O Domain.
View available PCIe buses and devices:
# /usr/sbin/ldm list-io
Root Domain - The root domain has more advanced access to the architecture of physical PCIe server devices than the I / O Domain. It has access to all services provided by PCIe devices, for example, to the fabric error handling factory. The number of root domains depends on the server architecture.
Guest Domain - The guest domain has only virtual devices.
Virtual device and service designations
vnet - Virtual Network. Virtual network card.
vsw - Virtual Switch. Virtual switch.
vds - Virtual Disk Server. Virtual hard disk. The disk usage model is built on a client-server architecture, therefore, the vdc client is used to access the disk, and vds is a service for accessing physical disks or their images.
vdc - Virtual Disk Client. Provides access to a virtual hard disk. Despite the fact that virtual disks belong to the Guest Domain, most operations with them are performed on the Service Domain.
vcc - Virtual Console Concentrator. Typically, this virtual device has a Control Domain (primary). It provides access to virtual machine consoles. The svc: / ldoms / vntsd: default service provides access to virtual machine consoles, launched in the Control Domain.
An example of creating basic services
Typically, device services are created in the Control Domain, but you can select a separate domain for this - the Service Domain.
We create a console concentrator in the primary domain, with the name primary-vcc0 and the range of ports used 5000-5100:
Setting up a Control Domain and releasing resources from it for other domains
View a list of cryptographic devices. Used in SPARC systems, the presence of these devices in the domain does not allow you to dynamically reconfigure the number of CPUs:
# /usr/sbin/ldm list -o crypto primary
Naturally set this parameter to 0, or do not touch this command at all:
# /usr/sbin/ldm set-mau 0 primary
Set the number of cores to the primary domain:
# /usr/sbin/ldm set-vcpu 8 primary
We start reconfiguration of the primary domain or just reboot the server:
# /usr/sbin/ldm start-reconf primary
Set the amount of RAM for the primary domain:
# /usr/sbin/ldm set-memory 4G primary
Save the current domain configuration as initial:
# /usr/sbin/ldm add-config initial
View a list of domain configurations (initial [next poweron] means that the configuration will be used the next time the hypervisor is loaded):
# /usr/sbin/ldm list-config
Reboot the hypervisor:
# shutdown -y -g0 -i6
By default, there is no network connection between the Control Domain and other domains, this is due to the fact that the Control Domain uses a physical interface (eg: nxge0), and the rest of the domains are virtual (eg: vsw0).
Configuring a virtual switch as the main interface in Control Domain
List of various network interfaces to the system:
# /usr/sbin/dladm show-link
We include the necessary virtual switch:
# /usr/sbin/ifconfig vsw0 plumb
Turn off the physical interface:
# /usr/sbin/ifconfig nxge0 down unplumb
We set the IP address and mark the interface of the virtual switch on: