4.3.21.1 ALTER MACHINE
Syntax
ALTER MACHINE
{ { DNSSERVERS='dnsservers' |
GATEWAYADAPTER=gatewayadapter |
HOSTNAMEADAPTER=hostnameadapter |
NTPSERVERS='ntpservers' |
TIMEZONE=timezone |
VSWITCH={ true | false } |
TYPE=newmachinetype |
ORADISKSIZE=oradisksize |
ORADISKPATH=oradiskpath }...
| ACTION={ START [ WAIT={ true | false } ] |
STOP [ WAIT={ true | false } ] |
RESTART [ WAIT={ true | false } ] |
CREATEIMAGE IMAGEFILE=imagefile SIZE=size [ FILESYSTEM=filesystem ] [ ZIPFILE=zipfile ] |
ATTACHDISK IMAGEFILE=imagefile MOUNTPATH=mountpath [ FILESYSTEM=filesystem ] |
DETACHDISK IMAGEFILE=imagefile [ DELETE=delete ] |
SETVCPU [ VCPU=vcpu ] [ MAXVCPU=maxvcpu ] [ REBOOT={ true | false } ] |
SETVMEM VMEM=vmem [ REBOOT={ true | false } ] } }
WHERE
{ ID=id |
HOSTNAME=hostname |
CLUSTERNUMBER=clusternumber { COMPUTENUMBER=computenumber | STORAGENUMBER=storagenumber } |
CLUSTERNAME=clustername { COMPUTENUMBER=computenumber | STORAGENUMBER=storagenumber } |
CLUSTERID=clusterid { COMPUTENUMBER=computenumber | STORAGENUMBER=storagenumber } }
Arguments
You can specify the following arguments for the machine:
-
DNSSERVERS
: Comma-separated list of DNS servers for the machine. Enclose the list in single quotes ('
). -
GATEWAYADAPTER
: Network adapter to use for the machine gateway:ADMIN
orCLIENT
-
HOSTNAMEADAPTER
: Network adapter to use for the machine hostname:ADMIN
orCLIENT
-
NTPSERVERS
: Comma-separated list of NTP servers for the machine. Enclose the list in single quotes ('
). -
TIMEZONE
: Timezone specification for the machine -
VSWITCH
: Specifies if the machine is connected to a vswitch. Default isfalse
. -
TYPE
: Sets a machine as new type. For example:X8XT
-
ORADISKSIZE
: Size (in GB) of the Oracle software volume (typically/u01
). Default is 20, minimum is 10. -
ORADISKPATH
: Mount point of the Oracle software volume. Default is/u01
. For non-default values, take great care to ensure other paths are compatible with the setting. -
ACTION
: Action to perform against the specified VM guest machine. One of the following:-
START
: Starts the specified guest. The action completes when the machine is ready for SSH connections. There is no error if the machine is already started. -
STOP
: Stops the specified guest. The action completes when the machine is shut down. There is no error if the machine is already stopped. -
RESTART
: Stops and then starts the specified guest. The action completes when the machine is ready for SSH connections. There is no error if the machine is already stopped. -
CREATEIMAGE
: Creates a disk image in the hypervisor for subsequentATTACHDISK
commands. -
ATTACHDISK
: Attaches a disk image from the hypervisor to a running guest and mounts the file system in the guest.FILESYSTEM
must be specified if the default (xfs
) is not used. -
DETACHDISK
: Unmount the file system and detach a disk image from a guest, and optionally delete the disk image. -
SETVCPU
: Changes the CPU resource allocation for a guest. The action allows allocation increases and reductions within the limit specified by themaxcpu
value in thevm.cfg
file. The action can operate on a running guest. A reboot is not required to enable changes. -
SETVMEM
: Changes the RAM resource allocation for a guest. A reboot is required to enable a change.
The following
ACTION
arguments are available:-
WAIT
: Optionally specifies whether to wait for the associated action to complete. Default istrue
. WithWAIT=false
, the action starts asynchronously, and the command returns immediately with no indication or guarantee of success. -
IMAGEFILE
: Name of the disk image file -
SIZE
: Size (in GB) of the disk image file -
FILESYSTEM
: File system type used in the disk image. Default isxfs
. Alternative isext4
. -
ZIPFILE
: Zip file used to optionally populate a new disk image -
MOUNTPATH
: Guest directory used to mount the disk image -
DELETE
: Optionally specifies whether to delete the disk image. Default isfalse
. -
VCPU
: Number of Virtual CPUs allocated to the guest machine -
MAXVCPU
: Maximum number of Virtual CPUs allocated to the guest machine -
VMEM
: Amount of RAM (in GB) allocated to the guest machine -
REBOOT
: Optionally specifies whether to automatically reboot the guest. Default isfalse
.
-
The following arguments are available in the WHERE
clause:
-
ID
: Specifies the identifier for the target machine in the OEDA XML file (es.xml
) -
HOSTNAME
: Specifies the current host name of the target machine -
CLUSTERNUMBER
: Cluster number associated with target machine in the OEDA XML file (es.xml
), starting at 1 -
CLUSTERNAME
: Name of the cluster associated with target machine in the OEDA XML file (es.xml
) -
CLUSTERID
: ID of the cluster associated with target machine in the OEDA XML file (es.xml
) -
COMPUTENUMBER
: The compute node number associated with target machine in the OEDA XML file (es.xml
). The numbering of compute nodes starts at 1 for each cluster. -
STORAGENUMBER
: The storage server number associated with target machine in the OEDA XML file (es.xml
). The numbering of storage servers starts at 1 for each cluster.
Example 4-27 ACTION Examples
The following examples show commands that use the ACTION
argument:
-
Start a guest:
ALTER MACHINE ACTION=START WHERE HOSTNAME=node1hostname
-
Stop a guest:
ALTER MACHINE ACTION=STOP WHERE HOSTNAME=node1hostname
-
Restart a guest:
ALTER MACHINE ACTION=RESTART WHERE HOSTNAME=node1hostname
-
Create a disk image:
ALTER MACHINE ACTION=CREATEIMAGE IMAGEFILE=example.img SIZE=2 WHERE HOSTNAME=node1hostname
ALTER MACHINE ACTION=CREATEIMAGE IMAGEFILE=example.img SIZE=2 ZIPFILE=data.zip WHERE HOSTNAME=node1hostname
ALTER MACHINE ACTION=CREATEIMAGE IMAGEFILE=example.img SIZE=2 FILESYTEM=ext4 WHERE HOSTNAME=node1hostname
ALTER MACHINE ACTION=CREATEIMAGE IMAGEFILE=example.img SIZE=2 FILESYTEM=ext4 ZIPFILE=data.zip WHERE HOSTNAME=node1hostname
-
Attach a disk image:
ALTER MACHINE ACTION=ATTACHDISK IMAGEFILE=/EXAVMIMAGES/example.img MOUNTPATH=/u02 WHERE HOSTNAME=node1hostname
ALTER MACHINE ACTION=ATTACHDISK IMAGEFILE=/EXAVMIMAGES/example.img MOUNTPATH=/u02 FILESYSTEM=ext4 WHERE HOSTNAME=node1hostname
-
Detach a disk image:
ALTER MACHINE ACTION=DETACHDISK IMAGEFILE=example.img WHERE HOSTNAME=node1hostname
ALTER MACHINE ACTION=DETACHDISK IMAGEFILE=example.img DELETE=true WHERE HOSTNAME=node1hostname
-
Change the CPU resource allocation:
ALTER MACHINE ACTION=SETVCPU MAXVCPU=12 VCPU=12 WHERE HOSTNAME=node1hostname
-
Change the RAM resource allocation:
ALTER MACHINE ACTION=SETVMEM VMEM=9 WHERE HOSTNAME=node1hostname
Parent topic: MACHINE