VBoxManageModifyVM.cpp revision 8c58249d7f93d82395aa6c8b31526443892bc375
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * VBoxManage - Implementation of modifyvm command.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Copyright (C) 2006-2009 Oracle Corporation
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * available from http://www.virtualbox.org. This file is free software;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * you can redistribute it and/or modify it under the terms of the GNU
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * General Public License (GPL) as published by the Free Software
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/*******************************************************************************
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync* Header Files *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync*******************************************************************************/
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync#endif /* !VBOX_ONLY_DOCS */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncusing namespace com;
7d6ce198fd361f58bd1ebdeee7772f76b4e58966vboxsync/** @todo refine this after HDD changes; MSC 8.0/64 has trouble with handleModifyVM. */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--ostype", MODIFYVM_OSTYPE, RTGETOPT_REQ_STRING },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--memory", MODIFYVM_MEMORY, RTGETOPT_REQ_UINT32 },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--firmware", MODIFYVM_FIRMWARE, RTGETOPT_REQ_STRING },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--acpi", MODIFYVM_ACPI, RTGETOPT_REQ_BOOL_ONOFF },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--ioapic", MODIFYVM_IOAPIC, RTGETOPT_REQ_BOOL_ONOFF },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--pae", MODIFYVM_PAE, RTGETOPT_REQ_BOOL_ONOFF },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--synthcpu", MODIFYVM_SYNTHCPU, RTGETOPT_REQ_BOOL_ONOFF },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--hwvirtex", MODIFYVM_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF },
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync { "--hwvirtexexcl", MODIFYVM_HWVIRTEXEXCLUSIVE, RTGETOPT_REQ_BOOL_ONOFF },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--nestedpaging", MODIFYVM_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--largepages", MODIFYVM_LARGEPAGES, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vtxvpid", MODIFYVM_VTXVPID, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--cpuidset", MODIFYVM_SETCPUID, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX},
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--cpuidremove", MODIFYVM_DELCPUID, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX},
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--cpuidremoveall", MODIFYVM_DELALLCPUID, RTGETOPT_REQ_NOTHING},
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--cpuhotplug", MODIFYVM_CPUHOTPLUG, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--plugcpu", MODIFYVM_PLUGCPU, RTGETOPT_REQ_UINT32 },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--unplugcpu", MODIFYVM_UNPLUGCPU, RTGETOPT_REQ_UINT32 },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--rtcuseutc", MODIFYVM_RTCUSEUTC, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--monitorcount", MODIFYVM_MONITORCOUNT, RTGETOPT_REQ_UINT32 },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--accelerate3d", MODIFYVM_ACCELERATE3D, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--accelerate2dvideo", MODIFYVM_ACCELERATE2DVIDEO, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--bioslogofadein", MODIFYVM_BIOSLOGOFADEIN, RTGETOPT_REQ_BOOL_ONOFF },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--bioslogofadeout", MODIFYVM_BIOSLOGOFADEOUT, RTGETOPT_REQ_BOOL_ONOFF },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--bioslogodisplaytime", MODIFYVM_BIOSLOGODISPLAYTIME, RTGETOPT_REQ_UINT32 },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--bioslogoimagepath", MODIFYVM_BIOSLOGOIMAGEPATH, RTGETOPT_REQ_STRING },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--biosbootmenu", MODIFYVM_BIOSBOOTMENU, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--biossystemtimeoffset", MODIFYVM_BIOSSYSTEMTIMEOFFSET, RTGETOPT_REQ_INT64 },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--biospxedebug", MODIFYVM_BIOSPXEDEBUG, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--boot", MODIFYVM_BOOT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--idecontroller", MODIFYVM_IDECONTROLLER, RTGETOPT_REQ_STRING },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--sataideemulation", MODIFYVM_SATAIDEEMULATION, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--sataportcount", MODIFYVM_SATAPORTCOUNT, RTGETOPT_REQ_UINT32 },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--sataport", MODIFYVM_SATAPORT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--scsiport", MODIFYVM_SCSIPORT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
88d7b87c38cc3800f532139696785e8c96bfd531vboxsync { "--scsitype", MODIFYVM_SCSITYPE, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--dvdpassthrough", MODIFYVM_DVDPASSTHROUGH, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--floppy", MODIFYVM_FLOPPY, RTGETOPT_REQ_STRING },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--nictracefile", MODIFYVM_NICTRACEFILE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--nictrace", MODIFYVM_NICTRACE, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--nictype", MODIFYVM_NICTYPE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--nicspeed", MODIFYVM_NICSPEED, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--nicbootprio", MODIFYVM_NICBOOTPRIO, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--nic", MODIFYVM_NIC, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--cableconnected", MODIFYVM_CABLECONNECTED, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--bridgeadapter", MODIFYVM_BRIDGEADAPTER, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--hostonlyadapter", MODIFYVM_HOSTONLYADAPTER, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--intnet", MODIFYVM_INTNET, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natnet", MODIFYVM_NATNET, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vdenet", MODIFYVM_VDENET, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natbindip", MODIFYVM_NATBINDIP, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natsettings", MODIFYVM_NATSETTINGS, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natpf", MODIFYVM_NATPF, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--nataliasmode", MODIFYVM_NATALIASMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--nattftpprefix", MODIFYVM_NATTFTPPREFIX, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--nattftpfile", MODIFYVM_NATTFTPFILE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--nattftpserver", MODIFYVM_NATTFTPSERVER, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natdnspassdomain", MODIFYVM_NATDNSPASSDOMAIN, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natdnsproxy", MODIFYVM_NATDNSPROXY, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--natdnshostresolver", MODIFYVM_NATDNSHOSTRESOLVER, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--macaddress", MODIFYVM_MACADDRESS, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--mouse", MODIFYVM_HIDPTR, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--keyboard", MODIFYVM_HIDKBD, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--uartmode", MODIFYVM_UARTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--uart", MODIFYVM_UART, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--guestmemoryballoon", MODIFYVM_GUESTMEMORYBALLOON, RTGETOPT_REQ_UINT32 },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--audiocontroller", MODIFYVM_AUDIOCONTROLLER, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--audio", MODIFYVM_AUDIO, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--clipboard", MODIFYVM_CLIPBOARD, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vrdpport", MODIFYVM_VRDPPORT, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vrdpaddress", MODIFYVM_VRDPADDRESS, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vrdpauthtype", MODIFYVM_VRDPAUTHTYPE, RTGETOPT_REQ_STRING },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vrdpmulticon", MODIFYVM_VRDPMULTICON, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vrdpreusecon", MODIFYVM_VRDPREUSECON, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--vrdpvideochannel", MODIFYVM_VRDPVIDEOCHANNEL, RTGETOPT_REQ_BOOL_ONOFF },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--vrdpvideochannelquality", MODIFYVM_VRDPVIDEOCHANNELQUALITY, RTGETOPT_REQ_UINT32 },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--vrdp", MODIFYVM_VRDP, RTGETOPT_REQ_BOOL_ONOFF },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--usbehci", MODIFYVM_USBEHCI, RTGETOPT_REQ_BOOL_ONOFF },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--usb", MODIFYVM_USB, RTGETOPT_REQ_BOOL_ONOFF },
f20463d06f9bf3f81e2c049c697dcd20a0b0c435vboxsync { "--snapshotfolder", MODIFYVM_SNAPSHOTFOLDER, RTGETOPT_REQ_STRING },
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync { "--teleporter", MODIFYVM_TELEPORTER_ENABLED, RTGETOPT_REQ_BOOL_ONOFF },
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync { "--teleporterenabled", MODIFYVM_TELEPORTER_ENABLED, RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync { "--teleporterport", MODIFYVM_TELEPORTER_PORT, RTGETOPT_REQ_UINT32 },
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync { "--teleporteraddress", MODIFYVM_TELEPORTER_ADDRESS, RTGETOPT_REQ_STRING },
0c2ffca957882f38c677fc23f324cfd695b96947vboxsync { "--teleporterpassword", MODIFYVM_TELEPORTER_PASSWORD, RTGETOPT_REQ_STRING },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--hardwareuuid", MODIFYVM_HARDWARE_UUID, RTGETOPT_REQ_STRING },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--hpet", MODIFYVM_HPET, RTGETOPT_REQ_BOOL_ONOFF },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--iomgr", MODIFYVM_IOMGR, RTGETOPT_REQ_STRING },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--iobackend", MODIFYVM_IOBACKEND, RTGETOPT_REQ_STRING },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--iocache", MODIFYVM_IOCACHE, RTGETOPT_REQ_BOOL_ONOFF },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--iocachesize", MODIFYVM_IOCACHESIZE, RTGETOPT_REQ_UINT32 },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync { "--iobandwidthmax", MODIFYVM_IOBANDWIDTHMAX, RTGETOPT_REQ_UINT32 },
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* VM ID + at least one parameter. Parameter arguments are checked
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * individually. */
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync return errorSyntax(USAGE_MODIFYVM, "Not enough parameters");
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync /* Get the number of network adapters */
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync CHECK_ERROR_RET(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()), 1);
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync CHECK_ERROR_RET(info, COMGETTER(NetworkAdapterCount)(&NetworkAdapterCount), 1);
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR_RET(a->virtualBox, COMGETTER(SystemProperties)(info.asOutParam()), 1);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR_RET(info, COMGETTER(SerialPortCount)(&SerialPortCount), 1);
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync /* try to find the given machine */
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR_RET(a->virtualBox, GetMachine(machineuuid, machine.asOutParam()), 1);
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync CHECK_ERROR_RET(a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()), 1);
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync /* open a session for the VM */
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR_RET(a->virtualBox, OpenSession(a->session, machineuuid), 1);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* get the mutable session machine */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync a->session->COMGETTER(Machine)(machine.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(BIOSSettings)(biosSettings.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync RTGetOptInit(&GetOptState, a->argc, a->argv, g_aModifyVMOptions,
8302394f164acb4adb187954f6ac8ef7a9efa629vboxsync RT_ELEMENTS(g_aModifyVMOptions), 1, RTGETOPTINIT_FLAGS_NO_STD_OPTS);
beed5fc4d17b85d6d05516ae63e6308af82ad96fvboxsync CHECK_ERROR(machine, COMSETTER(Name)(Bstr(ValueUnion.psz)));
beed5fc4d17b85d6d05516ae63e6308af82ad96fvboxsync CHECK_ERROR(a->virtualBox, GetGuestOSType(Bstr(ValueUnion.psz), guestOSType.asOutParam()));
100b161379af7255c69e27587cc746e5f76ff050vboxsync CHECK_ERROR(machine, COMSETTER(OSTypeId)(Bstr(ValueUnion.psz)));
1f64240a0fda7b4c7cc9fcd4ef610f26623485b8vboxsync errorArgument("Invalid guest OS type '%s'", Utf8Str(ValueUnion.psz).raw());
1f64240a0fda7b4c7cc9fcd4ef610f26623485b8vboxsync CHECK_ERROR(machine, COMSETTER(MemorySize)(ValueUnion.u32));
1f64240a0fda7b4c7cc9fcd4ef610f26623485b8vboxsync CHECK_ERROR(machine, COMSETTER(VRAMSize)(ValueUnion.u32));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI));
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI32));
f81115e612ee8fa2bc082db9d4c8879e33babc5avboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI64));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFIDUAL));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_BIOS));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync errorArgument("Invalid --firmware argument '%s'", ValueUnion.psz);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(biosSettings, COMSETTER(ACPIEnabled)(ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_PAE, ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_Synthetic, ValueUnion.f));
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, ValueUnion.f));
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, ValueUnion.f));
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync for (unsigned i = 0 ; i < 4 ; i++)
4db69c2a1302fa56bc5dd7181377b9f47cfd875evboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "Missing or Invalid argument to '%s'",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetCPUIDLeaf(id, aValue[0], aValue[1], aValue[2], aValue[3]));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, RemoveCPUIDLeaf(ValueUnion.u32));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_LargePages, ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(CPUCount)(ValueUnion.u32));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(RTCUseUTC)(ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(CPUHotPlugEnabled)(ValueUnion.f));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, HotUnplugCPU(ValueUnion.u32));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(MonitorCount)(ValueUnion.u32));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, COMSETTER(Accelerate3DEnabled)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, COMSETTER(Accelerate2DVideoEnabled)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoFadeIn)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoFadeOut)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoDisplayTime)(ValueUnion.u32));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoImagePath)(Bstr(ValueUnion.psz)));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_Disabled));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MenuOnly));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync else if (!strcmp(ValueUnion.psz, "messageandmenu"))
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MessageAndMenu));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync errorArgument("Invalid --biosbootmenu argument '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(TimeOffset)(ValueUnion.i64));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(biosSettings, COMSETTER(PXEDebugEnabled)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Null));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Floppy));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_DVD));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_HardDisk));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Network));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync return errorArgument("Invalid boot device '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->DetachDevice(Bstr("IDE Controller"), 0, 0);
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync /* first guess is that it's a UUID */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* not successful? Then it must be a filename */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = a->virtualBox->FindHardDisk(Bstr(ValueUnion.psz), hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* open the new hard disk object */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, AttachDevice(Bstr("IDE Controller"), 0, 0, DeviceType_HardDisk, uuid));
e17f6f8a70a7709a9a6319d9a473596fb600b552vboxsync machine->DetachDevice(Bstr("IDE Controller"), 0, 1);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* first guess is that it's a UUID */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* not successful? Then it must be a filename */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync rc = a->virtualBox->FindHardDisk(Bstr(ValueUnion.psz), hardDisk.asOutParam());
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* open the new hard disk object */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(machine, AttachDevice(Bstr("IDE Controller"), 0, 1, DeviceType_HardDisk, uuid));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync machine->DetachDevice(Bstr("IDE Controller"), 1, 1);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* first guess is that it's a UUID */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* not successful? Then it must be a filename */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync rc = a->virtualBox->FindHardDisk(Bstr(ValueUnion.psz), hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* open the new hard disk object */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, AttachDevice(Bstr("IDE Controller"), 1, 1, DeviceType_HardDisk, uuid));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, GetStorageControllerByName(Bstr("IDE Controller"),
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(storageController, COMSETTER(ControllerType)(StorageControllerType_PIIX3));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(storageController, COMSETTER(ControllerType)(StorageControllerType_PIIX4));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(storageController, COMSETTER(ControllerType)(StorageControllerType_ICH6));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync errorArgument("Invalid --idecontroller argument '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, GetStorageControllerByName(Bstr("SATA"), SataCtl.asOutParam()));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(SataCtl, SetIDEEmulationPort(GetOptState.uIndex, ValueUnion.u32));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, GetStorageControllerByName(Bstr("SATA"), SataCtl.asOutParam()));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(SataCtl, COMSETTER(PortCount)(ValueUnion.u32));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->DetachDevice(Bstr("SATA"), GetOptState.uIndex, 0);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* first guess is that it's a UUID */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* not successful? Then it must be a filename */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = a->virtualBox->FindHardDisk(Bstr(ValueUnion.psz), hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* open the new hard disk object */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync OpenHardDisk(Bstr(ValueUnion.psz), AccessMode_ReadWrite,
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync if (!strcmp(ValueUnion.psz, "on") || !strcmp(ValueUnion.psz, "enable"))
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, AddStorageController(Bstr("SATA"), StorageBus_SATA, ctl.asOutParam()));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync else if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("SATA")));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync return errorArgument("Invalid --usb argument '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = machine->DetachDevice(Bstr("LsiLogic"), GetOptState.uIndex, 0);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, DetachDevice(Bstr("BusLogic"), GetOptState.uIndex, 0));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* first guess is that it's a UUID */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* not successful? Then it must be a filename */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = a->virtualBox->FindHardDisk(Bstr(ValueUnion.psz), hardDisk.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* open the new hard disk object */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = machine->AttachDevice(Bstr("LsiLogic"), GetOptState.uIndex, 0, DeviceType_HardDisk, uuid);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = machine->RemoveStorageController(Bstr("BusLogic"));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic")));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync rc = machine->RemoveStorageController(Bstr("LsiLogic"));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("BusLogic")));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync return errorArgument("Invalid --scsitype argument '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync if (!strcmp(ValueUnion.psz, "on") || !strcmp(ValueUnion.psz, "enable"))
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, AddStorageController(Bstr("BusLogic"), StorageBus_SCSI, ctl.asOutParam()));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync else if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = machine->RemoveStorageController(Bstr("BusLogic"));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic")));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(machine, PassthroughDevice(Bstr("IDE Controller"), 1, 0, !strcmp(ValueUnion.psz, "on")));
100b161379af7255c69e27587cc746e5f76ff050vboxsync /* unmount? */
100b161379af7255c69e27587cc746e5f76ff050vboxsync /* nothing to do, NULL object will cause unmount */
100b161379af7255c69e27587cc746e5f76ff050vboxsync /* host drive? */
100b161379af7255c69e27587cc746e5f76ff050vboxsync CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = host->FindHostDVDDrive(Bstr(ValueUnion.psz + 5), dvdMedium.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* 2nd try: try with the real name, important on Linux+libhal */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync if (RT_FAILURE(RTPathReal(ValueUnion.psz + 5, szPathReal, sizeof(szPathReal))))
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync errorArgument("Invalid host DVD drive name \"%s\"", ValueUnion.psz + 5);
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = host->FindHostDVDDrive(Bstr(szPathReal), dvdMedium.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync errorArgument("Invalid host DVD drive name \"%s\"", ValueUnion.psz + 5);
100b161379af7255c69e27587cc746e5f76ff050vboxsync /* first assume it's a UUID */
100b161379af7255c69e27587cc746e5f76ff050vboxsync rc = a->virtualBox->GetDVDImage(uuid, dvdMedium.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* must be a filename, check if it's in the collection */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = a->virtualBox->FindDVDImage(Bstr(ValueUnion.psz), dvdMedium.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* not registered, do that on the fly */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(a->virtualBox, OpenDVDImage(Bstr(ValueUnion.psz),
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /** @todo generalize this, allow arbitrary number of DVD drives
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync * and as a consequence multiple attachments and different
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync * storage controllers. */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(machine, MountMedium(Bstr("IDE Controller"), 1, 0, uuid, FALSE /* aForce */));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync machine->GetMediumAttachment(Bstr("Floppy Controller"), 0, 0, floppyAttachment.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* disable? */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* disable the controller */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(machine, DetachDevice(Bstr("Floppy Controller"), 0, 0));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* enable the controller */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(machine, AttachDevice(Bstr("Floppy Controller"), 0, 0, DeviceType_Floppy, NULL));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* unmount? */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* nothing to do, NULL object will cause unmount */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* host drive? */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = host->FindHostFloppyDrive(Bstr(ValueUnion.psz + 5), floppyMedium.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync errorArgument("Invalid host floppy drive name \"%s\"", ValueUnion.psz + 5);
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* first assume it's a UUID */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = a->virtualBox->GetFloppyImage(uuid, floppyMedium.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync /* must be a filename, check if it's in the collection */
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync rc = a->virtualBox->FindFloppyImage(Bstr(ValueUnion.psz), floppyMedium.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync /* not registered, do that on the fly */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, MountMedium(Bstr("Floppy Controller"), 0, 0, uuid, FALSE /* aForce */));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(nic, COMSETTER(TraceFile)(Bstr(ValueUnion.psz)));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(TraceEnabled)(ValueUnion.f));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C970A));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C973));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82540EM));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82543GC));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Virtio));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync#endif /* VBOX_WITH_VIRTIO */
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync errorArgument("Invalid NIC type '%s' specified for NIC %u", ValueUnion.psz, GetOptState.uIndex);
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR(nic, COMSETTER(LineSpeed)(ValueUnion.u32));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync /* Somewhat arbitrary limitation - we can pass a list of up to 4 PCI devices
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync * to the PXE ROM, hence only boot priorities 1-4 are allowed (in addition to
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync * 0 for the default lowest priority).
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync errorArgument("Invalid boot priority '%u' specfied for NIC %u", ValueUnion.u32, GetOptState.uIndex);
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR(nic, COMSETTER(BootPriority)(ValueUnion.u32));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync || !strcmp(ValueUnion.psz, "hostif")) /* backward compatibility */
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync errorArgument("Invalid type '%s' specfied for NIC %u", ValueUnion.psz, GetOptState.uIndex);
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR(nic, COMSETTER(CableConnected)(ValueUnion.f));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync /* remove it? */
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR(nic, COMSETTER(HostInterface)(Bstr(ValueUnion.psz)));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync /* remove it? */
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR(nic, COMSETTER(InternalNetwork)(NULL));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR(nic, COMSETTER(InternalNetwork)(Bstr(ValueUnion.psz)));
4f2b002896072b0b5a7cb566341c8bac5e69392bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(nic, COMSETTER(VDENetwork)(Bstr(ValueUnion.psz)));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(driver, COMSETTER(Network)(Bstr(psz)));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(driver, COMSETTER(HostIP)(Bstr(ValueUnion.psz)));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync if (*ch == 0) \
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync "Missing or Invalid argument to '%s'", \
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync CHECK_ERROR(driver, SetNetworkSettings(RTStrToUInt32(strMtu), RTStrToUInt32(strSockSnd), RTStrToUInt32(strSockRcv),
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync RTStrToUInt32(strTcpSnd), RTStrToUInt32(strTcpRcv)));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync /* format name:proto:hostip:hostport:guestip:guestport*/
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync errorArgument("Invalid proto '%s' specfied for NIC %u", ValueUnion.psz, GetOptState.uIndex);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(driver, AddRedirect(Bstr(strName), proto, Bstr(strHostIp),
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync RTStrToUInt16(strHostPort), Bstr(strGuestIp), RTStrToUInt16(strGuestPort)));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync /* delete NAT Rule operation */
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_STRING);
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync return errorSyntax(USAGE_MODIFYVM, "Not enough parameters");
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(driver, RemoveRedirect(Bstr(ValueUnion.psz)));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(driver, COMSETTER(AliasMode)(aliasMode));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(driver, COMSETTER(TftpPrefix)(Bstr(ValueUnion.psz)));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(driver, COMSETTER(TftpBootFile)(Bstr(ValueUnion.psz)));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(driver, COMSETTER(TftpNextServer)(Bstr(ValueUnion.psz)));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(driver, COMSETTER(DnsPassDomain)(ValueUnion.f));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
90624af27b0e648b68167bd3b332d0e3b1d18ab1vboxsync CHECK_ERROR(driver, COMSETTER(DnsProxy)(ValueUnion.f));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam()));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR(driver, COMSETTER(DnsUseHostResolver)(ValueUnion.f));
cd2274c977e1b722b535e4f601a324e8029b5e43vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync /* generate one? */
db87bb1112c1f2827ffa192593174cf845f8f04dvboxsync CHECK_ERROR(nic, COMSETTER(MACAddress)(Bstr(ValueUnion.psz)));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync bool fEnableUsb = false;
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(machine, COMSETTER(PointingHidType)(PointingHidType_PS2Mouse));
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(machine, COMSETTER(PointingHidType)(PointingHidType_USBMouse));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(machine, COMSETTER(PointingHidType)(PointingHidType_USBTablet));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync errorArgument("Invalid type '%s' specfied for pointing device", ValueUnion.psz);
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync /* Make sure the OHCI controller is enabled. */
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync rc = machine->COMGETTER(USBController)(UsbCtl.asOutParam());
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync bool fEnableUsb = false;
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(machine, COMSETTER(KeyboardHidType)(KeyboardHidType_PS2Keyboard));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(machine, COMSETTER(KeyboardHidType)(KeyboardHidType_USBKeyboard));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync errorArgument("Invalid type '%s' specfied for keyboard", ValueUnion.psz);
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync /* Make sure the OHCI controller is enabled. */
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync rc = machine->COMGETTER(USBController)(UsbCtl.asOutParam());
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR_BREAK(machine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_Disconnected));
30f07af559efcbd967e801903746fc21f81ee533vboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_STRING);
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync "Missing or Invalid argument to '%s'",
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz)));
48e06e6a052c50ecf176f63f5537f80b544bf34avboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_RawFile));
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz)));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostDevice));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR_BREAK(machine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync if (!strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32) != MODIFYVM_UART;
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync "Missing or Invalid argument to '%s'",
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync return errorArgument("Error parsing UART I/O base '%s'", pszIOBase);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, COMSETTER(MemoryBalloonSize)(ValueUnion.u32));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_SB16));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_AC97));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync errorArgument("Invalid --audiocontroller argument '%s'", ValueUnion.psz);
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync machine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam());
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync /* disable? */
93e05ea894cefd56ca308d72372b4dd8045bd1eevboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(false));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WinMM));
680c2aff33be2ee9340c8763a3cb5c218c352bcfvboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync#endif /* RT_OS_WINDOWS */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync#endif /* !RT_OS_LINUX */
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_SolAudio));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync#endif /* !RT_OS_SOLARIS */
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync#endif /* !RT_OS_FREEBSD */
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_CoreAudio));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync#endif /* !RT_OS_DARWIN */
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync# if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(VBOX_WITH_SOLARIS_OSS)
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
28a2653de6f80a4b1f000cfc52e1a04492d4c151vboxsync errorArgument("Invalid --audio argument '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_Disabled));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_HostToGuest));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_GuestToHost));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(machine, COMSETTER(ClipboardMode)(ClipboardMode_Bidirectional));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync errorArgument("Invalid --clipboard argument '%s'", ValueUnion.psz);
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(vrdpServer, COMSETTER(Ports)(Bstr("0")));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(vrdpServer, COMSETTER(Ports)(Bstr(ValueUnion.psz)));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(vrdpServer, COMSETTER(NetAddress)(Bstr(ValueUnion.psz)));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(vrdpServer, COMSETTER(AuthType)(VRDPAuthType_Null));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(vrdpServer, COMSETTER(AuthType)(VRDPAuthType_External));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(vrdpServer, COMSETTER(AuthType)(VRDPAuthType_Guest));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync errorArgument("Invalid --vrdpauthtype argument '%s'", ValueUnion.psz);
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(vrdpServer, COMSETTER(AllowMultiConnection)(ValueUnion.f));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(vrdpServer, COMSETTER(ReuseSingleConnection)(ValueUnion.f));
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
817577d2c4d6dee709de7a92d3bb7d0aeedae9aevboxsync CHECK_ERROR(vrdpServer, COMSETTER(VideoChannel)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(vrdpServer, COMSETTER(VideoChannelQuality)(ValueUnion.u32));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync machine->COMGETTER(VRDPServer)(vrdpServer.asOutParam());
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(vrdpServer, COMSETTER(Enabled)(ValueUnion.f));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync#endif /* VBOX_WITH_VRDP */
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(machine, COMGETTER(USBController)(UsbCtl.asOutParam()));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(UsbCtl, COMSETTER(EnabledEhci)(ValueUnion.f));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(machine, COMGETTER(USBController)(UsbCtl.asOutParam()));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(UsbCtl, COMSETTER(Enabled)(ValueUnion.f));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(NULL));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(Bstr(ValueUnion.psz)));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterEnabled)(ValueUnion.f));
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync CHECK_ERROR(machine, COMSETTER(TeleporterPort)(ValueUnion.u32));
eb259de2a9eac4b4dda56e89f5004671f926bd9bvboxsync CHECK_ERROR(machine, COMSETTER(TeleporterAddress)(Bstr(ValueUnion.psz)));
30f07af559efcbd967e801903746fc21f81ee533vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterPassword)(Bstr(ValueUnion.psz)));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync CHECK_ERROR(machine, COMSETTER(HardwareUUID)(Bstr(ValueUnion.psz)));
9f997e760f610c92e3a365be21ead6972bc46130vboxsync CHECK_ERROR(machine, COMSETTER(HpetEnabled)(ValueUnion.f));
680c2aff33be2ee9340c8763a3cb5c218c352bcfvboxsync CHECK_ERROR(machine, COMSETTER(IoMgr)(IoMgrType_Simple));
30f07af559efcbd967e801903746fc21f81ee533vboxsync CHECK_ERROR(machine, COMSETTER(IoMgr)(IoMgrType_Async));
90624af27b0e648b68167bd3b332d0e3b1d18ab1vboxsync errorArgument("Invalid --iomgr argument '%s'", ValueUnion.psz);
f81115e612ee8fa2bc082db9d4c8879e33babc5avboxsync CHECK_ERROR(machine, COMSETTER(IoBackend)(IoBackendType_Buffered));
90624af27b0e648b68167bd3b332d0e3b1d18ab1vboxsync CHECK_ERROR(machine, COMSETTER(IoBackend)(IoBackendType_Unbuffered));
a60be2c64ea23bb7ce4c9998bcd541c4db879fbavboxsync errorArgument("Invalid --iobackend argument '%s'", ValueUnion.psz);
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync CHECK_ERROR(machine, COMSETTER(IoCacheEnabled)(ValueUnion.f));
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync CHECK_ERROR(machine, COMSETTER(IoCacheSize)(ValueUnion.u32));
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync CHECK_ERROR(machine, COMSETTER(IoBandwidthMax)(ValueUnion.u32));
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync /* commit changes */
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync /* it's important to always close sessions */
46b9d3cd08a855c5d0e968e4fff0e89dea3fc2dfvboxsync#endif /* !VBOX_ONLY_DOCS */