Use the oakcli modify
command to attach virtual disks to or detach virtual disks from virtual machines, transmit first-boot installation configuration messages to virtual machines, and to assign networks to or delete networks from virtual machines and virtual machine templates.
Syntax
Use the following oakcli modify
command syntax to modify a virtual machine or virtual machine template:
oakcli modify [vm vmname [-attachvdisk vdisk_name | -detachvdisk vdisk_name | -s key1:value1;key2:value2;...]] | [[vm vmname | vmtemplate vmtemplatename] [-addnetwork network | -deletenetwork network]] [-h]
Parameters
Parameter | Description |
---|---|
|
Name of the virtual machine |
|
Virtual machine template being modified |
|
Attach the named virtual disk to the named virtual machine. |
|
Detach the named virtual disk from the named virtual machine. |
|
Identifies a message consisting of one or more key/value pairs to send to the ovmd utility, where each key and value is separated by a colon (:) and each key/value pair is separated from the next key/value pair by quotation marks |
|
Identifies a new network to be assigned to the named virtual machine or template |
|
Identifies the network to be deleted from the named virtual machine or template |
|
(Optional) Display help for using the command. |
Usage Notes
The vmtemplate
object is valid with only the -addnetwork
or -deletenetwork
parameters.
Do not use the -attachvdisk
or the -detachvdisk
option with the -addnetwork
, -deletenetwork
, or -s
parameters.
Include only one of the -addnetwork
, -deletenetwork
, or -s
parameters when you use this command.
Examples
Here are examples of how to use the oakcli modify
command.
Modifying the Network Defined in a Virtual Machine Template
Replace the network assigned to the gc_11g
virtual machine template with the net1
network:
oakcli modify vmtemplate gc_11g -addnetwork net1
Sending a Message to a Running Virtual Machine
Update the root
user password for the gc_11g
virtual machine:
oakcli modify vm gc_11g -s "com.oracle.linux.root-password:root123"