Add Physical System

I have multiple physical servers and are frequently added or removed All of these servers are using webmin and want to be added and deleted automatically from cloumin.

https://www.virtualmin.com/documentation/cloudmin/devel/cli

I looked closely at the above link, but unfortunately I couldn't find what I wanted.

I would be very grateful if you could tell me how to do New System-> Add Physical System or New System-> Find Physical System in cli.

Status: 
Needs review

Comments

Ilia's picture
Submitted by Ilia on Wed, 05/20/2020 - 08:23

Status:
Active
»
Closed (works as designed)

Hi,

Thanks for contacting us and sorry for the late response.

Command

[root@linux ~]# cloudmin create-system

Creates a new virtual system of some type.

cloudmin create-system --host name
                      [--unix-host name]
                      [--desc "system description"]
                       --ssh-key keyid | --ssh-pass password | --no-ssh
                      [--webmin | --webmin-pass password]
                      [--novirt]
                      [--image id]
                      [--no-update]
                      [--serial number --key number] |
                      [--same-serial] | [--allocate-serial]
                      [--no-check-serial]
                      [--id number]
                      [--disk-directory dir]
                      [--background]
                      [--start-at-boot | --no-start-at-boot]
                      [--direct-image | --no-direct-image]
                      [--owner name]
                      [--cloudmin-services]

Help

[root@linux ~]# cloudmin help create-system

CREATE-SYSTEM(1)      User Contributed Perl Documentation     CREATE-SYSTEM(1)

create-system.pl
       Creates a new virtual system of some type

       This command takes different parameters depending on the type of virtual system being created, but the following are always required :

       "--host" hostname A short hostname for the system to create, which will also be used as the Xen or VServers instance name.  "--desc" description A
       human-readable name for the system, which you will typically have to quote.  "--type" code The virtualization type code, like ’’xen’’ , ’’zones’’
       or ’’vservers’’ "--ssh-pass" password The initial root password for the new system.

       For a virtual system, you will need to specify the host system to create it on, using the "--xen-host", "--vservers-host" or "--zones-host"
       parameter.  If the system is to be created from an image, you will need to select it with the "--image" parameter, followed by an image ID. To see
       the full list of available and required options for a particular system type, run "create-system.pl" with the "--type" and "--help" flags.

       By default the new system’s Unix hostname will be the same as the external name set with the "--host" flag, but you can modify this with the
       "--unix-host" option. For example, for a customer’s system you might set it to www.something.com.

       If you are creating a system from an image that includes Virtualmin Pro, you will need to specify a license using either the "--allocate-serial"
       parameter, or "--serial" and "--key". The former will select an available license from the pool of those registered with Cloudmin, while the latter
       let you specify a serial number and key explicity.

       By default this API command will not exit until system creation completes.  However, you can use the "--background" flag to have most of the work
       performed in the background once initial checks are complete.

       The flag "--start-at-boot" can be given to have the new system restarted when its host system reboots. Alternately, you can use
       "--no-start-at-boot" to disable this. If neither flag is given, the Cloudmin default setting (chosen on the Cloudmin Configuration page in the UI)
       is used.

       To grant an existing system owner control over the new virtual system, use the "--owner" flag followed by a username. If you have Cloudmin Services
       installed, the "--cloudmin-services" flag will setup the system as a services client (assuming that the image contains Virtualmin).

Example usage
         cloudmin create-system --host xennoupdate --type xen --desc "Test without updates" --ssh-pass smeg  --no-update --xen-host sentosa.home --xen-memory 512 --image xen-centos5.0-virtualmin --allocate-serial
         Copying system image files ..
          .. done
         Starting creation of Xen system ..
         .. creation started
         Waiting for creation to complete ..
         .. creation complete
         Mounting new instance's filesystem ..
         .. mounted on /mnt/xen-xennoupdate
         Copying modules for kernel 2.6.18-8.1.4.el5xen to Xen filesystem ..
         .. done
         Setting root password ..
         .. done
         Updating configuration files with hostname and IP address ..
         .. done
         Updating network configuration files ..
         .. done
         Updating Virtualmin licence files ..
         .. done
         Allowing SSH logins by root ..
         .. already allowed
         Un-mounting instance's filesystem ..
         .. done
         Adding DNS entry xennoupdate.home. for IP address 193.9.101.245 ..
         .. done
         Starting up new Xen instance ..
         .. done
         Setting Webmin password ..
         .. done
         Waiting for Webmin to start ..
         .. started OK
         Refreshing status ..
         .. done
         Checking Virtualmin configuration ..
         .. done
         Enabling at hosting system boot ..
         .. done
         Creation of Xen system xennoupdate.home is complete
Status:
Closed (works as designed)
»
Needs review

I couldn't figure out anything just by looking at the 'help' item. rather than adding xen or kvm Please tell me how to add a physical server

Rather than creating a new server Is to add an already created server

Cloudmin-> New System-> Add Physical System Please provide the option to execute the 'Add Physical System' function from the command line. --type real?

Ilia's picture
Submitted by Ilia on Thu, 05/21/2020 - 12:10

I am sorry for misleading you at the first place. There is no such functionality at the moment.

Ilia's picture
Submitted by Ilia on Thu, 05/21/2020 - 12:11

Category: Support request » Feature request
Assigned: »

I will assign it to Jamie, as a feature request.

I'll take a look at adding an add-system API command for the next release.