Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
hiddentrue

How to edit VM cost codes, lock and protect VMs, relocate a VM, troubleshoot VM launch, manage VMs with workflow feature, and perform power operations with the API on the hybrid cloud platform.

...

Insert excerpt
Relocate a deployed VM to another host
Relocate a deployed VM to another host
nameRelocate a deployed VM to another host
nopaneltrue

...

What happens when the user clicks deploy?

The VM scheduler deploys the VM.

...

Expand
titleClick here to show or hide the response example

Success status code: 200

Response payload:

Code Block
{
  "id": 47,
  "uuid": "e189ea34-46ac-4f15-a4e1-1c860e30fab2",
  "description": "A virtual machine",
  "coresPerSocket": 1,
  "idState": 4,
  "idType": 0,
  "type": "MANAGED",
  "highDisponibility": 0,
  "monitored": false,
  "protected": false,
  "variables": {},
  "backuppolicies": [],
  "lastSynchronize": 1589912530000,
  "generateGuestInitialPassword": false,
  "natrules": [],
  "vdrpEnabled": false,
  "vdrpPort": 0,
  "password": "50WyfITK",
  "deallocated": false,
  "name": "ABQ_e189ea34-46ac-4f15-a4e1-1c860e30fab2",
  "label": "yVM - 2020/05/01 16:34:54 CEST",
  "ram": 48,
  "cpu": 1,
  "state": "ON",
  "creationTimestamp": 1588343694000,
  "links": [
    {
      "title": "KVM",
      "rel": "machine",
      "type": "application/vnd.abiquo.machine+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/1/racks/2/machines/3"
    },
    {
      "title": "BCDC",
      "rel": "location",
      "type": "application/vnd.abiquo.datacenter+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/1"
    },
    {
      "title": "Abiquo",
      "rel": "enterprise",
      "type": "application/vnd.abiquo.enterprise+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/1"
    },
    {
      "title": "ABQ_e189ea34-46ac-4f15-a4e1-1c860e30fab2",
      "rel": "edit",
      "type": "application/vnd.abiquo.virtualmachine+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47"
    },
    {
      "rel": "asynctasks",
      "type": "application/vnd.abiquo.asynctasks+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/asynctasks"
    },
    {
      "title": "send mail",
      "rel": "sendmail",
      "type": "application/vnd.abiquo.mail+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/1/racks/2/machines/3/virtualmachines/47/action/sendmail"
    },
    {
      "title": "Cloud Administrator",
      "rel": "user",
      "type": "application/vnd.abiquo.user+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/1/users/1"
    },
    {
      "title": "bcdc_vdc_kvm",
      "rel": "virtualdatacenter",
      "type": "application/vnd.abiquo.virtualdatacenter+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2"
    },
    {
      "title": "vapp_kvm",
      "rel": "virtualappliance",
      "type": "application/vnd.abiquo.virtualappliance+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1"
    },
    {
      "title": "metadata",
      "rel": "metadata",
      "type": "application/vnd.abiquo.metadata+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/metadata"
    },
    {
      "title": "vlan network configurations",
      "rel": "configurations",
      "type": "application/vnd.abiquo.virtualmachinenetworkconfigurations+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/network/configurations"
    },
    {
      "title": "192.168.0.0/24",
      "rel": "network_configuration",
      "type": "application/vnd.abiquo.virtualmachinenetworkconfiguration+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/network/configurations/2"
    },
    {
      "title": "nics",
      "rel": "nics",
      "type": "application/vnd.abiquo.nics+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/network/nics"
    },
    {
      "title": "disks",
      "rel": "harddisks",
      "type": "application/vnd.abiquo.harddisks+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/storage/disks"
    },
    {
      "title": "ON",
      "rel": "state",
      "type": "application/vnd.abiquo.virtualmachinestate+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/state"
    },
    {
      "title": "virtual machine undeploy",
      "rel": "undeploy",
      "type": "application/vnd.abiquo.acceptedrequest+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/undeploy"
    },
    {
      "title": "virtual machine deploy",
      "rel": "deploy",
      "type": "application/vnd.abiquo.acceptedrequest+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/deploy"
    },
    {
      "title": "virtual machine reset",
      "rel": "reset",
      "type": "application/vnd.abiquo.acceptedrequest+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/reset"
    },
    {
      "title": "virtual machine snapshot",
      "rel": "instance",
      "type": "application/vnd.abiquo.acceptedrequest+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/instance"
    },
    {
      "title": "remote access",
      "rel": "rdpaccess",
      "type": "application/vnd.abiquo.virtualmachineconsole+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/config/rdpaccess"
    },
    {
      "title": "tasks",
      "rel": "tasks",
      "type": "application/vnd.abiquo.tasks+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/tasks"
    },
    {
      "title": "firewalls",
      "rel": "firewalls",
      "type": "application/vnd.abiquo.links+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/firewalls"
    },
    {
      "title": "load balancers",
      "rel": "loadbalancers",
      "type": "application/vnd.abiquo.loadbalancers+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/loadbalancers"
    },
    {
      "title": "request on demand backup",
      "rel": "requestbackup",
      "type": "application/vnd.abiquo.ondemandbackup+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/backup/action/request"
    },
    {
      "title": "request a restore of a backup",
      "rel": "requestrestore",
      "type": "application/vnd.abiquo.restore+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/backup/action/restore"
    },
    {
      "title": "move VM to a virtual appliance",
      "rel": "vappmove",
      "type": "application/vnd.abiquo.links+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/vappmove"
    },
    {
      "title": "move VM to another virtual datacenter",
      "rel": "move",
      "type": "application/vnd.abiquo.movevm+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/move"
    },
    {
      "title": "volumes",
      "rel": "volumes",
      "type": "application/vnd.abiquo.volumes+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/storage/volumes"
    },
    {
      "title": "HP_CPU1-RAM48-CPS1-CostCodenone-ABQf15c3a97",
      "rel": "hardwareprofile",
      "type": "application/vnd.abiquo.hardwareprofile+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/1/hardwareprofiles/106"
    },
    {
      "diskControllerType": "IDE",
      "diskLabel": "Hard disk 1",
      "length": "64",
      "title": "c4ec520d-95a0-4ce4-a0bf-01053751b742",
      "rel": "disk0",
      "type": "application/vnd.abiquo.harddisk+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/disks/8"
    },
    {
      "title": "Default Tier",
      "rel": "datastoretier0",
      "type": "application/vnd.abiquo.datastoretier+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/1/datastoretiers/1"
    },
    {
      "title": "192.168.0.4",
      "rel": "nic0",
      "type": "application/vnd.abiquo.privateip+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/privatenetworks/2/ips/9"
    },
    {
      "title": "192.168.0.8",
      "rel": "nic1",
      "type": "application/vnd.abiquo.privateip+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/privatenetworks/2/ips/27"
    },
    {
      "title": "protect",
      "rel": "protect",
      "type": "text/plain",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/protect"
    },
    {
      "title": "unprotect",
      "rel": "unprotect",
      "type": "text/plain",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/unprotect"
    },
    {
      "title": "metricsmetadata",
      "rel": "metricsmetadata",
      "type": "application/vnd.abiquo.metricsmetadata+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/metrics"
    },
    {
      "title": "enablemonitoring",
      "rel": "enablemonitoring",
      "type": "",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/enablemonitoring"
    },
    {
      "title": "collectd",
      "rel": "collectd",
      "type": "application/json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/metrics/collectd"
    },
    {
      "title": "alarmssearch",
      "rel": "alarmssearch",
      "type": "application/vnd.abiquo.alarms+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/alarms"
    },
    {
      "title": "clone",
      "rel": "clone",
      "type": "application/vnd.abiquo.virtualmachinecloneoptions+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/47/action/clone"
    },
    {
      "title": "KVM",
      "rel": "hypervisortype",
      "type": "application/vnd.abiquo.hypervisortype+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/KVM"
    },
    {
      "title": "yVM",
      "rel": "virtualmachinetemplate",
      "type": "application/vnd.abiquo.virtualmachinetemplate+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/58"
    },
    {
      "title": "Others",
      "rel": "category",
      "type": "application/vnd.abiquo.category+json",
      "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/categories/1"
    }
  ],
  "usageStatistics": []
}  

...

Manage VM power states using the API

Excerpt
nameManage VM power states using the API

To manage the virtual machine using the API, first you need to retrieve the virtual machine and find the links for different actions. Remember to see VirtualMachinesResource for full details of virtual machine operations using the Abiquo API.

Insert excerpt
VM power actions using the API
VM power actions using the API
nameVM power actions using the API
nopaneltrue

...

Related pages