source: trunk/packages/xen-3.1/xen-3.1/tools/libxen/include/xen/api/xen_vm.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 20.6 KB
Line 
1/*
2 * Copyright (c) 2006-2007, XenSource Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
17 */
18
19#ifndef XEN_VM_H
20#define XEN_VM_H
21
22#include <xen/api/xen_common.h>
23#include <xen/api/xen_console_decl.h>
24#include <xen/api/xen_crashdump_decl.h>
25#include <xen/api/xen_host_decl.h>
26#include <xen/api/xen_on_crash_behaviour.h>
27#include <xen/api/xen_on_normal_exit.h>
28#include <xen/api/xen_string_string_map.h>
29#include <xen/api/xen_vbd_decl.h>
30#include <xen/api/xen_vdi_decl.h>
31#include <xen/api/xen_vif_decl.h>
32#include <xen/api/xen_vm_decl.h>
33#include <xen/api/xen_vm_guest_metrics_decl.h>
34#include <xen/api/xen_vm_metrics_decl.h>
35#include <xen/api/xen_vm_power_state.h>
36#include <xen/api/xen_vtpm_decl.h>
37
38
39/*
40 * The VM class.
41 *
42 * A virtual machine (or 'guest').
43 */
44
45
46/**
47 * Free the given xen_vm.  The given handle must have been allocated by
48 * this library.
49 */
50extern void
51xen_vm_free(xen_vm vm);
52
53
54typedef struct xen_vm_set
55{
56    size_t size;
57    xen_vm *contents[];
58} xen_vm_set;
59
60/**
61 * Allocate a xen_vm_set of the given size.
62 */
63extern xen_vm_set *
64xen_vm_set_alloc(size_t size);
65
66/**
67 * Free the given xen_vm_set.  The given set must have been allocated
68 * by this library.
69 */
70extern void
71xen_vm_set_free(xen_vm_set *set);
72
73
74typedef struct xen_vm_record
75{
76    xen_vm handle;
77    char *uuid;
78    enum xen_vm_power_state power_state;
79    char *name_label;
80    char *name_description;
81    int64_t user_version;
82    bool is_a_template;
83    bool auto_power_on;
84    struct xen_vdi_record_opt *suspend_vdi;
85    struct xen_host_record_opt *resident_on;
86    int64_t memory_static_max;
87    int64_t memory_dynamic_max;
88    int64_t memory_dynamic_min;
89    int64_t memory_static_min;
90    xen_string_string_map *vcpus_params;
91    int64_t vcpus_max;
92    int64_t vcpus_at_startup;
93    enum xen_on_normal_exit actions_after_shutdown;
94    enum xen_on_normal_exit actions_after_reboot;
95    enum xen_on_crash_behaviour actions_after_crash;
96    struct xen_console_record_opt_set *consoles;
97    struct xen_vif_record_opt_set *vifs;
98    struct xen_vbd_record_opt_set *vbds;
99    struct xen_crashdump_record_opt_set *crash_dumps;
100    struct xen_vtpm_record_opt_set *vtpms;
101    char *pv_bootloader;
102    char *pv_kernel;
103    char *pv_ramdisk;
104    char *pv_args;
105    char *pv_bootloader_args;
106    char *hvm_boot_policy;
107    xen_string_string_map *hvm_boot_params;
108    xen_string_string_map *platform;
109    char *pci_bus;
110    xen_string_string_map *other_config;
111    int64_t domid;
112    bool is_control_domain;
113    struct xen_vm_metrics_record_opt *metrics;
114    struct xen_vm_guest_metrics_record_opt *guest_metrics;
115} xen_vm_record;
116
117/**
118 * Allocate a xen_vm_record.
119 */
120extern xen_vm_record *
121xen_vm_record_alloc(void);
122
123/**
124 * Free the given xen_vm_record, and all referenced values.  The given
125 * record must have been allocated by this library.
126 */
127extern void
128xen_vm_record_free(xen_vm_record *record);
129
130
131typedef struct xen_vm_record_opt
132{
133    bool is_record;
134    union
135    {
136        xen_vm handle;
137        xen_vm_record *record;
138    } u;
139} xen_vm_record_opt;
140
141/**
142 * Allocate a xen_vm_record_opt.
143 */
144extern xen_vm_record_opt *
145xen_vm_record_opt_alloc(void);
146
147/**
148 * Free the given xen_vm_record_opt, and all referenced values.  The
149 * given record_opt must have been allocated by this library.
150 */
151extern void
152xen_vm_record_opt_free(xen_vm_record_opt *record_opt);
153
154
155typedef struct xen_vm_record_set
156{
157    size_t size;
158    xen_vm_record *contents[];
159} xen_vm_record_set;
160
161/**
162 * Allocate a xen_vm_record_set of the given size.
163 */
164extern xen_vm_record_set *
165xen_vm_record_set_alloc(size_t size);
166
167/**
168 * Free the given xen_vm_record_set, and all referenced values.  The
169 * given set must have been allocated by this library.
170 */
171extern void
172xen_vm_record_set_free(xen_vm_record_set *set);
173
174
175
176typedef struct xen_vm_record_opt_set
177{
178    size_t size;
179    xen_vm_record_opt *contents[];
180} xen_vm_record_opt_set;
181
182/**
183 * Allocate a xen_vm_record_opt_set of the given size.
184 */
185extern xen_vm_record_opt_set *
186xen_vm_record_opt_set_alloc(size_t size);
187
188/**
189 * Free the given xen_vm_record_opt_set, and all referenced values.
190 * The given set must have been allocated by this library.
191 */
192extern void
193xen_vm_record_opt_set_free(xen_vm_record_opt_set *set);
194
195
196/**
197 * Get a record containing the current state of the given VM.
198 */
199extern bool
200xen_vm_get_record(xen_session *session, xen_vm_record **result, xen_vm vm);
201
202
203/**
204 * Get a reference to the VM instance with the specified UUID.
205 */
206extern bool
207xen_vm_get_by_uuid(xen_session *session, xen_vm *result, char *uuid);
208
209
210/**
211 * Create a new VM instance, and return its handle.
212 */
213extern bool
214xen_vm_create(xen_session *session, xen_vm *result, xen_vm_record *record);
215
216
217/**
218 * Destroy the specified VM.  The VM is completely removed from the
219 * system.  This function can only be called when the VM is in the Halted
220 * State.
221 */
222extern bool
223xen_vm_destroy(xen_session *session, xen_vm vm);
224
225
226/**
227 * Get all the VM instances with the given label.
228 */
229extern bool
230xen_vm_get_by_name_label(xen_session *session, struct xen_vm_set **result, char *label);
231
232
233/**
234 * Get the uuid field of the given VM.
235 */
236extern bool
237xen_vm_get_uuid(xen_session *session, char **result, xen_vm vm);
238
239
240/**
241 * Get the power_state field of the given VM.
242 */
243extern bool
244xen_vm_get_power_state(xen_session *session, enum xen_vm_power_state *result, xen_vm vm);
245
246
247/**
248 * Get the name/label field of the given VM.
249 */
250extern bool
251xen_vm_get_name_label(xen_session *session, char **result, xen_vm vm);
252
253
254/**
255 * Get the name/description field of the given VM.
256 */
257extern bool
258xen_vm_get_name_description(xen_session *session, char **result, xen_vm vm);
259
260
261/**
262 * Get the user_version field of the given VM.
263 */
264extern bool
265xen_vm_get_user_version(xen_session *session, int64_t *result, xen_vm vm);
266
267
268/**
269 * Get the is_a_template field of the given VM.
270 */
271extern bool
272xen_vm_get_is_a_template(xen_session *session, bool *result, xen_vm vm);
273
274
275/**
276 * Get the auto_power_on field of the given VM.
277 */
278extern bool
279xen_vm_get_auto_power_on(xen_session *session, bool *result, xen_vm vm);
280
281
282/**
283 * Get the suspend_VDI field of the given VM.
284 */
285extern bool
286xen_vm_get_suspend_vdi(xen_session *session, xen_vdi *result, xen_vm vm);
287
288
289/**
290 * Get the resident_on field of the given VM.
291 */
292extern bool
293xen_vm_get_resident_on(xen_session *session, xen_host *result, xen_vm vm);
294
295
296/**
297 * Get the memory/static_max field of the given VM.
298 */
299extern bool
300xen_vm_get_memory_static_max(xen_session *session, int64_t *result, xen_vm vm);
301
302
303/**
304 * Get the memory/dynamic_max field of the given VM.
305 */
306extern bool
307xen_vm_get_memory_dynamic_max(xen_session *session, int64_t *result, xen_vm vm);
308
309
310/**
311 * Get the memory/dynamic_min field of the given VM.
312 */
313extern bool
314xen_vm_get_memory_dynamic_min(xen_session *session, int64_t *result, xen_vm vm);
315
316
317/**
318 * Get the memory/static_min field of the given VM.
319 */
320extern bool
321xen_vm_get_memory_static_min(xen_session *session, int64_t *result, xen_vm vm);
322
323
324/**
325 * Get the VCPUs/params field of the given VM.
326 */
327extern bool
328xen_vm_get_vcpus_params(xen_session *session, xen_string_string_map **result, xen_vm vm);
329
330
331/**
332 * Get the VCPUs/max field of the given VM.
333 */
334extern bool
335xen_vm_get_vcpus_max(xen_session *session, int64_t *result, xen_vm vm);
336
337
338/**
339 * Get the VCPUs/at_startup field of the given VM.
340 */
341extern bool
342xen_vm_get_vcpus_at_startup(xen_session *session, int64_t *result, xen_vm vm);
343
344
345/**
346 * Get the actions/after_shutdown field of the given VM.
347 */
348extern bool
349xen_vm_get_actions_after_shutdown(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm);
350
351
352/**
353 * Get the actions/after_reboot field of the given VM.
354 */
355extern bool
356xen_vm_get_actions_after_reboot(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm);
357
358
359/**
360 * Get the actions/after_crash field of the given VM.
361 */
362extern bool
363xen_vm_get_actions_after_crash(xen_session *session, enum xen_on_crash_behaviour *result, xen_vm vm);
364
365
366/**
367 * Get the consoles field of the given VM.
368 */
369extern bool
370xen_vm_get_consoles(xen_session *session, struct xen_console_set **result, xen_vm vm);
371
372
373/**
374 * Get the VIFs field of the given VM.
375 */
376extern bool
377xen_vm_get_vifs(xen_session *session, struct xen_vif_set **result, xen_vm vm);
378
379
380/**
381 * Get the VBDs field of the given VM.
382 */
383extern bool
384xen_vm_get_vbds(xen_session *session, struct xen_vbd_set **result, xen_vm vm);
385
386
387/**
388 * Get the crash_dumps field of the given VM.
389 */
390extern bool
391xen_vm_get_crash_dumps(xen_session *session, struct xen_crashdump_set **result, xen_vm vm);
392
393
394/**
395 * Get the VTPMs field of the given VM.
396 */
397extern bool
398xen_vm_get_vtpms(xen_session *session, struct xen_vtpm_set **result, xen_vm vm);
399
400
401/**
402 * Get the PV/bootloader field of the given VM.
403 */
404extern bool
405xen_vm_get_pv_bootloader(xen_session *session, char **result, xen_vm vm);
406
407
408/**
409 * Get the PV/kernel field of the given VM.
410 */
411extern bool
412xen_vm_get_pv_kernel(xen_session *session, char **result, xen_vm vm);
413
414
415/**
416 * Get the PV/ramdisk field of the given VM.
417 */
418extern bool
419xen_vm_get_pv_ramdisk(xen_session *session, char **result, xen_vm vm);
420
421
422/**
423 * Get the PV/args field of the given VM.
424 */
425extern bool
426xen_vm_get_pv_args(xen_session *session, char **result, xen_vm vm);
427
428
429/**
430 * Get the PV/bootloader_args field of the given VM.
431 */
432extern bool
433xen_vm_get_pv_bootloader_args(xen_session *session, char **result, xen_vm vm);
434
435
436/**
437 * Get the HVM/boot_policy field of the given VM.
438 */
439extern bool
440xen_vm_get_hvm_boot_policy(xen_session *session, char **result, xen_vm vm);
441
442
443/**
444 * Get the HVM/boot_params field of the given VM.
445 */
446extern bool
447xen_vm_get_hvm_boot_params(xen_session *session, xen_string_string_map **result, xen_vm vm);
448
449
450/**
451 * Get the platform field of the given VM.
452 */
453extern bool
454xen_vm_get_platform(xen_session *session, xen_string_string_map **result, xen_vm vm);
455
456
457/**
458 * Get the PCI_bus field of the given VM.
459 */
460extern bool
461xen_vm_get_pci_bus(xen_session *session, char **result, xen_vm vm);
462
463
464/**
465 * Get the other_config field of the given VM.
466 */
467extern bool
468xen_vm_get_other_config(xen_session *session, xen_string_string_map **result, xen_vm vm);
469
470
471/**
472 * Get the domid field of the given VM.
473 */
474extern bool
475xen_vm_get_domid(xen_session *session, int64_t *result, xen_vm vm);
476
477
478/**
479 * Get the is_control_domain field of the given VM.
480 */
481extern bool
482xen_vm_get_is_control_domain(xen_session *session, bool *result, xen_vm vm);
483
484
485/**
486 * Get the metrics field of the given VM.
487 */
488extern bool
489xen_vm_get_metrics(xen_session *session, xen_vm_metrics *result, xen_vm vm);
490
491
492/**
493 * Get the guest_metrics field of the given VM.
494 */
495extern bool
496xen_vm_get_guest_metrics(xen_session *session, xen_vm_guest_metrics *result, xen_vm vm);
497
498
499/**
500 * Set the name/label field of the given VM.
501 */
502extern bool
503xen_vm_set_name_label(xen_session *session, xen_vm vm, char *label);
504
505
506/**
507 * Set the name/description field of the given VM.
508 */
509extern bool
510xen_vm_set_name_description(xen_session *session, xen_vm vm, char *description);
511
512
513/**
514 * Set the user_version field of the given VM.
515 */
516extern bool
517xen_vm_set_user_version(xen_session *session, xen_vm vm, int64_t user_version);
518
519
520/**
521 * Set the is_a_template field of the given VM.
522 */
523extern bool
524xen_vm_set_is_a_template(xen_session *session, xen_vm vm, bool is_a_template);
525
526
527/**
528 * Set the auto_power_on field of the given VM.
529 */
530extern bool
531xen_vm_set_auto_power_on(xen_session *session, xen_vm vm, bool auto_power_on);
532
533
534/**
535 * Set the memory/static_max field of the given VM.
536 */
537extern bool
538xen_vm_set_memory_static_max(xen_session *session, xen_vm vm, int64_t static_max);
539
540
541/**
542 * Set the memory/dynamic_max field of the given VM.
543 */
544extern bool
545xen_vm_set_memory_dynamic_max(xen_session *session, xen_vm vm, int64_t dynamic_max);
546
547
548/**
549 * Set the memory/dynamic_min field of the given VM.
550 */
551extern bool
552xen_vm_set_memory_dynamic_min(xen_session *session, xen_vm vm, int64_t dynamic_min);
553
554
555/**
556 * Set the memory/static_min field of the given VM.
557 */
558extern bool
559xen_vm_set_memory_static_min(xen_session *session, xen_vm vm, int64_t static_min);
560
561
562/**
563 * Set the VCPUs/params field of the given VM.
564 */
565extern bool
566xen_vm_set_vcpus_params(xen_session *session, xen_vm vm, xen_string_string_map *params);
567
568
569/**
570 * Add the given key-value pair to the VCPUs/params field of the given
571 * VM.
572 */
573extern bool
574xen_vm_add_to_vcpus_params(xen_session *session, xen_vm vm, char *key, char *value);
575
576
577/**
578 * Remove the given key and its corresponding value from the
579 * VCPUs/params field of the given VM.  If the key is not in that Map, then do
580 * nothing.
581 */
582extern bool
583xen_vm_remove_from_vcpus_params(xen_session *session, xen_vm vm, char *key);
584
585
586/**
587 * Set the VCPUs/max field of the given VM.
588 */
589extern bool
590xen_vm_set_vcpus_max(xen_session *session, xen_vm vm, int64_t max);
591
592
593/**
594 * Set the VCPUs/at_startup field of the given VM.
595 */
596extern bool
597xen_vm_set_vcpus_at_startup(xen_session *session, xen_vm vm, int64_t at_startup);
598
599
600/**
601 * Set the actions/after_shutdown field of the given VM.
602 */
603extern bool
604xen_vm_set_actions_after_shutdown(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_shutdown);
605
606
607/**
608 * Set the actions/after_reboot field of the given VM.
609 */
610extern bool
611xen_vm_set_actions_after_reboot(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_reboot);
612
613
614/**
615 * Set the actions/after_crash field of the given VM.
616 */
617extern bool
618xen_vm_set_actions_after_crash(xen_session *session, xen_vm vm, enum xen_on_crash_behaviour after_crash);
619
620
621/**
622 * Set the PV/bootloader field of the given VM.
623 */
624extern bool
625xen_vm_set_pv_bootloader(xen_session *session, xen_vm vm, char *bootloader);
626
627
628/**
629 * Set the PV/kernel field of the given VM.
630 */
631extern bool
632xen_vm_set_pv_kernel(xen_session *session, xen_vm vm, char *kernel);
633
634
635/**
636 * Set the PV/ramdisk field of the given VM.
637 */
638extern bool
639xen_vm_set_pv_ramdisk(xen_session *session, xen_vm vm, char *ramdisk);
640
641
642/**
643 * Set the PV/args field of the given VM.
644 */
645extern bool
646xen_vm_set_pv_args(xen_session *session, xen_vm vm, char *args);
647
648
649/**
650 * Set the PV/bootloader_args field of the given VM.
651 */
652extern bool
653xen_vm_set_pv_bootloader_args(xen_session *session, xen_vm vm, char *bootloader_args);
654
655
656/**
657 * Set the HVM/boot_policy field of the given VM.
658 */
659extern bool
660xen_vm_set_hvm_boot_policy(xen_session *session, xen_vm vm, char *boot_policy);
661
662
663/**
664 * Set the HVM/boot_params field of the given VM.
665 */
666extern bool
667xen_vm_set_hvm_boot_params(xen_session *session, xen_vm vm, xen_string_string_map *boot_params);
668
669
670/**
671 * Add the given key-value pair to the HVM/boot_params field of the
672 * given VM.
673 */
674extern bool
675xen_vm_add_to_hvm_boot_params(xen_session *session, xen_vm vm, char *key, char *value);
676
677
678/**
679 * Remove the given key and its corresponding value from the
680 * HVM/boot_params field of the given VM.  If the key is not in that Map, then
681 * do nothing.
682 */
683extern bool
684xen_vm_remove_from_hvm_boot_params(xen_session *session, xen_vm vm, char *key);
685
686
687/**
688 * Set the platform field of the given VM.
689 */
690extern bool
691xen_vm_set_platform(xen_session *session, xen_vm vm, xen_string_string_map *platform);
692
693
694/**
695 * Add the given key-value pair to the platform field of the given VM.
696 */
697extern bool
698xen_vm_add_to_platform(xen_session *session, xen_vm vm, char *key, char *value);
699
700
701/**
702 * Remove the given key and its corresponding value from the platform
703 * field of the given VM.  If the key is not in that Map, then do nothing.
704 */
705extern bool
706xen_vm_remove_from_platform(xen_session *session, xen_vm vm, char *key);
707
708
709/**
710 * Set the PCI_bus field of the given VM.
711 */
712extern bool
713xen_vm_set_pci_bus(xen_session *session, xen_vm vm, char *pci_bus);
714
715
716/**
717 * Set the other_config field of the given VM.
718 */
719extern bool
720xen_vm_set_other_config(xen_session *session, xen_vm vm, xen_string_string_map *other_config);
721
722
723/**
724 * Add the given key-value pair to the other_config field of the given
725 * VM.
726 */
727extern bool
728xen_vm_add_to_other_config(xen_session *session, xen_vm vm, char *key, char *value);
729
730
731/**
732 * Remove the given key and its corresponding value from the
733 * other_config field of the given VM.  If the key is not in that Map, then do
734 * nothing.
735 */
736extern bool
737xen_vm_remove_from_other_config(xen_session *session, xen_vm vm, char *key);
738
739
740/**
741 * Clones the specified VM, making a new VM. Clone automatically
742 * exploits the capabilities of the underlying storage repository in which the
743 * VM's disk images are stored (e.g. Copy on Write).   This function can only
744 * be called when the VM is in the Halted State.
745 */
746extern bool
747xen_vm_clone(xen_session *session, xen_vm *result, xen_vm vm, char *new_name);
748
749
750/**
751 * Start the specified VM.  This function can only be called with the
752 * VM is in the Halted State.
753 */
754extern bool
755xen_vm_start(xen_session *session, xen_vm vm, bool start_paused);
756
757
758/**
759 * Pause the specified VM. This can only be called when the specified
760 * VM is in the Running state.
761 */
762extern bool
763xen_vm_pause(xen_session *session, xen_vm vm);
764
765
766/**
767 * Resume the specified VM. This can only be called when the specified
768 * VM is in the Paused state.
769 */
770extern bool
771xen_vm_unpause(xen_session *session, xen_vm vm);
772
773
774/**
775 * Attempt to cleanly shutdown the specified VM. (Note: this may not be
776 * supported---e.g. if a guest agent is not installed).
777 *
778 * Once shutdown has been completed perform poweroff action specified in guest
779 * configuration.
780 *
781 * This can only be called when the specified VM is in the Running state.
782 */
783extern bool
784xen_vm_clean_shutdown(xen_session *session, xen_vm vm);
785
786
787/**
788 * Attempt to cleanly shutdown the specified VM (Note: this may not be
789 * supported---e.g. if a guest agent is not installed).
790 *
791 * Once shutdown has been completed perform reboot action specified in guest
792 * configuration.
793 *
794 * This can only be called when the specified VM is in the Running state.
795 */
796extern bool
797xen_vm_clean_reboot(xen_session *session, xen_vm vm);
798
799
800/**
801 * Stop executing the specified VM without attempting a clean shutdown.
802 * Then perform poweroff action specified in VM configuration.
803 */
804extern bool
805xen_vm_hard_shutdown(xen_session *session, xen_vm vm);
806
807
808/**
809 * Stop executing the specified VM without attempting a clean shutdown.
810 * Then perform reboot action specified in VM configuration
811 */
812extern bool
813xen_vm_hard_reboot(xen_session *session, xen_vm vm);
814
815
816/**
817 * Suspend the specified VM to disk.  This can only be called when the
818 * specified VM is in the Running state.
819 */
820extern bool
821xen_vm_suspend(xen_session *session, xen_vm vm);
822
823
824/**
825 * Awaken the specified VM and resume it.  This can only be called when
826 * the specified VM is in the Suspended state.
827 */
828extern bool
829xen_vm_resume(xen_session *session, xen_vm vm, bool start_paused);
830
831
832/**
833 * Set this VM's VCPUs/at_startup value, and set the same value on the
834 * VM, if running
835 */
836extern bool
837xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu);
838
839
840/**
841 * Add the given key-value pair to VM.VCPUs_params, and apply that
842 * value on the running VM.
843 */
844extern bool
845xen_vm_add_to_vcpus_params_live(xen_session *session, xen_vm self, char *key, char *value);
846
847
848/**
849 * Set memory_dynamic_max in database and on running VM.
850 */
851extern bool
852xen_vm_set_memory_dynamic_max_live(xen_session *session, xen_vm self, int64_t max);
853
854
855/**
856 * Set memory_dynamic_min in database and on running VM.
857 */
858extern bool
859xen_vm_set_memory_dynamic_min_live(xen_session *session, xen_vm self, int64_t min);
860
861
862/**
863 * Send the given key as a sysrq to this VM.  The key is specified as a
864 * single character (a String of length 1).  This can only be called when the
865 * specified VM is in the Running state.
866 */
867extern bool
868xen_vm_send_sysrq(xen_session *session, xen_vm vm, char *key);
869
870
871/**
872 * Send the named trigger to this VM.  This can only be called when the
873 * specified VM is in the Running state.
874 */
875extern bool
876xen_vm_send_trigger(xen_session *session, xen_vm vm, char *trigger);
877
878
879/**
880 * Migrate the VM to another host.  This can only be called when the
881 * specified VM is in the Running state.
882 */
883extern bool
884xen_vm_migrate(xen_session *session, xen_vm vm, char *dest, bool live, xen_string_string_map *options);
885
886
887/**
888 * Return a list of all the VMs known to the system.
889 */
890extern bool
891xen_vm_get_all(xen_session *session, struct xen_vm_set **result);
892
893
894#endif
Note: See TracBrowser for help on using the repository browser.