/* * Author Yang Hongyang * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; version 2.1 only. with the special * exception on linking described in file LICENSE. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. */ #include #include "libxl.h" #include "xl.h" struct cmd_spec cmd_table[] = { { "create", &main_create, 1, 1, "Create a domain from config file ", " [options] [vars]", "-h Print this help.\n" "-p Leave the domain paused after it is created.\n" "-c Connect to the console after the domain is created.\n" "-f FILE, --defconfig=FILE\n Use the given configuration file.\n" "-q, --quiet Quiet.\n" "-n, --dryrun Dry run - prints the resulting configuration\n" " (deprecated in favour of global -N option).\n" "-d Enable debug messages.\n" "-e Do not wait in the background for the death of the domain.\n" "-V, --vncviewer Connect to the VNC display after the domain is created.\n" "-A, --vncviewer-autopass\n" " Pass VNC password to viewer via stdin." }, { "config-update", &main_config_update, 1, 1, "Update a running domain's saved configuration, used when rebuilding " "the domain after reboot", " [options] [vars]", "-h Print this help.\n" "-f FILE, --defconfig=FILE\n Use the given configuration file.\n" "-d Enable debug messages.\n" }, { "list", &main_list, 0, 0, "List information about all/some domains", "[options] [Domain]\n", "-l, --long Output all VM details\n" "-v, --verbose Prints out UUIDs and security context\n" "-Z, --context Prints out security context\n" "-n, --numa Prints out NUMA node affinity" }, { "destroy", &main_destroy, 0, 1, "Terminate a domain immediately", "", }, { "shutdown", &main_shutdown, 0, 1, "Issue a shutdown signal to a domain", "[options] <-a|Domain>", "-a, --all Shutdown all guest domains.\n" "-h Print this help.\n" "-F Fallback to ACPI power event for HVM guests with\n" " no PV drivers.\n" "-w, --wait Wait for guest(s) to shutdown.\n" }, { "reboot", &main_reboot, 0, 1, "Issue a reboot signal to a domain", "[options] <-a|Domain>", "-a, --all Shutdown all guest domains.\n" "-h Print this help.\n" "-F Fallback to ACPI reset event for HVM guests with\n" " no PV drivers.\n" "-w, --wait Wait for guest(s) to reboot.\n" }, { "pci-attach", &main_pciattach, 0, 1, "Insert a new pass-through pci device", " [Virtual Slot]", }, { "pci-detach", &main_pcidetach, 0, 1, "Remove a domain's pass-through pci device", " ", }, { "pci-list", &main_pcilist, 0, 0, "List pass-through pci devices for a domain", "", }, { "pci-assignable-add", &main_pciassignable_add, 0, 1, "Make a device assignable for pci-passthru", "", "-h Print this help.\n" }, { "pci-assignable-remove", &main_pciassignable_remove, 0, 1, "Remove a device from being assignable", "[options] ", "-h Print this help.\n" "-r Attempt to re-assign the device to the\n" " original driver" }, { "pci-assignable-list", &main_pciassignable_list, 0, 0, "List all the assignable pci devices", "", }, { "pause", &main_pause, 0, 1, "Pause execution of a domain", "", }, { "unpause", &main_unpause, 0, 1, "Unpause a paused domain", "", }, { "console", &main_console, 0, 0, "Attach to domain's console", "[options] \n" "-t console type, pv or serial\n" "-n console number" }, { "vncviewer", &main_vncviewer, 0, 0, "Attach to domain's VNC server.", "[options] \n" "--autopass Pass VNC password to viewer via stdin and\n" " -autopass\n" "--vncviewer-autopass (consistency alias for --autopass)" }, { "save", &main_save, 0, 1, "Save a domain state to restore later", "[options] []", "-h Print this help.\n" "-c Leave domain running after creating the snapshot.\n" "-p Leave domain paused after creating the snapshot." }, { "migrate", &main_migrate, 0, 1, "Migrate a domain to another host", "[options] ", "-h Print this help.\n" "-C Send instead of config file from creation.\n" "-s Use instead of ssh. String will be passed\n" " to sh. If empty, run instead of ssh xl\n" " migrate-receive [-d -e]\n" "-e Do not wait in the background (on ) for the death\n" " of the domain.\n" "--debug Print huge (!) amount of debug during the migration process." }, { "dump-core", &main_dump_core, 0, 1, "Core dump a domain", " " }, { "restore", &main_restore, 0, 1, "Restore a domain from a saved state", "[options] [] ", "-h Print this help.\n" "-p Do not unpause domain after restoring it.\n" "-e Do not wait in the background for the death of the domain.\n" "-d Enable debug messages.\n" "-V, --vncviewer Connect to the VNC display after the domain is created.\n" "-A, --vncviewer-autopass Pass VNC password to viewer via stdin." }, { "migrate-receive", &main_migrate_receive, 0, 1, "Restore a domain from a saved state", "- for internal use only", }, { "cd-insert", &main_cd_insert, 1, 1, "Insert a cdrom into a guest's cd drive", " ", }, { "cd-eject", &main_cd_eject, 1, 1, "Eject a cdrom from a guest's cd drive", " ", }, { "mem-max", &main_memmax, 0, 1, "Set the maximum amount reservation for a domain", " ", }, { "mem-set", &main_memset, 0, 1, "Set the current memory usage for a domain", " ", }, { "button-press", &main_button_press, 0, 1, "Indicate an ACPI button press to the domain", "