Skip to content
  • Home
  • About nixDrafts
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms and Conditions
  • UNIX
    • Solaris
    • AIX
    • RHEL
  • Virtual Machines
    • VMware Virtual Machines
    • Solaris Virtual Machine
    • ESX
    • Azure Virtual Machine
  • TOOLS
    • Storage
    • ASR
    • NetBackup
    • VCS
    • Bigdata
    • VxVM
    • Networking
    • Education
    • Tech News
  • Web Technologies
    • Web Hosting
    • Web Designing
  • Download Our Android App
  • Write for us
  • Sponsored Post
  • Blog
  • Facebook
  • Linkedin
  • Instagram
  • Pinterest
  • Twitter
  • Influencer
  • YouTube
Best Linux Blog for System Admins

nixDrafts – Best Linux Blog for System Admins

UNIX | LINUX | VERITAS | VMWARE | AZURE HOW TO TIPS & TRICS

Advertise here-720x90
  • Home
  • About nixDrafts
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms and Conditions

Latest Articles

How to Install SAMBA on LINUX

How to Install & Configure SAMBA on Linux

How to increase shared memory in RHEL7

Best Linux Apps for Every Kind of User

What is Linux ?

How to use help command in linux

Netbackup Tutorials : Troubleshooting Tips to resolve backup failures

Veritas Netbackup 8.1 Client Installation

All about Unix Linux System Administrator Roles and Responsibilities

Best Black Friday 2020 deals

How to reset hba port in linux

12 Restorecon linux commands examples

how-to-remove-dot-permission-in-linux

How to remove dot permission in linux

SELinux chcon command in Redhat Linux With Examples to Change Security Context

SELinux chcon command in Redhat Linux With Examples to Change Security Context

Linux Networking Commands

15 Useful Linux Networking Commands

Important_Linux-Commands_840x268

All Basic/Advanced Linux Commands for Linux Administrators Interview Questions PDF

how-to-disable-ip-forwarding-in-linux

How to disable IP forwarding in linux

memory-and-cpu-reservation-in-vmware

Memory and cpu reservation in vmware

Activating-and-Deactivating-volume-groups_840x268

How to activate volume group in linux

Sunday, February 28, 2021
how to delete ldom

How to Remove LDOM

Contents

  • 1 How to find cdom from ldom
  • 2 How to check ldoms in Solaris
  • 3 How to Shutdown LDOM
  • 4 How to Login to LDOM Console
  • 5 How to stop LDOM in Solaris
  • 6 How to unbind LDOM
  • 7 How to Delete LDOM
  • 8 How to remove vdsdev in LDOM
  • 9 How to remove vnet from LDOM
  • 10 How to Backup CDOM Configuration
      • 10.0.1 Other LDOM CDOM Related Stuff
      • 10.0.2 2. Configuring IPMP in Oracle Solaris 11
      • 10.0.3 3. Restoring Domain Configurations
Share on Social Media
twitter facebook pinterest linkedin tumblr email
Follow us on Social Media
twitter facebook instagram pinterest linkedin tumblr

We are going to discuss how to remove ldom in this post. In this post, we will illustrate the necessary steps about how to remove ldom. First, we will discuss a few basics related to how to delete ldom completely. We are considering here how to decommission ldom.

We are discussing how to delete ldom completely here so we must be having ldom name which is expected to be removed. So let’s see how to find cdom from ldom.

How to find cdom from ldom

Login to ldom with elevated privilege which you have the plan to remove. virtinfo command can be used to resolve how to find cdom from ldom query. Sample output to refer is as below where you can see ldom name as well as cdom name which is hosting ldom you are planning to remove.

# virtinfo -a
Domain role: LDoms guest
Domain name: ldom01
Domain UUID: 373c6a3c-2400-44aa-ac1c-9b123456b63
Control domain: sol10dom01
Chassis serial#: CK00291861

So now we have ldom name as well as cdom name. Login to cdom using putty and take system admin privilege. Let’s look at the process of how to check ldoms in solaris 10 or 11.

How to check ldoms in Solaris

You need to have the elevated privilege to run ldm ls or ldm list command. Both can be used to get some information. You can use any which you like as both will serve the same information ie it is resolving questions on how to check ldoms in solaris.

# ldm list
NAME        STATE    FLAGS   CONS   VCPU  MEM   UTIL  NORM  UPTIME
primary      active     -n-cv-     UART    16       49G      1.9%  1.9%    13d 2h 30m
ldom01      active     -n----       5005     24       46G      1.1%  1.1%    13d 2h 7m
ldom02      active     -n----       5006     24       86G      3.3%  3.3%    13d 4h
ldom03      active     -n----       5000     40       42G      1.0%  1.0%    13d 4h
ldom04      active     -n----       5013     24       40G      2.9%  2.9%    12d 23h 4m
ldom05      active     -n----       5010     8         16G      0.5%  0.5%    12d 23h 5m
# ldm ls
NAME       STATE    FLAGS   CONS    VCPU  MEM   UTIL  NORM  UPTIME
primary     active     -n-cv-     UART     16       49G      1.9%  1.9%     13d 2h 30m
ldom01     active     -n----      5005       24       46G      1.1%  1.1%     13d 2h 7m
ldom02     active     -n----      5006       24       86G      3.3%  3.3%     13d 4h
ldom03     active     -n----      5000       40       42G      1.0%  1.0%     13d 4h
ldom04     active     -n----      5013       24       40G      2.9%  2.9%     12d 23h 54m
ldom05     active     -n----      5010       8         16G      0.5%  0.5%     12d 23h 45m

First of all, you need to login to Control Domain where your ldom is configured means cdom which is hosting ldom in question. You can refer above to how to find cdom from ldom and how to check ldoms in solaris.

So you have all the details now. how to remove ldom will have below high-level steps. Usually, it should be something reverting all the configuration which was done during creating ldom.

  • Shutdown LDOM
  • Stop LDOM
  • Unbind LDOM
  • Remove LDOM
  • Remove vdsdev/vdisk in LDOM
  • Remove vnet from LDOM

So let’s go forward with the steps mentioned above which will be able to address any queries during the process like below.

How to Shutdown LDOM

We recommend logging in to the console of LDOM instead of directly stopping LDOM.

1. Login to cdom via Putty and take the necessary sudo.
2. How to list logical domains
# ldm ls
NAME         STATE    FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary       active     -n-cv-     UART    16        49G             1.9%  1.9%  13d 2h 30m
ldom01       active     -n----      5005      24        46G             1.1%  1.1%  13d 2h 7m
ldom02       active     -n----     5006       24        86G             3.3%  3.3%  13d 4h
ldom03       active     -n----     5000       40        42G             1.0%  1.0%  13d 4h
ldom04       active     -n----     5013       24        40G             2.9%  2.9%  12d 23h 54m
ldom05       active     -n----     5010       8          16G             0.5%  0.5%  12d 23h 45m

How to Login to LDOM Console

There is two way how to login to ldom console. You can use either form from ldm ls output. We are going to use an assigned port in both cases.

The syntax is like below

# telnet <localhost>  <Port>
# telnet 0 <Port>
Sample output is below
# telnet 0 5000
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Connecting to console "ldom01" in group "ldom01" ....
Press ~? for control options ..
--------------------------------
--------------------------------               
ldom01 console login: 
Provide credentials and take required Sudo and run below command.
# shutdown -y -g0 -i0
OR
# init 0
# svc.startd: The system is coming down.  Please wait.
svc.startd: 89 system services are now being stopped.
svc.startd: The system is down.
syncing file systems... done
Program terminated
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.
SPARC T5-2, No Keyboard
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.36.2, 32.0000 GB memory available, Serial #12345678.
Ethernet address 0:94:9f:fb:4d:e7, Host ID: 123abc34.
{0} OK
Return to the primary domain:
{0} OK “Escape character is '^]'”
telnet> quit
Connection to 0 closed.

Same thing especially shutting down ldom you can also do via directly logging to ldom itself. Console steps are shown for visibility and the best option to shut down in a proper manner. Now you can safely proceed with Stopping, Unbinding, and Remove from.

How to stop LDOM in Solaris

Simply take ldom status and stop it using ldm stop-domain or ldm stop command. Once you stop the ldom it will have a bound state from the active state.

Please refer to the below output.

# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    32G      0.6%  0.6%  3h 8m
ldom01          active     -n----  5000    8     32G      2.4%  2.4%  3m
# ldm stop-domain ldom01
Remote graceful shutdown or reboot capability is not available on ldom01
LDom ldom01 stopped
# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    32G      1.0%  1.0%  3h 10m
ldom01          bound      ------  5000    8     32G

How to unbind LDOM

You can use ldm unbind to unbind the LDOM. ldm unbind is also really helpful if you have made any configuration changes to LDOM and you want configuration changes to take effect.

You can simply do ldm unbind and ldm bind which forces LDOM to make the change s in effect. Once you do ldm unbind ldom becomes inactive and if you do ldm bind again it goes to an active state and incorporates all the changes done in the inactive state.

# ldm unbind-domain ldom01
# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    32G      1.0%  0.8%  3h 11m
ldom01           inactive   ------          8     32G

How to Delete LDOM

You need to make sure ldom is in an inactive state. Please verify using ldm ls. You can delete ldom using ldm remove-domain command. Once you delete ldom it will disappear from ldm ls command display.

# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    32G      1.0%  0.8%  3h 11m
ldom01           inactive   ------          8     32G
# ldm remove-domain ldom01
# ldm ls
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary          active     -n-cv-  UART    16    32G      0.4%  0.4%  3h 13m

How to remove vdsdev in LDOM

For removing vdsdev you must need ldom to be stopped. If you have added a new disk to ldom you might have done in order of adding vdsdev and then adding vdisk using ldm add-vdsdev and ldm add-vdisk.

You can refer to how to add vdisk from cdom to ldom online.

So you have to remove vdsdev in reverse order. You can run what all disk is associated with ldom you are decommissioning like below and you can easily verify rootdisk and datadisk.

Ultimately if you are decommissioning you need to remove all for either re-use or reclaim depends upon your scenario.

# ldm list -o disk ldom01        >> You can get list of devices associated to ldom.
# ldm stop ldom01
# ldm remove-vdisk -f usp0_0143-p1 ldom01
# ldm remove-vdsdev -f [email protected]
# ldm ls -o disk ldom01            >> Please verify that no more disk linked to ldom.

How to remove vnet from LDOM

Please take a list of vnet resources associated with the ldom. You can remove vnet configurations associated with ldom which is getting decommission.

# ldm ls -o net ldom01
NAME
ldom01
MAC
    00:79:9f:fa:94:e6
NETWORK
NAME         SERVICE                MACADDRESS          PVID|PVLAN|VIDs
     ----         -------                ----------          ---------------
vnet0        primary-vsw0           00:14:4f:fa:bf:d7   1|--|--
            DEVICE     :--              ID   :0
            LINKPROP   :phys-state      MTU  :--
            MAXBW      :--              MODE :--
            CUSTOM     :disable
            PRIORITY   :--              COS  :--
            PROTECTION :--
# ldm rm-vnet <interface-name> ldom
You can use –f switch in case if you need to forcibly remove vnet from ldom.
Finally you can run ldm ls –l command to validate if anything left related to ldom you are 
decommissioning, remove if any.
# ldm ls –l
This will have configuration details of all ldoms configured. So it will be long output. You can 
grep output to see anything related to your ldom left on which you are working.

How to Backup CDOM Configuration

It is advised to create a backup of CDOM configuration before and after any change. 
To display current available configiguration of Control Domain
# ldm list-config                                 OR                          # ldm list-spconfig
To create wew configuration backup of Control Domain
# ldm set-config <DATE>                  OR                         # ldm set-spconfig <DATE>

That`s it related to how to remove ldom, how to delete ldom in solaris, how to delete ldom, how to remove ldom configuration, or simply how to decommission ldom.

I hope we have covered everything related to how to delete ldom completely. Let us know in the comment if something left out, will be glad to update.

Other LDOM CDOM Related Stuff

1.  Solaris 11 LDOM Recovery

2. Configuring IPMP in Oracle Solaris 11

3. Restoring Domain Configurations

Share on Social Media
twitter facebook pinterest linkedin tumblr email
Follow us on Social Media
twitter facebook instagram pinterest linkedin tumblr
how to backup cdom configurationhow to check ldoms in solarishow to decommission ldomhow to delete ldomhow to delete ldom in solarishow to find cdom from ldomhow to login to ldom consolehow to remove ldomhow to remove ldom configurationhow to remove vdsdev/vdisk in ldomhow to remove vnet from ldomhow to shutdown ldomhow to stop ldom in solarishow to unbind ldomldm add-vdsdevldm listldm list-configldm list-spconfigldm lsldm ls –lldm rm-vnetldm set-configldm set-spconfigldoms in solarisremove vdsdevvirtinfo

Post navigation

How to Migrate LDOM
Linux Change Password

Categories

Recent Posts

  • How to restore Azure Virtual Machines from snapshots
  • How to Enable root SSH login on the ESXi host
  • How to Create Linux Virtual Machine in Microsoft Azure with CLI
  • How to Install & Configure SAMBA on Linux
  • Diskgroup fails to import with message license has expired or is not available for operation

Sign for Latest Updates

Storage

Restore Azure VM from snapshot
Azure Cloud

How to restore Azure Virtual Machines from snapshots

RSY Digital World February 4, 2021
How to Enable root SSH login on the ESXi host
ESX VMWare

How to Enable root SSH login on the ESXi host

Raj Rai February 4, 2021
How to Create Linux Virtual Machine in Microsoft Azure with CLI
Azure

How to Create Linux Virtual Machine in Microsoft Azure with CLI

Raj Rai February 2, 2021

Net Backup

Restore Azure VM from snapshot
Azure Cloud

How to restore Azure Virtual Machines from snapshots

RSY Digital World February 4, 2021
How to Enable root SSH login on the ESXi host
ESX VMWare

How to Enable root SSH login on the ESXi host

Raj Rai February 4, 2021
How to Create Linux Virtual Machine in Microsoft Azure with CLI
Azure

How to Create Linux Virtual Machine in Microsoft Azure with CLI

Raj Rai February 2, 2021
  • Products
  • Career Opportunities
  • Job Dashboard
  • Write for us
  • Submit Job
  • Post a Job
  • Linux Video Courses
  • Linux eBooks
  • Linux Print Books
  • Azure Exam Books
  • AWS Video Courses
  • FAQ
Copyright 2018-21 | All Rights Reserved | World`s Best Linux Blog
Privacy Policy