VirtualBox

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

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

Main: Fixes for disk encryption, delete the key again if configuring disk encryption fails. Correctly set disk properties for all media and not just the first one

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

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