VirtualBox

source: vbox/trunk/src/VBox/Main/include/ConsoleImpl.h@ 55437

Last change on this file since 55437 was 55437, checked in by vboxsync, 10 years ago

Main/Console+Machine: deliver OnGuestPropertyChanged for the current VM also through the Console event source, to make event delivery more efficient (less broadcasting/filtering compared to using the VirtualBox event source), which of course only works within VM processes.
VBoxHeadless: make use of the more efficient event delivery path, which as an additional bonus often allows VBoxSVC to skip queueing the guest property changed events, which for fast delivery rates needs quite some memory.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 42.6 KB
Line 
1/* $Id: ConsoleImpl.h 55437 2015-04-27 09:35:19Z vboxsync $ */
2/** @file
3 * VBox Console COM Class definition
4 */
5
6/*
7 * Copyright (C) 2005-2015 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ____H_CONSOLEIMPL
19#define ____H_CONSOLEIMPL
20
21#include "VirtualBoxBase.h"
22#include "VBox/com/array.h"
23#include "EventImpl.h"
24#include "SecretKeyStore.h"
25#include "ConsoleWrap.h"
26
27class Guest;
28class Keyboard;
29class Mouse;
30class Display;
31class MachineDebugger;
32class TeleporterStateSrc;
33class OUSBDevice;
34class RemoteUSBDevice;
35class SharedFolder;
36class VRDEServerInfo;
37class EmulatedUSB;
38#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
39class AudioVRDE;
40#else
41class AudioSniffer;
42#endif
43class AudioVRDE;
44class Nvram;
45#ifdef VBOX_WITH_USB_CARDREADER
46class UsbCardReader;
47#endif
48class ConsoleVRDPServer;
49class VMMDev;
50class Progress;
51class BusAssignmentManager;
52COM_STRUCT_OR_CLASS(IEventListener);
53#ifdef VBOX_WITH_EXTPACK
54class ExtPackManager;
55#endif
56class VMMDevMouseInterface;
57class DisplayMouseInterface;
58
59#include <iprt/uuid.h>
60#include <iprt/memsafer.h>
61#include <VBox/RemoteDesktop/VRDE.h>
62#include <VBox/vmm/pdmdrv.h>
63#ifdef VBOX_WITH_GUEST_PROPS
64# include <VBox/HostServices/GuestPropertySvc.h> /* For the property notification callback */
65#endif
66
67#ifdef RT_OS_WINDOWS
68# include "../src-server/win/VBoxComEvents.h"
69#endif
70
71struct VUSBIRHCONFIG;
72typedef struct VUSBIRHCONFIG *PVUSBIRHCONFIG;
73
74#include <list>
75#include <vector>
76
77// defines
78///////////////////////////////////////////////////////////////////////////////
79
80/**
81 * Checks the availability of the underlying VM device driver corresponding
82 * to the COM interface (IKeyboard, IMouse, IDisplay, etc.). When the driver is
83 * not available (NULL), sets error info and returns returns E_ACCESSDENIED.
84 * The translatable error message is defined in null context.
85 *
86 * Intended to used only within Console children (i.e. Keyboard, Mouse,
87 * Display, etc.).
88 *
89 * @param drv driver pointer to check (compare it with NULL)
90 */
91#define CHECK_CONSOLE_DRV(drv) \
92 do { \
93 if (!(drv)) \
94 return setError(E_ACCESSDENIED, tr("The console is not powered up")); \
95 } while (0)
96
97// Console
98///////////////////////////////////////////////////////////////////////////////
99
100class ConsoleMouseInterface
101{
102public:
103 virtual VMMDevMouseInterface *i_getVMMDevMouseInterface(){return NULL;}
104 virtual DisplayMouseInterface *i_getDisplayMouseInterface(){return NULL;}
105 virtual void i_onMouseCapabilityChange(BOOL supportsAbsolute,
106 BOOL supportsRelative,
107 BOOL supportsMT,
108 BOOL needsHostCursor){NOREF(supportsAbsolute); NOREF(supportsRelative); NOREF(supportsMT); NOREF(needsHostCursor);}
109};
110
111/** IConsole implementation class */
112class ATL_NO_VTABLE Console :
113 public ConsoleWrap,
114 public ConsoleMouseInterface
115{
116
117public:
118
119 DECLARE_EMPTY_CTOR_DTOR(Console)
120
121 HRESULT FinalConstruct();
122 void FinalRelease();
123
124 // public initializers/uninitializers for internal purposes only
125 HRESULT init(IMachine *aMachine, IInternalMachineControl *aControl, LockType_T aLockType);
126 void uninit();
127
128
129 // public methods for internal purposes only
130
131 /*
132 * Note: the following methods do not increase refcount. intended to be
133 * called only by the VM execution thread.
134 */
135
136 Guest *i_getGuest() const { return mGuest; }
137 Keyboard *i_getKeyboard() const { return mKeyboard; }
138 Mouse *i_getMouse() const { return mMouse; }
139 Display *i_getDisplay() const { return mDisplay; }
140 MachineDebugger *i_getMachineDebugger() const { return mDebugger; }
141#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
142 AudioVRDE *i_getAudioVRDE() const { return mAudioVRDE; }
143#else
144 AudioSniffer *i_getAudioSniffer() const { return mAudioSniffer; }
145#endif
146
147 const ComPtr<IMachine> &i_machine() const { return mMachine; }
148 const Bstr &i_getId() const { return mstrUuid; }
149
150 bool i_useHostClipboard() { return mfUseHostClipboard; }
151
152 /** Method is called only from ConsoleVRDPServer */
153 IVRDEServer *i_getVRDEServer() const { return mVRDEServer; }
154
155 ConsoleVRDPServer *i_consoleVRDPServer() const { return mConsoleVRDPServer; }
156
157 HRESULT i_updateMachineState(MachineState_T aMachineState);
158 HRESULT i_getNominalState(MachineState_T &aNominalState);
159
160 // events from IInternalSessionControl
161 HRESULT i_onNetworkAdapterChange(INetworkAdapter *aNetworkAdapter, BOOL changeAdapter);
162 HRESULT i_onSerialPortChange(ISerialPort *aSerialPort);
163 HRESULT i_onParallelPortChange(IParallelPort *aParallelPort);
164 HRESULT i_onStorageControllerChange();
165 HRESULT i_onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
166 HRESULT i_onCPUChange(ULONG aCPU, BOOL aRemove);
167 HRESULT i_onCPUExecutionCapChange(ULONG aExecutionCap);
168 HRESULT i_onClipboardModeChange(ClipboardMode_T aClipboardMode);
169 HRESULT i_onDnDModeChange(DnDMode_T aDnDMode);
170 HRESULT i_onVRDEServerChange(BOOL aRestart);
171 HRESULT i_onVideoCaptureChange();
172 HRESULT i_onUSBControllerChange();
173 HRESULT i_onSharedFolderChange(BOOL aGlobal);
174 HRESULT i_onUSBDeviceAttach(IUSBDevice *aDevice, IVirtualBoxErrorInfo *aError, ULONG aMaskedIfs,
175 const Utf8Str &aCaptureFilename);
176 HRESULT i_onUSBDeviceDetach(IN_BSTR aId, IVirtualBoxErrorInfo *aError);
177 HRESULT i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup);
178 HRESULT i_onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent);
179 HRESULT i_onExtraDataChange(IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTR aVal);
180
181 HRESULT i_getGuestProperty(const Utf8Str &aName, Utf8Str *aValue, LONG64 *aTimestamp, Utf8Str *aFlags);
182 HRESULT i_setGuestProperty(const Utf8Str &aName, const Utf8Str &aValue, const Utf8Str &aFlags);
183 HRESULT i_deleteGuestProperty(const Utf8Str &aName);
184 HRESULT i_enumerateGuestProperties(const Utf8Str &aPatterns,
185 std::vector<Utf8Str> &aNames,
186 std::vector<Utf8Str> &aValues,
187 std::vector<LONG64> &aTimestamps,
188 std::vector<Utf8Str> &aFlags);
189 HRESULT i_onlineMergeMedium(IMediumAttachment *aMediumAttachment,
190 ULONG aSourceIdx, ULONG aTargetIdx,
191 IProgress *aProgress);
192 HRESULT i_reconfigureMediumAttachments(const std::vector<ComPtr<IMediumAttachment> > &aAttachments);
193 int i_hgcmLoadService(const char *pszServiceLibrary, const char *pszServiceName);
194 VMMDev *i_getVMMDev() { return m_pVMMDev; }
195#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
196 AudioVRDE *i_getAudioVRDE() { return mAudioVRDE; }
197#else
198 AudioSniffer *i_getAudioSniffer() { return mAudioSniffer; }
199#endif
200
201#ifdef VBOX_WITH_EXTPACK
202 ExtPackManager *i_getExtPackManager();
203#endif
204 EventSource *i_getEventSource() { return mEventSource; }
205#ifdef VBOX_WITH_USB_CARDREADER
206 UsbCardReader *i_getUsbCardReader() { return mUsbCardReader; }
207#endif
208
209 int i_VRDPClientLogon(uint32_t u32ClientId, const char *pszUser, const char *pszPassword, const char *pszDomain);
210 void i_VRDPClientStatusChange(uint32_t u32ClientId, const char *pszStatus);
211 void i_VRDPClientConnect(uint32_t u32ClientId);
212 void i_VRDPClientDisconnect(uint32_t u32ClientId, uint32_t fu32Intercepted);
213 void i_VRDPInterceptAudio(uint32_t u32ClientId);
214 void i_VRDPInterceptUSB(uint32_t u32ClientId, void **ppvIntercept);
215 void i_VRDPInterceptClipboard(uint32_t u32ClientId);
216
217 void i_processRemoteUSBDevices(uint32_t u32ClientId, VRDEUSBDEVICEDESC *pDevList, uint32_t cbDevList, bool fDescExt);
218 void i_reportVmStatistics(ULONG aValidStats, ULONG aCpuUser,
219 ULONG aCpuKernel, ULONG aCpuIdle,
220 ULONG aMemTotal, ULONG aMemFree,
221 ULONG aMemBalloon, ULONG aMemShared,
222 ULONG aMemCache, ULONG aPageTotal,
223 ULONG aAllocVMM, ULONG aFreeVMM,
224 ULONG aBalloonedVMM, ULONG aSharedVMM,
225 ULONG aVmNetRx, ULONG aVmNetTx)
226 {
227 mControl->ReportVmStatistics(aValidStats, aCpuUser, aCpuKernel, aCpuIdle,
228 aMemTotal, aMemFree, aMemBalloon, aMemShared,
229 aMemCache, aPageTotal, aAllocVMM, aFreeVMM,
230 aBalloonedVMM, aSharedVMM, aVmNetRx, aVmNetTx);
231 }
232 void i_enableVMMStatistics(BOOL aEnable);
233
234 HRESULT i_pause(Reason_T aReason);
235 HRESULT i_resume(Reason_T aReason, AutoWriteLock &alock);
236 HRESULT i_saveState(Reason_T aReason, const ComPtr<IProgress> &aProgress, const Utf8Str &aStateFilePath, bool fPauseVM, bool &fLeftPaused);
237 HRESULT i_cancelSaveState();
238
239 // callback callers (partly; for some events console callbacks are notified
240 // directly from IInternalSessionControl event handlers declared above)
241 void i_onMousePointerShapeChange(bool fVisible, bool fAlpha,
242 uint32_t xHot, uint32_t yHot,
243 uint32_t width, uint32_t height,
244 const uint8_t *pu8Shape,
245 uint32_t cbShape);
246 void i_onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,
247 BOOL supportsMT, BOOL needsHostCursor);
248 void i_onStateChange(MachineState_T aMachineState);
249 void i_onAdditionsStateChange();
250 void i_onAdditionsOutdated();
251 void i_onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
252 void i_onUSBDeviceStateChange(IUSBDevice *aDevice, bool aAttached,
253 IVirtualBoxErrorInfo *aError);
254 void i_onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage);
255 HRESULT i_onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId);
256 void i_onVRDEServerInfoChange();
257 HRESULT i_sendACPIMonitorHotPlugEvent();
258
259 static const PDMDRVREG DrvStatusReg;
260
261 static HRESULT i_setErrorStatic(HRESULT aResultCode, const char *pcsz, ...);
262 HRESULT i_setInvalidMachineStateError();
263
264 static const char *i_convertControllerTypeToDev(StorageControllerType_T enmCtrlType);
265 static HRESULT i_convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun);
266 // Called from event listener
267 HRESULT i_onNATRedirectRuleChange(ULONG ulInstance, BOOL aNatRuleRemove,
268 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort);
269 HRESULT i_onNATDnsChanged();
270
271 // Mouse interface
272 VMMDevMouseInterface *i_getVMMDevMouseInterface();
273 DisplayMouseInterface *i_getDisplayMouseInterface();
274
275 EmulatedUSB *i_getEmulatedUSB(void) { return mEmulatedUSB; }
276
277 /**
278 * Sets the disk encryption keys.
279 *
280 * @returns COM status code.
281 * @þaram strCfg The config for the disks.
282 *
283 * @note: One line in the config string contains all required data for one disk.
284 * The format for one disk is some sort of comma separated value using
285 * key=value pairs.
286 * There are two keys defined at the moment:
287 * - uuid: The uuid of the base image the key is for (with or without)
288 * the curly braces.
289 * - dek: The data encryption key in base64 encoding
290 */
291 HRESULT i_setDiskEncryptionKeys(const Utf8Str &strCfg);
292
293private:
294
295 // wraped IConsole properties
296 HRESULT getMachine(ComPtr<IMachine> &aMachine);
297 HRESULT getState(MachineState_T *aState);
298 HRESULT getGuest(ComPtr<IGuest> &aGuest);
299 HRESULT getKeyboard(ComPtr<IKeyboard> &aKeyboard);
300 HRESULT getMouse(ComPtr<IMouse> &aMouse);
301 HRESULT getDisplay(ComPtr<IDisplay> &aDisplay);
302 HRESULT getDebugger(ComPtr<IMachineDebugger> &aDebugger);
303 HRESULT getUSBDevices(std::vector<ComPtr<IUSBDevice> > &aUSBDevices);
304 HRESULT getRemoteUSBDevices(std::vector<ComPtr<IHostUSBDevice> > &aRemoteUSBDevices);
305 HRESULT getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders);
306 HRESULT getVRDEServerInfo(ComPtr<IVRDEServerInfo> &aVRDEServerInfo);
307 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource);
308 HRESULT getAttachedPCIDevices(std::vector<ComPtr<IPCIDeviceAttachment> > &aAttachedPCIDevices);
309 HRESULT getUseHostClipboard(BOOL *aUseHostClipboard);
310 HRESULT setUseHostClipboard(BOOL aUseHostClipboard);
311 HRESULT getEmulatedUSB(ComPtr<IEmulatedUSB> &aEmulatedUSB);
312
313 // wraped IConsole methods
314 HRESULT powerUp(ComPtr<IProgress> &aProgress);
315 HRESULT powerUpPaused(ComPtr<IProgress> &aProgress);
316 HRESULT powerDown(ComPtr<IProgress> &aProgress);
317 HRESULT reset();
318 HRESULT pause();
319 HRESULT resume();
320 HRESULT powerButton();
321 HRESULT sleepButton();
322 HRESULT getPowerButtonHandled(BOOL *aHandled);
323 HRESULT getGuestEnteredACPIMode(BOOL *aEntered);
324 HRESULT getDeviceActivity(const std::vector<DeviceType_T> &aType,
325 std::vector<DeviceActivity_T> &aActivity);
326 HRESULT attachUSBDevice(const com::Guid &aId, const com::Utf8Str &aCaptureFilename);
327 HRESULT detachUSBDevice(const com::Guid &aId,
328 ComPtr<IUSBDevice> &aDevice);
329 HRESULT findUSBDeviceByAddress(const com::Utf8Str &aName,
330 ComPtr<IUSBDevice> &aDevice);
331 HRESULT findUSBDeviceById(const com::Guid &aId,
332 ComPtr<IUSBDevice> &aDevice);
333 HRESULT createSharedFolder(const com::Utf8Str &aName,
334 const com::Utf8Str &aHostPath,
335 BOOL aWritable,
336 BOOL aAutomount);
337 HRESULT removeSharedFolder(const com::Utf8Str &aName);
338 HRESULT teleport(const com::Utf8Str &aHostname,
339 ULONG aTcpport,
340 const com::Utf8Str &aPassword,
341 ULONG aMaxDowntime,
342 ComPtr<IProgress> &aProgress);
343 HRESULT addDiskEncryptionPassword(const com::Utf8Str &aId, const com::Utf8Str &aPassword,
344 BOOL aClearOnSuspend);
345 HRESULT addDiskEncryptionPasswords(const std::vector<com::Utf8Str> &aIds, const std::vector<com::Utf8Str> &aPasswords,
346 BOOL aClearOnSuspend);
347 HRESULT removeDiskEncryptionPassword(const com::Utf8Str &aId);
348 HRESULT clearAllDiskEncryptionPasswords();
349
350 void notifyNatDnsChange(PUVM pUVM, const char *pszDevice, ULONG ulInstanceMax);
351
352 /**
353 * Base template for AutoVMCaller and SafeVMPtr. Template arguments
354 * have the same meaning as arguments of Console::addVMCaller().
355 */
356 template <bool taQuiet = false, bool taAllowNullVM = false>
357 class AutoVMCallerBase
358 {
359 public:
360 AutoVMCallerBase(Console *aThat) : mThat(aThat), mRC(E_FAIL)
361 {
362 Assert(aThat);
363 mRC = aThat->i_addVMCaller(taQuiet, taAllowNullVM);
364 }
365 ~AutoVMCallerBase()
366 {
367 doRelease();
368 }
369 /** Decreases the number of callers before the instance is destroyed. */
370 void releaseCaller()
371 {
372 Assert(SUCCEEDED(mRC));
373 doRelease();
374 }
375 /** Restores the number of callers after by #release(). #rc() must be
376 * rechecked to ensure the operation succeeded. */
377 void addYY()
378 {
379 AssertReturnVoid(!SUCCEEDED(mRC));
380 mRC = mThat->i_addVMCaller(taQuiet, taAllowNullVM);
381 }
382 /** Returns the result of Console::addVMCaller() */
383 HRESULT rc() const { return mRC; }
384 /** Shortcut to SUCCEEDED(rc()) */
385 bool isOk() const { return SUCCEEDED(mRC); }
386 protected:
387 Console *mThat;
388 void doRelease()
389 {
390 if (SUCCEEDED(mRC))
391 {
392 mThat->i_releaseVMCaller();
393 mRC = E_FAIL;
394 }
395 }
396 private:
397 HRESULT mRC; /* Whether the caller was added. */
398 DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(AutoVMCallerBase)
399 };
400
401#if 0
402 /**
403 * Helper class that protects sections of code using the mpUVM pointer by
404 * automatically calling addVMCaller() on construction and
405 * releaseVMCaller() on destruction. Intended for Console methods dealing
406 * with mpUVM. The usage pattern is:
407 * <code>
408 * AutoVMCaller autoVMCaller(this);
409 * if (FAILED(autoVMCaller.rc())) return autoVMCaller.rc();
410 * ...
411 * VMR3ReqCall (mpUVM, ...
412 * </code>
413 *
414 * @note Temporarily locks the argument for writing.
415 *
416 * @sa SafeVMPtr, SafeVMPtrQuiet
417 * @obsolete Use SafeVMPtr
418 */
419 typedef AutoVMCallerBase<false, false> AutoVMCaller;
420#endif
421
422 /**
423 * Same as AutoVMCaller but doesn't set extended error info on failure.
424 *
425 * @note Temporarily locks the argument for writing.
426 * @obsolete Use SafeVMPtrQuiet
427 */
428 typedef AutoVMCallerBase<true, false> AutoVMCallerQuiet;
429
430 /**
431 * Same as AutoVMCaller but allows a null VM pointer (to trigger an error
432 * instead of assertion).
433 *
434 * @note Temporarily locks the argument for writing.
435 * @obsolete Use SafeVMPtr
436 */
437 typedef AutoVMCallerBase<false, true> AutoVMCallerWeak;
438
439 /**
440 * Same as AutoVMCaller but doesn't set extended error info on failure
441 * and allows a null VM pointer (to trigger an error instead of
442 * assertion).
443 *
444 * @note Temporarily locks the argument for writing.
445 * @obsolete Use SafeVMPtrQuiet
446 */
447 typedef AutoVMCallerBase<true, true> AutoVMCallerQuietWeak;
448
449 /**
450 * Base template for SafeVMPtr and SafeVMPtrQuiet.
451 */
452 template<bool taQuiet = false>
453 class SafeVMPtrBase : public AutoVMCallerBase<taQuiet, true>
454 {
455 typedef AutoVMCallerBase<taQuiet, true> Base;
456 public:
457 SafeVMPtrBase(Console *aThat) : Base(aThat), mRC(E_FAIL), mpUVM(NULL)
458 {
459 if (Base::isOk())
460 mRC = aThat->i_safeVMPtrRetainer(&mpUVM, taQuiet);
461 }
462 ~SafeVMPtrBase()
463 {
464 doRelease();
465 }
466 /** Direct PUVM access. */
467 PUVM rawUVM() const { return mpUVM; }
468 /** Release the handles. */
469 void release()
470 {
471 Assert(SUCCEEDED(mRC));
472 doRelease();
473 }
474
475 /** The combined result of Console::addVMCaller() and Console::safeVMPtrRetainer */
476 HRESULT rc() const { return Base::isOk()? mRC: Base::rc(); }
477 /** Shortcut to SUCCEEDED(rc()) */
478 bool isOk() const { return SUCCEEDED(mRC) && Base::isOk(); }
479
480 private:
481 void doRelease()
482 {
483 if (SUCCEEDED(mRC))
484 {
485 Base::mThat->i_safeVMPtrReleaser(&mpUVM);
486 mRC = E_FAIL;
487 }
488 Base::doRelease();
489 }
490 HRESULT mRC; /* Whether the VM ptr was retained. */
491 PUVM mpUVM;
492 DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(SafeVMPtrBase)
493 };
494
495public:
496
497 /*
498 * Helper class that safely manages the Console::mpUVM pointer
499 * by calling addVMCaller() on construction and releaseVMCaller() on
500 * destruction. Intended for Console children. The usage pattern is:
501 * <code>
502 * Console::SafeVMPtr ptrVM(mParent);
503 * if (!ptrVM.isOk())
504 * return ptrVM.rc();
505 * ...
506 * VMR3ReqCall(ptrVM.rawUVM(), ...
507 * ...
508 * printf("%p\n", ptrVM.rawUVM());
509 * </code>
510 *
511 * @note Temporarily locks the argument for writing.
512 *
513 * @sa SafeVMPtrQuiet, AutoVMCaller
514 */
515 typedef SafeVMPtrBase<false> SafeVMPtr;
516
517 /**
518 * A deviation of SafeVMPtr that doesn't set the error info on failure.
519 * Intended for pieces of code that don't need to return the VM access
520 * failure to the caller. The usage pattern is:
521 * <code>
522 * Console::SafeVMPtrQuiet pVM(mParent);
523 * if (pVM.rc())
524 * VMR3ReqCall(pVM, ...
525 * return S_OK;
526 * </code>
527 *
528 * @note Temporarily locks the argument for writing.
529 *
530 * @sa SafeVMPtr, AutoVMCaller
531 */
532 typedef SafeVMPtrBase<true> SafeVMPtrQuiet;
533
534 class SharedFolderData
535 {
536 public:
537 SharedFolderData()
538 { }
539
540 SharedFolderData(const Utf8Str &aHostPath,
541 bool aWritable,
542 bool aAutoMount)
543 : m_strHostPath(aHostPath),
544 m_fWritable(aWritable),
545 m_fAutoMount(aAutoMount)
546 { }
547
548 // copy constructor
549 SharedFolderData(const SharedFolderData& aThat)
550 : m_strHostPath(aThat.m_strHostPath),
551 m_fWritable(aThat.m_fWritable),
552 m_fAutoMount(aThat.m_fAutoMount)
553 { }
554
555 Utf8Str m_strHostPath;
556 bool m_fWritable;
557 bool m_fAutoMount;
558 };
559
560 /**
561 * Class for managing emulated USB MSDs.
562 */
563 class USBStorageDevice
564 {
565 public:
566 USBStorageDevice()
567 { }
568 /** The UUID associated with the USB device. */
569 RTUUID mUuid;
570 /** Port of the storage device. */
571 LONG iPort;
572 };
573
574 typedef std::map<Utf8Str, ComObjPtr<SharedFolder> > SharedFolderMap;
575 typedef std::map<Utf8Str, SharedFolderData> SharedFolderDataMap;
576 typedef std::map<Utf8Str, ComPtr<IMediumAttachment> > MediumAttachmentMap;
577 typedef std::list <USBStorageDevice> USBStorageDeviceList;
578
579private:
580
581 typedef std::list <ComObjPtr<OUSBDevice> > USBDeviceList;
582 typedef std::list <ComObjPtr<RemoteUSBDevice> > RemoteUSBDeviceList;
583
584 HRESULT i_addVMCaller(bool aQuiet = false, bool aAllowNullVM = false);
585 void i_releaseVMCaller();
586 HRESULT i_safeVMPtrRetainer(PUVM *a_ppUVM, bool aQuiet);
587 void i_safeVMPtrReleaser(PUVM *a_ppUVM);
588
589 HRESULT i_consoleInitReleaseLog(const ComPtr<IMachine> aMachine);
590
591 HRESULT i_powerUp(IProgress **aProgress, bool aPaused);
592 HRESULT i_powerDown(IProgress *aProgress = NULL);
593
594/* Note: FreeBSD needs this whether netflt is used or not. */
595#if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD))
596 HRESULT i_attachToTapInterface(INetworkAdapter *networkAdapter);
597 HRESULT i_detachFromTapInterface(INetworkAdapter *networkAdapter);
598#endif
599 HRESULT i_powerDownHostInterfaces();
600
601 HRESULT i_setMachineState(MachineState_T aMachineState, bool aUpdateServer = true);
602 HRESULT i_setMachineStateLocally(MachineState_T aMachineState)
603 {
604 return i_setMachineState(aMachineState, false /* aUpdateServer */);
605 }
606
607 HRESULT i_findSharedFolder(const Utf8Str &strName,
608 ComObjPtr<SharedFolder> &aSharedFolder,
609 bool aSetError = false);
610
611 HRESULT i_fetchSharedFolders(BOOL aGlobal);
612 bool i_findOtherSharedFolder(const Utf8Str &straName,
613 SharedFolderDataMap::const_iterator &aIt);
614
615 HRESULT i_createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData);
616 HRESULT i_removeSharedFolder(const Utf8Str &strName);
617
618 HRESULT i_suspendBeforeConfigChange(PUVM pUVM, AutoWriteLock *pAlock, bool *pfResume);
619 void i_resumeAfterConfigChange(PUVM pUVM);
620
621 static DECLCALLBACK(int) i_configConstructor(PUVM pUVM, PVM pVM, void *pvConsole);
622 int i_configConstructorInner(PUVM pUVM, PVM pVM, AutoWriteLock *pAlock);
623 int i_configCfgmOverlay(PCFGMNODE pRoot, IVirtualBox *pVirtualBox, IMachine *pMachine);
624 int i_configDumpAPISettingsTweaks(IVirtualBox *pVirtualBox, IMachine *pMachine);
625
626 int i_configGraphicsController(PCFGMNODE pDevices,
627 const GraphicsControllerType_T graphicsController,
628 BusAssignmentManager *pBusMgr,
629 const ComPtr<IMachine> &ptrMachine,
630 const ComPtr<IBIOSSettings> &ptrBiosSettings,
631 bool fHMEnabled);
632 int i_configMediumAttachment(const char *pcszDevice,
633 unsigned uInstance,
634 StorageBus_T enmBus,
635 bool fUseHostIOCache,
636 bool fBuiltinIoCache,
637 bool fSetupMerge,
638 unsigned uMergeSource,
639 unsigned uMergeTarget,
640 IMediumAttachment *pMediumAtt,
641 MachineState_T aMachineState,
642 HRESULT *phrc,
643 bool fAttachDetach,
644 bool fForceUnmount,
645 bool fHotplug,
646 PUVM pUVM,
647 DeviceType_T *paLedDevType,
648 PCFGMNODE *ppLunL0);
649 int i_configMedium(PCFGMNODE pLunL0,
650 bool fPassthrough,
651 DeviceType_T enmType,
652 bool fUseHostIOCache,
653 bool fBuiltinIoCache,
654 bool fSetupMerge,
655 unsigned uMergeSource,
656 unsigned uMergeTarget,
657 const char *pcszBwGroup,
658 bool fDiscard,
659 IMedium *pMedium,
660 MachineState_T aMachineState,
661 HRESULT *phrc);
662 int i_configMediumProperties(PCFGMNODE pCur, IMedium *pMedium, bool *pfHostIP, bool *pfEncrypted);
663 static DECLCALLBACK(int) i_reconfigureMediumAttachment(Console *pThis,
664 PUVM pUVM,
665 const char *pcszDevice,
666 unsigned uInstance,
667 StorageBus_T enmBus,
668 bool fUseHostIOCache,
669 bool fBuiltinIoCache,
670 bool fSetupMerge,
671 unsigned uMergeSource,
672 unsigned uMergeTarget,
673 IMediumAttachment *aMediumAtt,
674 MachineState_T aMachineState,
675 HRESULT *phrc);
676 static DECLCALLBACK(int) i_changeRemovableMedium(Console *pThis,
677 PUVM pUVM,
678 const char *pcszDevice,
679 unsigned uInstance,
680 StorageBus_T enmBus,
681 bool fUseHostIOCache,
682 IMediumAttachment *aMediumAtt,
683 bool fForce);
684
685 HRESULT i_attachRawPCIDevices(PUVM pUVM, BusAssignmentManager *BusMgr, PCFGMNODE pDevices);
686 void i_attachStatusDriver(PCFGMNODE pCtlInst, PPDMLED *papLeds,
687 uint64_t uFirst, uint64_t uLast,
688 Console::MediumAttachmentMap *pmapMediumAttachments,
689 const char *pcszDevice, unsigned uInstance);
690
691 int i_configNetwork(const char *pszDevice, unsigned uInstance, unsigned uLun,
692 INetworkAdapter *aNetworkAdapter, PCFGMNODE pCfg,
693 PCFGMNODE pLunL0, PCFGMNODE pInst,
694 bool fAttachDetach, bool fIgnoreConnectFailure);
695
696 static DECLCALLBACK(int) i_configGuestProperties(void *pvConsole, PUVM pUVM);
697 static DECLCALLBACK(int) i_configGuestControl(void *pvConsole);
698 static DECLCALLBACK(void) i_vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser);
699 static DECLCALLBACK(int) i_unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu);
700 static DECLCALLBACK(int) i_plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu);
701 HRESULT i_doMediumChange(IMediumAttachment *aMediumAttachment, bool fForce, PUVM pUVM);
702 HRESULT i_doCPURemove(ULONG aCpu, PUVM pUVM);
703 HRESULT i_doCPUAdd(ULONG aCpu, PUVM pUVM);
704
705 HRESULT i_doNetworkAdapterChange(PUVM pUVM, const char *pszDevice, unsigned uInstance,
706 unsigned uLun, INetworkAdapter *aNetworkAdapter);
707 static DECLCALLBACK(int) i_changeNetworkAttachment(Console *pThis, PUVM pUVM, const char *pszDevice,
708 unsigned uInstance, unsigned uLun,
709 INetworkAdapter *aNetworkAdapter);
710
711 void i_changeClipboardMode(ClipboardMode_T aClipboardMode);
712 int i_changeDnDMode(DnDMode_T aDnDMode);
713
714#ifdef VBOX_WITH_USB
715 HRESULT i_attachUSBDevice(IUSBDevice *aHostDevice, ULONG aMaskedIfs, const Utf8Str &aCaptureFilename);
716 HRESULT i_detachUSBDevice(const ComObjPtr<OUSBDevice> &aHostDevice);
717
718 static DECLCALLBACK(int) i_usbAttachCallback(Console *that, PUVM pUVM, IUSBDevice *aHostDevice, PCRTUUID aUuid,
719 bool aRemote, const char *aAddress, void *pvRemoteBackend,
720 USHORT aPortVersion, ULONG aMaskedIfs, const char *pszCaptureFilename);
721 static DECLCALLBACK(int) i_usbDetachCallback(Console *that, PUVM pUVM, PCRTUUID aUuid);
722#endif
723
724 static DECLCALLBACK(int) i_attachStorageDevice(Console *pThis,
725 PUVM pUVM,
726 const char *pcszDevice,
727 unsigned uInstance,
728 StorageBus_T enmBus,
729 bool fUseHostIOCache,
730 IMediumAttachment *aMediumAtt,
731 bool fSilent);
732 static DECLCALLBACK(int) i_detachStorageDevice(Console *pThis,
733 PUVM pUVM,
734 const char *pcszDevice,
735 unsigned uInstance,
736 StorageBus_T enmBus,
737 IMediumAttachment *aMediumAtt,
738 bool fSilent);
739 HRESULT i_doStorageDeviceAttach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent);
740 HRESULT i_doStorageDeviceDetach(IMediumAttachment *aMediumAttachment, PUVM pUVM, bool fSilent);
741
742 static DECLCALLBACK(int) i_stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser);
743
744 static DECLCALLBACK(void) i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL,
745 const char *pszErrorFmt, va_list va);
746
747 void i_setVMRuntimeErrorCallbackF(uint32_t fFatal, const char *pszErrorId, const char *pszFormat, ...);
748 static DECLCALLBACK(void) i_setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFatal,
749 const char *pszErrorId, const char *pszFormat, va_list va);
750
751 HRESULT i_captureUSBDevices(PUVM pUVM);
752 void i_detachAllUSBDevices(bool aDone);
753
754 static DECLCALLBACK(int) i_powerUpThread(RTTHREAD Thread, void *pvUser);
755 static DECLCALLBACK(int) i_powerDownThread(RTTHREAD Thread, void *pvUser);
756
757 static DECLCALLBACK(int) i_vmm2User_SaveState(PCVMM2USERMETHODS pThis, PUVM pUVM);
758 static DECLCALLBACK(void) i_vmm2User_NotifyEmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu);
759 static DECLCALLBACK(void) i_vmm2User_NotifyEmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu);
760 static DECLCALLBACK(void) i_vmm2User_NotifyPdmtInit(PCVMM2USERMETHODS pThis, PUVM pUVM);
761 static DECLCALLBACK(void) i_vmm2User_NotifyPdmtTerm(PCVMM2USERMETHODS pThis, PUVM pUVM);
762 static DECLCALLBACK(void) i_vmm2User_NotifyResetTurnedIntoPowerOff(PCVMM2USERMETHODS pThis, PUVM pUVM);
763
764 static DECLCALLBACK(void *) i_drvStatus_QueryInterface(PPDMIBASE pInterface, const char *pszIID);
765 static DECLCALLBACK(void) i_drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN);
766 static DECLCALLBACK(int) i_drvStatus_MediumEjected(PPDMIMEDIANOTIFY pInterface, unsigned iLUN);
767 static DECLCALLBACK(void) i_drvStatus_Destruct(PPDMDRVINS pDrvIns);
768 static DECLCALLBACK(int) i_drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
769
770 static DECLCALLBACK(int) i_pdmIfSecKey_KeyRetain(PPDMISECKEY pInterface, const char *pszId, const uint8_t **ppbKey,
771 size_t *pcbKey);
772 static DECLCALLBACK(int) i_pdmIfSecKey_KeyRelease(PPDMISECKEY pInterface, const char *pszId);
773 static DECLCALLBACK(int) i_pdmIfSecKey_PasswordRetain(PPDMISECKEY pInterface, const char *pszId, const char **ppszPassword);
774 static DECLCALLBACK(int) i_pdmIfSecKey_PasswordRelease(PPDMISECKEY pInterface, const char *pszId);
775
776 static DECLCALLBACK(int) i_pdmIfSecKeyHlp_KeyMissingNotify(PPDMISECKEYHLP pInterface);
777
778 int mcAudioRefs;
779 volatile uint32_t mcVRDPClients;
780 uint32_t mu32SingleRDPClientId; /* The id of a connected client in the single connection mode. */
781 volatile bool mcGuestCredentialsProvided;
782
783 static const char *sSSMConsoleUnit;
784 static uint32_t sSSMConsoleVer;
785
786 HRESULT i_loadDataFromSavedState();
787 int i_loadStateFileExecInternal(PSSMHANDLE pSSM, uint32_t u32Version);
788
789 static DECLCALLBACK(void) i_saveStateFileExec(PSSMHANDLE pSSM, void *pvUser);
790 static DECLCALLBACK(int) i_loadStateFileExec(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
791
792#ifdef VBOX_WITH_GUEST_PROPS
793 static DECLCALLBACK(int) i_doGuestPropNotification(void *pvExtension, uint32_t, void *pvParms, uint32_t cbParms);
794 HRESULT i_doEnumerateGuestProperties(const Utf8Str &aPatterns,
795 std::vector<Utf8Str> &aNames,
796 std::vector<Utf8Str> &aValues,
797 std::vector<LONG64> &aTimestamps,
798 std::vector<Utf8Str> &aFlags);
799
800 void i_guestPropertiesHandleVMReset(void);
801 bool i_guestPropertiesVRDPEnabled(void);
802 void i_guestPropertiesVRDPUpdateLogon(uint32_t u32ClientId, const char *pszUser, const char *pszDomain);
803 void i_guestPropertiesVRDPUpdateActiveClient(uint32_t u32ClientId);
804 void i_guestPropertiesVRDPUpdateClientAttach(uint32_t u32ClientId, bool fAttached);
805 void i_guestPropertiesVRDPUpdateNameChange(uint32_t u32ClientId, const char *pszName);
806 void i_guestPropertiesVRDPUpdateIPAddrChange(uint32_t u32ClientId, const char *pszIPAddr);
807 void i_guestPropertiesVRDPUpdateLocationChange(uint32_t u32ClientId, const char *pszLocation);
808 void i_guestPropertiesVRDPUpdateOtherInfoChange(uint32_t u32ClientId, const char *pszOtherInfo);
809 void i_guestPropertiesVRDPUpdateDisconnect(uint32_t u32ClientId);
810#endif
811
812 bool i_isResetTurnedIntoPowerOff(void);
813
814 /** @name Disk encryption support
815 * @{ */
816 HRESULT i_consoleParseDiskEncryption(const char *psz, const char **ppszEnd);
817 HRESULT i_configureEncryptionForDisk(const Utf8Str &strId, unsigned *pcDisksConfigured);
818 HRESULT i_clearDiskEncryptionKeysOnAllAttachmentsWithKeyId(const Utf8Str &strId);
819 HRESULT i_initSecretKeyIfOnAllAttachments(void);
820 int i_consoleParseKeyValue(const char *psz, const char **ppszEnd,
821 char **ppszKey, char **ppszVal);
822 void i_removeSecretKeysOnSuspend();
823 /** @} */
824
825 /** @name Teleporter support
826 * @{ */
827 static DECLCALLBACK(int) i_teleporterSrcThreadWrapper(RTTHREAD hThread, void *pvUser);
828 HRESULT i_teleporterSrc(TeleporterStateSrc *pState);
829 HRESULT i_teleporterSrcReadACK(TeleporterStateSrc *pState, const char *pszWhich, const char *pszNAckMsg = NULL);
830 HRESULT i_teleporterSrcSubmitCommand(TeleporterStateSrc *pState, const char *pszCommand, bool fWaitForAck = true);
831 HRESULT i_teleporterTrg(PUVM pUVM, IMachine *pMachine, Utf8Str *pErrorMsg, bool fStartPaused,
832 Progress *pProgress, bool *pfPowerOffOnFailure);
833 static DECLCALLBACK(int) i_teleporterTrgServeConnection(RTSOCKET Sock, void *pvUser);
834 /** @} */
835
836 bool mSavedStateDataLoaded : 1;
837
838 const ComPtr<IMachine> mMachine;
839 const ComPtr<IInternalMachineControl> mControl;
840
841 const ComPtr<IVRDEServer> mVRDEServer;
842
843 ConsoleVRDPServer * const mConsoleVRDPServer;
844 bool mfVRDEChangeInProcess;
845 bool mfVRDEChangePending;
846
847 const ComObjPtr<Guest> mGuest;
848 const ComObjPtr<Keyboard> mKeyboard;
849 const ComObjPtr<Mouse> mMouse;
850 const ComObjPtr<Display> mDisplay;
851 const ComObjPtr<MachineDebugger> mDebugger;
852 const ComObjPtr<VRDEServerInfo> mVRDEServerInfo;
853 /** This can safely be used without holding any locks.
854 * An AutoCaller suffices to prevent it being destroy while in use and
855 * internally there is a lock providing the necessary serialization. */
856 const ComObjPtr<EventSource> mEventSource;
857#ifdef VBOX_WITH_EXTPACK
858 const ComObjPtr<ExtPackManager> mptrExtPackManager;
859#endif
860 const ComObjPtr<EmulatedUSB> mEmulatedUSB;
861
862 USBDeviceList mUSBDevices;
863 RemoteUSBDeviceList mRemoteUSBDevices;
864
865 SharedFolderDataMap m_mapGlobalSharedFolders;
866 SharedFolderDataMap m_mapMachineSharedFolders;
867 SharedFolderMap m_mapSharedFolders; // the console instances
868
869 /** The user mode VM handle. */
870 PUVM mpUVM;
871 /** Holds the number of "readonly" mpUVM callers (users). */
872 uint32_t mVMCallers;
873 /** Semaphore posted when the number of mpUVM callers drops to zero. */
874 RTSEMEVENT mVMZeroCallersSem;
875 /** true when Console has entered the mpUVM destruction phase. */
876 bool mVMDestroying : 1;
877 /** true when power down is initiated by vmstateChangeCallback (EMT). */
878 bool mVMPoweredOff : 1;
879 /** true when vmstateChangeCallback shouldn't initiate a power down. */
880 bool mVMIsAlreadyPoweringOff : 1;
881 /** true if we already showed the snapshot folder size warning. */
882 bool mfSnapshotFolderSizeWarningShown : 1;
883 /** true if we already showed the snapshot folder ext4/xfs bug warning. */
884 bool mfSnapshotFolderExt4WarningShown : 1;
885 /** true if we already listed the disk type of the snapshot folder. */
886 bool mfSnapshotFolderDiskTypeShown : 1;
887 /** true if a USB controller is available (i.e. USB devices can be attached). */
888 bool mfVMHasUsbController : 1;
889 /** true if the VM power off was caused by reset. */
890 bool mfPowerOffCausedByReset : 1;
891
892 /** Pointer to the VMM -> User (that's us) callbacks. */
893 struct MYVMM2USERMETHODS : public VMM2USERMETHODS
894 {
895 Console *pConsole;
896 } *mpVmm2UserMethods;
897
898 /** The current network attachment type in the VM.
899 * This doesn't have to match the network attachment type maintained in the
900 * NetworkAdapter. This is needed to change the network attachment
901 * dynamically.
902 */
903 typedef std::vector<NetworkAttachmentType_T> NetworkAttachmentTypeVector;
904 NetworkAttachmentTypeVector meAttachmentType;
905
906 VMMDev * m_pVMMDev;
907#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
908 AudioVRDE * const mAudioVRDE;
909#else
910 AudioSniffer * const mAudioSniffer;
911#endif
912 Nvram * const mNvram;
913#ifdef VBOX_WITH_USB_CARDREADER
914 UsbCardReader * const mUsbCardReader;
915#endif
916 BusAssignmentManager* mBusMgr;
917
918 enum
919 {
920 iLedFloppy = 0,
921 cLedFloppy = 2,
922 iLedIde = iLedFloppy + cLedFloppy,
923 cLedIde = 4,
924 iLedSata = iLedIde + cLedIde,
925 cLedSata = 30,
926 iLedScsi = iLedSata + cLedSata,
927 cLedScsi = 16,
928 iLedSas = iLedScsi + cLedScsi,
929 cLedSas = 8,
930 iLedUsb = iLedSas + cLedSas,
931 cLedUsb = 8,
932 cLedStorage = cLedFloppy + cLedIde + cLedSata + cLedScsi + cLedSas + cLedUsb
933 };
934 DeviceType_T maStorageDevType[cLedStorage];
935 PPDMLED mapStorageLeds[cLedStorage];
936 PPDMLED mapNetworkLeds[36]; /**< @todo adapt this to the maximum network card count */
937 PPDMLED mapSharedFolderLed;
938 PPDMLED mapUSBLed[2];
939 PPDMLED mapCrOglLed;
940
941 MediumAttachmentMap mapMediumAttachments;
942
943 /** List of attached USB storage devices. */
944 USBStorageDeviceList mUSBStorageDevices;
945
946 /** Store for secret keys. */
947 SecretKeyStore * const m_pKeyStore;
948 /** Number of disks configured for encryption. */
949 unsigned m_cDisksEncrypted;
950 /** Number of disks which have the key in the map. */
951 unsigned m_cDisksPwProvided;
952
953 /** Pointer to the key consumer -> provider (that's us) callbacks. */
954 struct MYPDMISECKEY : public PDMISECKEY
955 {
956 Console *pConsole;
957 } *mpIfSecKey;
958
959 /** Pointer to the key helpers -> provider (that's us) callbacks. */
960 struct MYPDMISECKEYHLP : public PDMISECKEYHLP
961 {
962 Console *pConsole;
963 } *mpIfSecKeyHlp;
964
965/* Note: FreeBSD needs this whether netflt is used or not. */
966#if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD))
967 Utf8Str maTAPDeviceName[8];
968 RTFILE maTapFD[8];
969#endif
970
971 bool mVMStateChangeCallbackDisabled;
972
973 bool mfUseHostClipboard;
974
975 /** Local machine state value. */
976 MachineState_T mMachineState;
977
978 /** Machine uuid string. */
979 Bstr mstrUuid;
980
981 /** Pointer to the progress object of a live cancelable task.
982 *
983 * This is currently only used by Console::Teleport(), but is intended to later
984 * be used by the live snapshot code path as well. Actions like
985 * Console::PowerDown, which automatically cancels out the running snapshot /
986 * teleportation operation, will cancel the teleportation / live snapshot
987 * operation before starting. */
988 ComPtr<IProgress> mptrCancelableProgress;
989
990 ComPtr<IEventListener> mVmListener;
991
992 friend struct VMTask;
993};
994
995#endif // !____H_CONSOLEIMPL
996/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette