VBoxManageModifyVM.cpp revision 794c574111980e7fb3a86847e5495156afa13134
adf2bcd2e5d07d5a11553b88e147c1f4b2249bffvboxsync * VBoxManage - Implementation of modifyvm command.
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync * Copyright (C) 2006-2014 Oracle Corporation
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * available from http://www.virtualbox.org. This file is free software;
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * you can redistribute it and/or modify it under the terms of the GNU
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * General Public License (GPL) as published by the Free Software
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync/*******************************************************************************
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync* Header Files *
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync*******************************************************************************/
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync#endif /* !VBOX_ONLY_DOCS */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsyncusing namespace com;
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync/** @todo refine this after HDD changes; MSC 8.0/64 has trouble with handleModifyVM. */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync MODIFYVM_VRDPVIDEOCHANNELQUALITY, /* VRDE: deprecated */
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync { "--groups", MODIFYVM_GROUPS, RTGETOPT_REQ_STRING },
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync { "--description", MODIFYVM_DESCRIPTION, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--ostype", MODIFYVM_OSTYPE, RTGETOPT_REQ_STRING },
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync { "--iconfile", MODIFYVM_ICONFILE, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--memory", MODIFYVM_MEMORY, RTGETOPT_REQ_UINT32 },
b304856b23107864c9c594a80cebca6006623f31vboxsync { "--pagefusion", MODIFYVM_PAGEFUSION, RTGETOPT_REQ_BOOL_ONOFF },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--firmware", MODIFYVM_FIRMWARE, RTGETOPT_REQ_STRING },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--acpi", MODIFYVM_ACPI, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--ioapic", MODIFYVM_IOAPIC, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--pae", MODIFYVM_PAE, RTGETOPT_REQ_BOOL_ONOFF },
8fdb854581fe3cb394d84835dc09b02e6e18d4edvboxsync { "--longmode", MODIFYVM_LONGMODE, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--synthcpu", MODIFYVM_SYNTHCPU, RTGETOPT_REQ_BOOL_ONOFF },
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync { "--triplefaultreset", MODIFYVM_TFRESET, RTGETOPT_REQ_BOOL_ONOFF },
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync { "--paravirtprovider", MODIFYVM_PARAVIRTPROVIDER, RTGETOPT_REQ_STRING },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--hwvirtex", MODIFYVM_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--nestedpaging", MODIFYVM_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF },
c33fc49611f2444dade533488bf431e29eb88bcdvboxsync { "--largepages", MODIFYVM_LARGEPAGES, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--vtxvpid", MODIFYVM_VTXVPID, RTGETOPT_REQ_BOOL_ONOFF },
1bf151411167b02ebdc6d6a18de8b97030341e1fvboxsync { "--vtxux", MODIFYVM_VTXUX, RTGETOPT_REQ_BOOL_ONOFF },
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync { "--cpuidset", MODIFYVM_SETCPUID, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX},
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync { "--cpuidremove", MODIFYVM_DELCPUID, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX},
db0ecde8f28fdb4525bc6d94056166c70b02ebb8vboxsync { "--cpuidremoveall", MODIFYVM_DELALLCPUID, RTGETOPT_REQ_NOTHING},
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync { "--cpuhotplug", MODIFYVM_CPUHOTPLUG, RTGETOPT_REQ_BOOL_ONOFF },
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync { "--plugcpu", MODIFYVM_PLUGCPU, RTGETOPT_REQ_UINT32 },
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync { "--unplugcpu", MODIFYVM_UNPLUGCPU, RTGETOPT_REQ_UINT32 },
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync { "--cpuexecutioncap", MODIFYVM_CPU_EXECTUION_CAP, RTGETOPT_REQ_UINT32 },
e2760cdc84c692bc46cfaf5018d313db2f122acavboxsync { "--rtcuseutc", MODIFYVM_RTCUSEUTC, RTGETOPT_REQ_BOOL_ONOFF },
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync { "--graphicscontroller", MODIFYVM_GRAPHICSCONTROLLER, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--monitorcount", MODIFYVM_MONITORCOUNT, RTGETOPT_REQ_UINT32 },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--accelerate3d", MODIFYVM_ACCELERATE3D, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--accelerate2dvideo", MODIFYVM_ACCELERATE2DVIDEO, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--bioslogofadein", MODIFYVM_BIOSLOGOFADEIN, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--bioslogofadeout", MODIFYVM_BIOSLOGOFADEOUT, RTGETOPT_REQ_BOOL_ONOFF },
fc5f879e9508f333e20b37c63db9189a33059308vboxsync { "--bioslogodisplaytime", MODIFYVM_BIOSLOGODISPLAYTIME, RTGETOPT_REQ_UINT32 },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--bioslogoimagepath", MODIFYVM_BIOSLOGOIMAGEPATH, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--biosbootmenu", MODIFYVM_BIOSBOOTMENU, RTGETOPT_REQ_STRING },
1c6ec9a3a329da6f61978a372e509cd233f0d9f9vboxsync { "--biossystemtimeoffset", MODIFYVM_BIOSSYSTEMTIMEOFFSET, RTGETOPT_REQ_INT64 },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--biospxedebug", MODIFYVM_BIOSPXEDEBUG, RTGETOPT_REQ_BOOL_ONOFF },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--boot", MODIFYVM_BOOT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--idecontroller", MODIFYVM_IDECONTROLLER, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--sataportcount", MODIFYVM_SATAPORTCOUNT, RTGETOPT_REQ_UINT32 },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--sataport", MODIFYVM_SATAPORT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--scsiport", MODIFYVM_SCSIPORT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--scsitype", MODIFYVM_SCSITYPE, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--dvdpassthrough", MODIFYVM_DVDPASSTHROUGH, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--floppy", MODIFYVM_FLOPPY, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--nictracefile", MODIFYVM_NICTRACEFILE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--nictrace", MODIFYVM_NICTRACE, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync { "--nicproperty", MODIFYVM_NICPROPERTY, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--nictype", MODIFYVM_NICTYPE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--nicspeed", MODIFYVM_NICSPEED, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX },
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync { "--nicbootprio", MODIFYVM_NICBOOTPRIO, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_INDEX },
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync { "--nicpromisc", MODIFYVM_NICPROMISC, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync { "--nicbandwidthgroup", MODIFYVM_NICBWGROUP, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--nic", MODIFYVM_NIC, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--cableconnected", MODIFYVM_CABLECONNECTED, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--bridgeadapter", MODIFYVM_BRIDGEADAPTER, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--hostonlyadapter", MODIFYVM_HOSTONLYADAPTER, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--intnet", MODIFYVM_INTNET, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync { "--nicgenericdrv", MODIFYVM_GENERICDRV, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
4b9a9888c020ed3508c8ac3a5b47842d6aa3f8d2vboxsync { "--nat-network", MODIFYVM_NATNETWORKNAME, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
4b9a9888c020ed3508c8ac3a5b47842d6aa3f8d2vboxsync { "--natnetwork", MODIFYVM_NATNETWORKNAME, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
4b9a9888c020ed3508c8ac3a5b47842d6aa3f8d2vboxsync { "--natnet", MODIFYVM_NATNET, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--natbindip", MODIFYVM_NATBINDIP, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
95cb8e789c1eed6f2bb3195d0b996feee11d548evboxsync { "--natsettings", MODIFYVM_NATSETTINGS, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--natpf", MODIFYVM_NATPF, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync { "--nataliasmode", MODIFYVM_NATALIASMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--nattftpprefix", MODIFYVM_NATTFTPPREFIX, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--nattftpfile", MODIFYVM_NATTFTPFILE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--nattftpserver", MODIFYVM_NATTFTPSERVER, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--natdnspassdomain", MODIFYVM_NATDNSPASSDOMAIN, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--natdnsproxy", MODIFYVM_NATDNSPROXY, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync { "--natdnshostresolver", MODIFYVM_NATDNSHOSTRESOLVER, RTGETOPT_REQ_BOOL_ONOFF | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--macaddress", MODIFYVM_MACADDRESS, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
19cb1f8699e352d590c4946caee33863a5157241vboxsync { "--mouse", MODIFYVM_HIDPTR, RTGETOPT_REQ_STRING },
19cb1f8699e352d590c4946caee33863a5157241vboxsync { "--keyboard", MODIFYVM_HIDKBD, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--uartmode", MODIFYVM_UARTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--uart", MODIFYVM_UART, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync { "--lptmode", MODIFYVM_LPTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync { "--lpt", MODIFYVM_LPT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--guestmemoryballoon", MODIFYVM_GUESTMEMORYBALLOON, RTGETOPT_REQ_UINT32 },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--audiocontroller", MODIFYVM_AUDIOCONTROLLER, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--audio", MODIFYVM_AUDIO, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--clipboard", MODIFYVM_CLIPBOARD, RTGETOPT_REQ_STRING },
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync { "--draganddrop", MODIFYVM_DRAGANDDROP, RTGETOPT_REQ_STRING },
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdpport", MODIFYVM_VRDPPORT, RTGETOPT_REQ_STRING }, /* deprecated */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdpaddress", MODIFYVM_VRDPADDRESS, RTGETOPT_REQ_STRING }, /* deprecated */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdpauthtype", MODIFYVM_VRDPAUTHTYPE, RTGETOPT_REQ_STRING }, /* deprecated */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdpmulticon", MODIFYVM_VRDPMULTICON, RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdpreusecon", MODIFYVM_VRDPREUSECON, RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdpvideochannel", MODIFYVM_VRDPVIDEOCHANNEL, RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync { "--vrdpvideochannelquality", MODIFYVM_VRDPVIDEOCHANNELQUALITY, RTGETOPT_REQ_STRING }, /* deprecated */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdp", MODIFYVM_VRDP, RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
cc74f15083bf80fbc96723a89faa06c15d0dead8vboxsync { "--vrdeproperty", MODIFYVM_VRDEPROPERTY, RTGETOPT_REQ_STRING },
a72b5355eb89aafe6bfcc8912cf02645d7cccceavboxsync { "--vrdeport", MODIFYVM_VRDEPORT, RTGETOPT_REQ_STRING },
a72b5355eb89aafe6bfcc8912cf02645d7cccceavboxsync { "--vrdeaddress", MODIFYVM_VRDEADDRESS, RTGETOPT_REQ_STRING },
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdeauthtype", MODIFYVM_VRDEAUTHTYPE, RTGETOPT_REQ_STRING },
6e25221ce8ef8e656d1e15eb7ec5cf8ae758ceb2vboxsync { "--vrdeauthlibrary", MODIFYVM_VRDEAUTHLIBRARY, RTGETOPT_REQ_STRING },
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdemulticon", MODIFYVM_VRDEMULTICON, RTGETOPT_REQ_BOOL_ONOFF },
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdereusecon", MODIFYVM_VRDEREUSECON, RTGETOPT_REQ_BOOL_ONOFF },
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrdevideochannel", MODIFYVM_VRDEVIDEOCHANNEL, RTGETOPT_REQ_BOOL_ONOFF },
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync { "--vrdevideochannelquality", MODIFYVM_VRDEVIDEOCHANNELQUALITY, RTGETOPT_REQ_STRING },
9ca017ceee656f9d33f2cb6652e401b5f17fcfb7vboxsync { "--vrdeextpack", MODIFYVM_VRDE_EXTPACK, RTGETOPT_REQ_STRING },
3933885bc0c2c93436d858a14564c6179ec72872vboxsync { "--vrde", MODIFYVM_VRDE, RTGETOPT_REQ_BOOL_ONOFF },
9601ea695ea96905d6f5d484facd272732365c40vboxsync { "--usbxhci", MODIFYVM_USBXHCI, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--usbehci", MODIFYVM_USBEHCI, RTGETOPT_REQ_BOOL_ONOFF },
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync { "--usb", MODIFYVM_USB, RTGETOPT_REQ_BOOL_ONOFF },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--snapshotfolder", MODIFYVM_SNAPSHOTFOLDER, RTGETOPT_REQ_STRING },
f106b549ead77cab51ff1e2c116060aaabb90d5evboxsync { "--teleporter", MODIFYVM_TELEPORTER_ENABLED, RTGETOPT_REQ_BOOL_ONOFF },
f106b549ead77cab51ff1e2c116060aaabb90d5evboxsync { "--teleporterenabled", MODIFYVM_TELEPORTER_ENABLED, RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--teleporterport", MODIFYVM_TELEPORTER_PORT, RTGETOPT_REQ_UINT32 },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--teleporteraddress", MODIFYVM_TELEPORTER_ADDRESS, RTGETOPT_REQ_STRING },
9e4ea89b1085fdaa5861e45a729d9c978db1a8f1vboxsync { "--teleporterpassword", MODIFYVM_TELEPORTER_PASSWORD, RTGETOPT_REQ_STRING },
23d9dbdaf1b83107abf9882246a4a46933f733efvboxsync { "--teleporterpasswordfile", MODIFYVM_TELEPORTER_PASSWORD_FILE, RTGETOPT_REQ_STRING },
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync { "--tracing-enabled", MODIFYVM_TRACING_ENABLED, RTGETOPT_REQ_BOOL_ONOFF },
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync { "--tracing-config", MODIFYVM_TRACING_CONFIG, RTGETOPT_REQ_STRING },
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync { "--tracing-allow-vm-access", MODIFYVM_TRACING_ALLOW_VM_ACCESS, RTGETOPT_REQ_BOOL_ONOFF },
ad9e5a61fea617d40d07390ff1737277d6aef869vboxsync { "--hardwareuuid", MODIFYVM_HARDWARE_UUID, RTGETOPT_REQ_STRING },
dbabc9de5bf52ce5eb77cf82b038e9a6166c5a04vboxsync { "--hpet", MODIFYVM_HPET, RTGETOPT_REQ_BOOL_ONOFF },
4090390866c02d5d0ad061151cdb298b9a173e86vboxsync { "--iocache", MODIFYVM_IOCACHE, RTGETOPT_REQ_BOOL_ONOFF },
4090390866c02d5d0ad061151cdb298b9a173e86vboxsync { "--iocachesize", MODIFYVM_IOCACHESIZE, RTGETOPT_REQ_UINT32 },
40dce69ff1c2949a489337922f30f1021d62d864vboxsync { "--faulttolerance", MODIFYVM_FAULT_TOLERANCE, RTGETOPT_REQ_STRING },
40dce69ff1c2949a489337922f30f1021d62d864vboxsync { "--faulttoleranceaddress", MODIFYVM_FAULT_TOLERANCE_ADDRESS, RTGETOPT_REQ_STRING },
40dce69ff1c2949a489337922f30f1021d62d864vboxsync { "--faulttoleranceport", MODIFYVM_FAULT_TOLERANCE_PORT, RTGETOPT_REQ_UINT32 },
40dce69ff1c2949a489337922f30f1021d62d864vboxsync { "--faulttolerancepassword", MODIFYVM_FAULT_TOLERANCE_PASSWORD, RTGETOPT_REQ_STRING },
40dce69ff1c2949a489337922f30f1021d62d864vboxsync { "--faulttolerancesyncinterval", MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL, RTGETOPT_REQ_UINT32 },
7a29aa5ce149ccd344a2929d2815b8e212690b92vboxsync { "--chipset", MODIFYVM_CHIPSET, RTGETOPT_REQ_STRING },
f57758f0bcf995d350d64a7c059ac93573144c05vboxsync { "--vcpenabled", MODIFYVM_VCP, RTGETOPT_REQ_BOOL_ONOFF },
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync { "--vcpscreens", MODIFYVM_VCP_SCREENS, RTGETOPT_REQ_STRING },
f57758f0bcf995d350d64a7c059ac93573144c05vboxsync { "--vcpfile", MODIFYVM_VCP_FILENAME, RTGETOPT_REQ_STRING },
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync { "--vcpwidth", MODIFYVM_VCP_WIDTH, RTGETOPT_REQ_UINT32 },
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync { "--vcpheight", MODIFYVM_VCP_HEIGHT, RTGETOPT_REQ_UINT32 },
5d57bcb78f1f3f918bd3daf709b551b8c2d30485vboxsync { "--vcprate", MODIFYVM_VCP_RATE, RTGETOPT_REQ_UINT32 },
cccc6ee5f7156cfcdf13acca545cf65124d9ed44vboxsync { "--vcpfps", MODIFYVM_VCP_FPS, RTGETOPT_REQ_UINT32 },
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync { "--autostart-enabled", MODIFYVM_AUTOSTART_ENABLED, RTGETOPT_REQ_BOOL_ONOFF },
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync { "--autostart-delay", MODIFYVM_AUTOSTART_DELAY, RTGETOPT_REQ_UINT32 },
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync { "--autostop-type", MODIFYVM_AUTOSTOP_TYPE, RTGETOPT_REQ_STRING },
505ddd00252720bfb5569fcb17bfda53dc141e3bvboxsync { "--pciattach", MODIFYVM_ATTACH_PCI, RTGETOPT_REQ_STRING },
505ddd00252720bfb5569fcb17bfda53dc141e3bvboxsync { "--pcidetach", MODIFYVM_DETACH_PCI, RTGETOPT_REQ_STRING },
7708252d252a55417a6a817041e4356797e34255vboxsync { "--usbcardreader", MODIFYVM_USBCARDREADER, RTGETOPT_REQ_BOOL_ONOFF },
904810c4c6668233349b025cc58013cb7c11c701vboxsync { "--defaultfrontend", MODIFYVM_DEFAULTFRONTEND, RTGETOPT_REQ_STRING },
3933885bc0c2c93436d858a14564c6179ec72872vboxsyncstatic void vrdeWarningDeprecatedOption(const char *pszOption)
3933885bc0c2c93436d858a14564c6179ec72872vboxsync RTStrmPrintf(g_pStdErr, "Warning: '--vrdp%s' is deprecated. Use '--vrde%s'.\n", pszOption, pszOption);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync/** Parse PCI address in format 01:02.03 and convert it to the numeric representation. */
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync rc = RTStrToUInt8Ex(pszNext, &pszNext, 16, &aVals[0]);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync if (RT_FAILURE(rc) || pszNext == NULL || *pszNext != ':')
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync rc = RTStrToUInt8Ex(pszNext+1, &pszNext, 16, &aVals[1]);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync if (RT_FAILURE(rc) || pszNext == NULL || *pszNext != '.')
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync rc = RTStrToUInt8Ex(pszNext+1, &pszNext, 16, &aVals[2]);
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync return (aVals[0] << 8) | (aVals[1] << 3) | (aVals[2] << 0);
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsyncvoid parseGroups(const char *pcszGroups, com::SafeArray<BSTR> *pGroups)
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync Bstr(pcszGroups, pComma - pcszGroups).detachTo(pGroups->appendedRaw());
48890ac9b4b339e0341e826b5c26ce6408729987vboxsyncint parseScreens(const char *pcszScreens, com::SafeArray<BOOL> *pScreens)
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync int rc = RTStrToUInt32Ex(pcszScreens, &pszNext, 0, &iScreen);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* VM ID + at least one parameter. Parameter arguments are checked
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync * individually. */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync return errorSyntax(USAGE_MODIFYVM, "Not enough parameters");
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* try to find the given machine */
508452243fd3328f7b9e0405d39fb9dc004e31b8vboxsync CHECK_ERROR_RET(a->virtualBox, FindMachine(Bstr(a->argv[0]).raw(),
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync /* Get the number of network adapters */
89aedeb1d8af54aba6ae46dbbd256281315c1be6vboxsync ULONG NetworkAdapterCount = getMaxNics(a->virtualBox, machine);
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* open a session for the VM */
f409459bdd4c15cdb8d7fb6c6d54338cce9ac814vboxsync CHECK_ERROR_RET(machine, LockMachine(a->session, LockType_Write), 1);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* get the mutable session machine */
f4e792b5d6ee04e9d93499b747cce21510c3cdb3vboxsync CHECK_ERROR_RET(a->session, COMGETTER(Machine)(machine.asOutParam()), 1);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync machine->COMGETTER(BIOSSettings)(biosSettings.asOutParam());
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync RTGetOptInit(&GetOptState, a->argc, a->argv, g_aModifyVMOptions,
fb1975a6972d89de9e515bed0248db93f04ec9d8vboxsync RT_ELEMENTS(g_aModifyVMOptions), 1, RTGETOPTINIT_FLAGS_NO_STD_OPTS);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(Name)(Bstr(ValueUnion.psz).raw()));
1147e980f6ab0b7ff1d08c13ad1c03eea30d102dvboxsync CHECK_ERROR(machine, COMSETTER(Groups)(ComSafeArrayAsInParam(groups)));
e59069cf1c98c1c2e90a18ec76fbc2e9907fb917vboxsync CHECK_ERROR(machine, COMSETTER(Description)(Bstr(ValueUnion.psz).raw()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(a->virtualBox, GetGuestOSType(Bstr(ValueUnion.psz).raw(),
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(OSTypeId)(Bstr(ValueUnion.psz).raw()));
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync errorArgument("Invalid guest OS type '%s'", ValueUnion.psz);
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync int vrc = RTFileOpen(&iconFile, ValueUnion.psz, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync RTMsgError("Cannot open file \"%s\": %Rrc", ValueUnion.psz, vrc);
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync RTMsgError("Cannot get size of file \"%s\": %Rrc", ValueUnion.psz, vrc);
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync RTMsgError("File \"%s\" is bigger than 256KByte", ValueUnion.psz);
cedd207acc51a49839fdf51554fc19539ac68b4dvboxsync rc = RTFileRead(iconFile, icon.raw(), (size_t)cbSize, NULL);
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync RTMsgError("Cannot read contents of file \"%s\": %Rrc", ValueUnion.psz, vrc);
361a7fb527903c8dbfd0cc7dc779f943c6e348f6vboxsync CHECK_ERROR(machine, COMSETTER(Icon)(ComSafeArrayAsInParam(icon)));
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync CHECK_ERROR(machine, COMSETTER(MemorySize)(ValueUnion.u32));
b304856b23107864c9c594a80cebca6006623f31vboxsync CHECK_ERROR(machine, COMSETTER(PageFusionEnabled)(ValueUnion.f));
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync CHECK_ERROR(machine, COMSETTER(VRAMSize)(ValueUnion.u32));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI));
3a0bc95d0adf57baefd303e94b8f1b7b31a8f080vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI32));
21ddd8aa21b8d7ad25b18ab341ede34c1cb4a125vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI64));
21ddd8aa21b8d7ad25b18ab341ede34c1cb4a125vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFIDUAL));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_BIOS));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync errorArgument("Invalid --firmware argument '%s'", ValueUnion.psz);
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(biosSettings, COMSETTER(ACPIEnabled)(ValueUnion.f));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(ValueUnion.f));
f31ac84c1c57e23801423b5bd184fadabe6456f3vboxsync CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_PAE, ValueUnion.f));
8fdb854581fe3cb394d84835dc09b02e6e18d4edvboxsync CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_LongMode, ValueUnion.f));
f31ac84c1c57e23801423b5bd184fadabe6456f3vboxsync CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_Synthetic, ValueUnion.f));
5e0d1b28833a92e30446e95ced085bce4d794067vboxsync CHECK_ERROR(machine, SetCPUProperty(CPUPropertyType_TripleFaultReset, ValueUnion.f));
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_None));
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_Default));
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_Legacy));
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_Minimal));
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_HyperV));
56343f236d9d7c0e3d2b75e23f0f5575dc77f2e3vboxsync errorArgument("Invalid --paravirtprovider argument '%s'", ValueUnion.psz);
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, ValueUnion.f));
121568d0a1e932e6f6acd49376827a0e593815favboxsync for (unsigned i = 0 ; i < 4 ; i++)
121568d0a1e932e6f6acd49376827a0e593815favboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX);
121568d0a1e932e6f6acd49376827a0e593815favboxsync "Missing or Invalid argument to '%s'",
f31ac84c1c57e23801423b5bd184fadabe6456f3vboxsync CHECK_ERROR(machine, SetCPUIDLeaf(id, aValue[0], aValue[1], aValue[2], aValue[3]));
f31ac84c1c57e23801423b5bd184fadabe6456f3vboxsync CHECK_ERROR(machine, RemoveCPUIDLeaf(ValueUnion.u32));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, ValueUnion.f));
c33fc49611f2444dade533488bf431e29eb88bcdvboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_LargePages, ValueUnion.f));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, ValueUnion.f));
1bf151411167b02ebdc6d6a18de8b97030341e1fvboxsync CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, ValueUnion.f));
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync CHECK_ERROR(machine, COMSETTER(CPUCount)(ValueUnion.u32));
e2760cdc84c692bc46cfaf5018d313db2f122acavboxsync CHECK_ERROR(machine, COMSETTER(RTCUseUTC)(ValueUnion.f));
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync CHECK_ERROR(machine, COMSETTER(CPUHotPlugEnabled)(ValueUnion.f));
6e12ccc60ac657fb87e27b7a2b26e0a63bebe024vboxsync CHECK_ERROR(machine, HotUnplugCPU(ValueUnion.u32));
657b2c9f6d33f08001e5fa6f6e0572dcf0391013vboxsync CHECK_ERROR(machine, COMSETTER(CPUExecutionCap)(ValueUnion.u32));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync CHECK_ERROR(machine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_Null));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync CHECK_ERROR(machine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxVGA));
ae94ad7e769e467419ab99cab5403bdb39bc544fvboxsync CHECK_ERROR(machine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VMSVGA));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync errorArgument("Invalid --graphicscontroller argument '%s'", ValueUnion.psz);
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync CHECK_ERROR(machine, COMSETTER(MonitorCount)(ValueUnion.u32));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(machine, COMSETTER(Accelerate3DEnabled)(ValueUnion.f));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(machine, COMSETTER(Accelerate2DVideoEnabled)(ValueUnion.f));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoFadeIn)(ValueUnion.f));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoFadeOut)(ValueUnion.f));
fc5f879e9508f333e20b37c63db9189a33059308vboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoDisplayTime)(ValueUnion.u32));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(biosSettings, COMSETTER(LogoImagePath)(Bstr(ValueUnion.psz).raw()));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_Disabled));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MenuOnly));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "messageandmenu"))
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MessageAndMenu));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync errorArgument("Invalid --biosbootmenu argument '%s'", ValueUnion.psz);
1c6ec9a3a329da6f61978a372e509cd233f0d9f9vboxsync CHECK_ERROR(biosSettings, COMSETTER(TimeOffset)(ValueUnion.i64));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(biosSettings, COMSETTER(PXEDebugEnabled)(ValueUnion.f));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Null));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Floppy));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_DVD));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_HardDisk));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Network));
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync return errorArgument("Invalid boot device '%s'", ValueUnion.psz);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync machine->DetachDevice(bstrController.raw(), u1, u2);
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync rc = openMedium(a, ValueUnion.psz, DeviceType_HardDisk,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fForceNewUuidOnOpen */,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fSilent */);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, AttachDevice(bstrController.raw(),
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, GetStorageControllerByName(Bstr("IDE Controller").raw(),
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync CHECK_ERROR(storageController, COMSETTER(ControllerType)(StorageControllerType_PIIX3));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync CHECK_ERROR(storageController, COMSETTER(ControllerType)(StorageControllerType_PIIX4));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync CHECK_ERROR(storageController, COMSETTER(ControllerType)(StorageControllerType_ICH6));
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync errorArgument("Invalid --idecontroller argument '%s'", ValueUnion.psz);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, GetStorageControllerByName(Bstr("SATA").raw(),
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync CHECK_ERROR(SataCtl, COMSETTER(PortCount)(ValueUnion.u32));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync if (!RTStrICmp(ValueUnion.psz, "on") || !RTStrICmp(ValueUnion.psz, "enable"))
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, AddStorageController(Bstr("SATA").raw(),
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable"))
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("SATA").raw()));
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync return errorArgument("Invalid --usb argument '%s'", ValueUnion.psz);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, DetachDevice(Bstr("BusLogic").raw(),
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync rc = openMedium(a, ValueUnion.psz, DeviceType_HardDisk,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fForceNewUuidOnOpen */,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fSilent */);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync rc = machine->RemoveStorageController(Bstr("BusLogic").raw());
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic").raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync rc = machine->RemoveStorageController(Bstr("LsiLogic").raw());
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("BusLogic").raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync return errorArgument("Invalid --scsitype argument '%s'", ValueUnion.psz);
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync if (!RTStrICmp(ValueUnion.psz, "on") || !RTStrICmp(ValueUnion.psz, "enable"))
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, AddStorageController(Bstr("BusLogic").raw(),
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable"))
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync rc = machine->RemoveStorageController(Bstr("BusLogic").raw());
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic").raw()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, PassthroughDevice(Bstr("IDE Controller").raw(),
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* unmount? */
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync /* nothing to do, NULL object will cause unmount */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* host drive? */
794c574111980e7fb3a86847e5495156afa13134vboxsync else if (!RTStrNICmp(ValueUnion.psz, RT_STR_TUPLE("host:")))
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync rc = host->FindHostDVDDrive(Bstr(ValueUnion.psz + 5).raw(),
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* 2nd try: try with the real name, important on Linux+libhal */
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync if (RT_FAILURE(RTPathReal(ValueUnion.psz + 5, szPathReal, sizeof(szPathReal))))
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync errorArgument("Invalid host DVD drive name \"%s\"", ValueUnion.psz + 5);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync rc = host->FindHostDVDDrive(Bstr(szPathReal).raw(),
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync errorArgument("Invalid host DVD drive name \"%s\"", ValueUnion.psz + 5);
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fForceNewUuidOnOpen */,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fSilent */);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, MountMedium(Bstr("IDE Controller").raw(),
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync machine->GetMediumAttachment(Bstr("Floppy Controller").raw(),
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* disable? */
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* disable the controller */
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, DetachDevice(Bstr("Floppy Controller").raw(),
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* enable the controller */
1871985cb4854e5bfb2ead8174ee28dbfce74df5vboxsync CHECK_ERROR(machine, AttachDeviceWithoutMedium(Bstr("Floppy Controller").raw(),
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* unmount? */
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync || !RTStrICmp(ValueUnion.psz, "empty")) // deprecated
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* nothing to do, NULL object will cause unmount */
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* host drive? */
794c574111980e7fb3a86847e5495156afa13134vboxsync else if (!RTStrNICmp(ValueUnion.psz, RT_STR_TUPLE("host:")))
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync rc = host->FindHostFloppyDrive(Bstr(ValueUnion.psz + 5).raw(),
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync errorArgument("Invalid host floppy drive name \"%s\"", ValueUnion.psz + 5);
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync rc = openMedium(a, ValueUnion.psz, DeviceType_Floppy,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fForceNewUuidOnOpen */,
a9f530691071e3496b072915b0c5ceabd4e05ea5vboxsync false /* fSilent */);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, MountMedium(Bstr("Floppy Controller").raw(),
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(nic, COMSETTER(TraceFile)(Bstr(ValueUnion.psz).raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(nic, COMSETTER(TraceEnabled)(ValueUnion.f));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync /* Parse 'name=value' */
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, SetProperty(bstrName.raw(), bstrValue.raw()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync errorArgument("Invalid --nicproperty%d argument '%s'", GetOptState.uIndex, ValueUnion.psz);
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for --nicproperty%d '%s'\n", GetOptState.uIndex, ValueUnion.psz);
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C970A));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C973));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82540EM));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82543GC));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Virtio));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* VBOX_WITH_VIRTIO */
6c1f3eb64096421b9ba7272f297bac6ff3d29fe7vboxsync errorArgument("Invalid NIC type '%s' specified for NIC %u", ValueUnion.psz, GetOptState.uIndex);
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(nic, COMSETTER(LineSpeed)(ValueUnion.u32));
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync /* Somewhat arbitrary limitation - we can pass a list of up to 4 PCI devices
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync * to the PXE ROM, hence only boot priorities 1-4 are allowed (in addition to
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync * 0 for the default lowest priority).
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync errorArgument("Invalid boot priority '%u' specfied for NIC %u", ValueUnion.u32, GetOptState.uIndex);
f62342e2cc901a67e27fa69c0e712ee35e9c4c68vboxsync CHECK_ERROR(nic, COMSETTER(BootPriority)(ValueUnion.u32));
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync NetworkAdapterPromiscModePolicy_T enmPromiscModePolicy;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync enmPromiscModePolicy = NetworkAdapterPromiscModePolicy_Deny;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync enmPromiscModePolicy = NetworkAdapterPromiscModePolicy_AllowNetwork;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync enmPromiscModePolicy = NetworkAdapterPromiscModePolicy_AllowAll;
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync errorArgument("Unknown promiscuous mode policy '%s'", ValueUnion.psz);
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
b604fbf16eda38d14b4999c245f032bfaa5aa85avboxsync CHECK_ERROR(nic, COMSETTER(PromiscModePolicy)(enmPromiscModePolicy));
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync /* Just remove the bandwidth group. */
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync CHECK_ERROR(machine, COMGETTER(BandwidthControl)(bwCtrl.asOutParam()));
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync CHECK_ERROR(bwCtrl, GetBandwidthGroup(Bstr(ValueUnion.psz).raw(), bwGroup.asOutParam()));
13d1fd6f43e9a245a4f2b4fc6845bdaa5d0f4134vboxsync CHECK_ERROR(nic, COMSETTER(BandwidthGroup)(bwGroup));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Null));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_NAT));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync || !RTStrICmp(ValueUnion.psz, "hostif")) /* backward compatibility */
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Bridged));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Internal));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_HostOnly));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Generic));
4b9a9888c020ed3508c8ac3a5b47842d6aa3f8d2vboxsync CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_NATNetwork));
6c1f3eb64096421b9ba7272f297bac6ff3d29fe7vboxsync errorArgument("Invalid type '%s' specfied for NIC %u", ValueUnion.psz, GetOptState.uIndex);
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(nic, COMSETTER(CableConnected)(ValueUnion.f));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* remove it? */
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(nic, COMSETTER(BridgedInterface)(Bstr().raw()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(BridgedInterface)(Bstr(ValueUnion.psz).raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* remove it? */
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(nic, COMSETTER(HostOnlyInterface)(Bstr().raw()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(HostOnlyInterface)(Bstr(ValueUnion.psz).raw()));
8c58249d7f93d82395aa6c8b31526443892bc375vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync /* remove it? */
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(nic, COMSETTER(InternalNetwork)(Bstr().raw()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(InternalNetwork)(Bstr(ValueUnion.psz).raw()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
aa0553becec2abc2e781f839ba1d399c31c2c07fvboxsync CHECK_ERROR(nic, COMSETTER(GenericDriver)(Bstr(ValueUnion.psz).raw()));
4b9a9888c020ed3508c8ac3a5b47842d6aa3f8d2vboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
4b9a9888c020ed3508c8ac3a5b47842d6aa3f8d2vboxsync CHECK_ERROR(nic, COMSETTER(NATNetwork)(Bstr(ValueUnion.psz).raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(Network)(Bstr(psz).raw()));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(HostIP)(Bstr(ValueUnion.psz).raw()));
fa80a38f04b00afbb167e46c385cf24df0e223ddvboxsync if (*ch == 0) \
fa80a38f04b00afbb167e46c385cf24df0e223ddvboxsync "Missing or Invalid argument to '%s'", \
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, SetNetworkSettings(RTStrToUInt32(strMtu), RTStrToUInt32(strSockSnd), RTStrToUInt32(strSockRcv),
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync RTStrToUInt32(strTcpSnd), RTStrToUInt32(strTcpRcv)));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync /* format name:proto:hostip:hostport:guestip:guestport*/
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync errorArgument("Invalid proto '%s' specfied for NIC %u", ValueUnion.psz, GetOptState.uIndex);
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, AddRedirect(Bstr(strName).raw(), proto,
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync /* delete NAT Rule operation */
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_STRING);
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync return errorSyntax(USAGE_MODIFYVM, "Not enough parameters");
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, RemoveRedirect(Bstr(ValueUnion.psz).raw()));
62a515eec8de1b7804ec6997c0f2013fef5c5a6bvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
794c574111980e7fb3a86847e5495156afa13134vboxsync else if (RTStrNCmp(token, RT_STR_TUPLE("proxyonly")) == 0)
794c574111980e7fb3a86847e5495156afa13134vboxsync else if (RTStrNCmp(token, RT_STR_TUPLE("sameports")) == 0)
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(AliasMode)(aliasMode));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(TFTPPrefix)(Bstr(ValueUnion.psz).raw()));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(TFTPBootFile)(Bstr(ValueUnion.psz).raw()));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(TFTPNextServer)(Bstr(ValueUnion.psz).raw()));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(DNSPassDomain)(ValueUnion.f));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(DNSProxy)(ValueUnion.f));
cebc93936b5bb4d867e1c086dd1b206db33c31dcvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(nic, COMGETTER(NATEngine)(engine.asOutParam()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(engine, COMSETTER(DNSUseHostResolver)(ValueUnion.f));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetNetworkAdapter(GetOptState.uIndex - 1, nic.asOutParam()));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* generate one? */
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(nic, COMSETTER(MACAddress)(Bstr().raw()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(nic, COMSETTER(MACAddress)(Bstr(ValueUnion.psz).raw()));
45e0b20bd50b7124efbbe1cdb1c65d67eb41498avboxsync bool fEnableUsb = false;
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_PS2Mouse));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_USBMouse));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_USBTablet));
a85c47589af3385deccdbb1367b75108806d7cf5vboxsync else if (!RTStrICmp(ValueUnion.psz, "usbmultitouch"))
a85c47589af3385deccdbb1367b75108806d7cf5vboxsync CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_USBMultiTouch));
19cb1f8699e352d590c4946caee33863a5157241vboxsync errorArgument("Invalid type '%s' specfied for pointing device", ValueUnion.psz);
45e0b20bd50b7124efbbe1cdb1c65d67eb41498avboxsync /* Make sure the OHCI controller is enabled. */
7a7a4fb86f66f7ab919948a2ad6aae0483061e18vboxsync rc = machine->GetUSBControllerCountByType(USBControllerType_OHCI, &cOhciCtrls);
bdb01608062958ff140a733533f3d6574886c831vboxsync CHECK_ERROR(machine, AddUSBController(Bstr("OHCI").raw(), USBControllerType_OHCI,
45e0b20bd50b7124efbbe1cdb1c65d67eb41498avboxsync bool fEnableUsb = false;
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(KeyboardHIDType)(KeyboardHIDType_PS2Keyboard));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(KeyboardHIDType)(KeyboardHIDType_USBKeyboard));
19cb1f8699e352d590c4946caee33863a5157241vboxsync errorArgument("Invalid type '%s' specfied for keyboard", ValueUnion.psz);
45e0b20bd50b7124efbbe1cdb1c65d67eb41498avboxsync /* Make sure the OHCI controller is enabled. */
7a7a4fb86f66f7ab919948a2ad6aae0483061e18vboxsync rc = machine->GetUSBControllerCountByType(USBControllerType_OHCI, &cOhciCtrls);
bdb01608062958ff140a733533f3d6574886c831vboxsync CHECK_ERROR(machine, AddUSBController(Bstr("OHCI").raw(), USBControllerType_OHCI,
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_Disconnected));
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_STRING);
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync "Missing or Invalid argument to '%s'",
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz).raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_RawFile));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz).raw()));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostDevice));
1dc37bff2fb26897f5892d8330fe2bc0c9859aecvboxsync CHECK_ERROR_BREAK(machine, GetSerialPort(GetOptState.uIndex - 1, uart.asOutParam()));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable"))
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32) != MODIFYVM_UART;
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync "Missing or Invalid argument to '%s'",
2823fbb1428e982169f04923472d7c94e7ed8385vboxsync return errorArgument("Error parsing UART I/O base '%s'", pszIOBase);
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync CHECK_ERROR_BREAK(machine, GetParallelPort(GetOptState.uIndex - 1, lpt.asOutParam()));
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync CHECK_ERROR(lpt, COMSETTER(Path)(Bstr(ValueUnion.psz).raw()));
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync CHECK_ERROR_BREAK(machine, GetParallelPort(GetOptState.uIndex - 1, lpt.asOutParam()));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable"))
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32) != MODIFYVM_LPT;
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync "Missing or Invalid argument to '%s'",
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync return errorArgument("Error parsing LPT I/O base '%s'", pszIOBase);
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync CHECK_ERROR(machine, COMSETTER(MemoryBalloonSize)(ValueUnion.u32));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync machine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam());
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_SB16));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_AC97));
7ffa227f187f4ff5561da9916c2b7bc949723018vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_HDA));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync errorArgument("Invalid --audiocontroller argument '%s'", ValueUnion.psz);
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync machine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam());
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync /* disable? */
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(false));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WinMM));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* RT_OS_WINDOWS */
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* !RT_OS_LINUX */
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_SolAudio));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* !RT_OS_SOLARIS */
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync#endif /* !RT_OS_FREEBSD */
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_CoreAudio));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync#endif /* !RT_OS_DARWIN */
9055ac3d8c552334b0ef35f0f10783e6d49b41d4vboxsync# if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(VBOX_WITH_SOLARIS_OSS)
ccf574508b96ea0f7dc62b4048f6156c1df160cdvboxsync CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
ccf574508b96ea0f7dc62b4048f6156c1df160cdvboxsync CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync errorArgument("Invalid --audio argument '%s'", ValueUnion.psz);
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "hosttoguest"))
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "guesttohost"))
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "bidirectional"))
d29ab0cfbeef254251f0a2458163034999abb8a0vboxsync errorArgument("Invalid --clipboard argument '%s'", ValueUnion.psz);
6fe1329154975472e055284198df7fa8e64dee3avboxsync CHECK_ERROR(machine, COMSETTER(ClipboardMode)(mode));
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "hosttoguest"))
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "guesttohost"))
8b36957d815c23b479eb35d93ac76c66392e9402vboxsync else if (!RTStrICmp(ValueUnion.psz, "bidirectional"))
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync errorArgument("Invalid --draganddrop argument '%s'", ValueUnion.psz);
2a171646d32f8a15e9820d6fb3bf3f9b9990ca3fvboxsync CHECK_ERROR(machine, COMSETTER(DragAndDropMode)(mode));
fc60d7c6501c5e676e41b11c042d4358d9faa81dvboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
9ca017ceee656f9d33f2cb6652e401b5f17fcfb7vboxsync CHECK_ERROR(vrdeServer, COMSETTER(VRDEExtPack)(bstr.raw()));
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(vrdeServer, COMSETTER(VRDEExtPack)(Bstr().raw()));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync /* Parse 'name=value' */
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, SetVRDEProperty(bstrName.raw(), bstrValue.raw()));
cc74f15083bf80fbc96723a89faa06c15d0dead8vboxsync errorArgument("Invalid --vrdeproperty argument '%s'", ValueUnion.psz);
3933885bc0c2c93436d858a14564c6179ec72872vboxsync RTStrmPrintf(g_pStdErr, "Error: Failed to allocate memory for VRDE property '%s'\n", ValueUnion.psz);
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("TCP/Ports").raw(), Bstr("0").raw()));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("TCP/Ports").raw(), Bstr(ValueUnion.psz).raw()));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("TCP/Address").raw(), Bstr(ValueUnion.psz).raw()));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, COMSETTER(AuthType)(AuthType_Null));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, COMSETTER(AuthType)(AuthType_External));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, COMSETTER(AuthType)(AuthType_Guest));
b8908d384db2324f04a2f68a13e67ea32ebf609avboxsync errorArgument("Invalid --vrdeauthtype argument '%s'", ValueUnion.psz);
6e25221ce8ef8e656d1e15eb7ec5cf8ae758ceb2vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
6e25221ce8ef8e656d1e15eb7ec5cf8ae758ceb2vboxsync CHECK_ERROR(vrdeServer, COMSETTER(AuthLibrary)(bstr.raw()));
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(vrdeServer, COMSETTER(AuthLibrary)(Bstr().raw()));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, COMSETTER(AllowMultiConnection)(ValueUnion.f));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, COMSETTER(ReuseSingleConnection)(ValueUnion.f));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("VideoChannel/Enabled").raw(),
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync ValueUnion.f? Bstr("true").raw(): Bstr("false").raw()));
3933885bc0c2c93436d858a14564c6179ec72872vboxsync vrdeWarningDeprecatedOption("videochannelquality");
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
060f7ec6ae5c99df18341ef2e1f3e91f4b0c89f1vboxsync CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("VideoChannel/Quality").raw(),
3933885bc0c2c93436d858a14564c6179ec72872vboxsync machine->COMGETTER(VRDEServer)(vrdeServer.asOutParam());
3933885bc0c2c93436d858a14564c6179ec72872vboxsync CHECK_ERROR(vrdeServer, COMSETTER(Enabled)(ValueUnion.f));
9601ea695ea96905d6f5d484facd272732365c40vboxsync rc = machine->GetUSBControllerCountByType(USBControllerType_XHCI, &cXhciCtrls);
9601ea695ea96905d6f5d484facd272732365c40vboxsync CHECK_ERROR(machine, AddUSBController(Bstr("XHCI").raw(), USBControllerType_XHCI,
9601ea695ea96905d6f5d484facd272732365c40vboxsync CHECK_ERROR(machine, RemoveUSBController(Bstr("XHCI").raw()));
7a7a4fb86f66f7ab919948a2ad6aae0483061e18vboxsync rc = machine->GetUSBControllerCountByType(USBControllerType_EHCI, &cEhciCtrls);
bdb01608062958ff140a733533f3d6574886c831vboxsync CHECK_ERROR(machine, AddUSBController(Bstr("EHCI").raw(), USBControllerType_EHCI,
bdb01608062958ff140a733533f3d6574886c831vboxsync CHECK_ERROR(machine, RemoveUSBController(Bstr("EHCI").raw()));
7a7a4fb86f66f7ab919948a2ad6aae0483061e18vboxsync rc = machine->GetUSBControllerCountByType(USBControllerType_OHCI, &cOhciCtrls);
bdb01608062958ff140a733533f3d6574886c831vboxsync CHECK_ERROR(machine, AddUSBController(Bstr("OHCI").raw(), USBControllerType_OHCI,
bdb01608062958ff140a733533f3d6574886c831vboxsync CHECK_ERROR(machine, RemoveUSBController(Bstr("OHCI").raw()));
56349fc0a23f96f82208016f8f59f8377bb284b1vboxsync CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(Bstr().raw()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(Bstr(ValueUnion.psz).raw()));
261b44f7fa60a1d4bb4102142d3aa44188908484vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterEnabled)(ValueUnion.f));
6efcf94383d6e48c764c6518cf1b4069ad34e210vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterPort)(ValueUnion.u32));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterAddress)(Bstr(ValueUnion.psz).raw()));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterPassword)(Bstr(ValueUnion.psz).raw()));
94c4b844625733fedcd2b473c207981b31316bd9vboxsync RTEXITCODE rcExit = readPasswordFile(ValueUnion.psz, &password);
94c4b844625733fedcd2b473c207981b31316bd9vboxsync CHECK_ERROR(machine, COMSETTER(TeleporterPassword)(Bstr(password).raw()));
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync CHECK_ERROR(machine, COMSETTER(TracingEnabled)(ValueUnion.f));
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync CHECK_ERROR(machine, COMSETTER(TracingConfig)(Bstr(ValueUnion.psz).raw()));
a9315925c69e4c3bb342bb317ca5b6d29e1ee467vboxsync CHECK_ERROR(machine, COMSETTER(AllowTracingToAccessVM)(ValueUnion.f));
40dce69ff1c2949a489337922f30f1021d62d864vboxsync CHECK_ERROR(machine, COMSETTER(FaultToleranceState(FaultToleranceState_Master)));
40dce69ff1c2949a489337922f30f1021d62d864vboxsync CHECK_ERROR(machine, COMSETTER(FaultToleranceState(FaultToleranceState_Standby)));
40dce69ff1c2949a489337922f30f1021d62d864vboxsync errorArgument("Invalid --faulttolerance argument '%s'", ValueUnion.psz);
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(FaultToleranceAddress)(Bstr(ValueUnion.psz).raw()));
40dce69ff1c2949a489337922f30f1021d62d864vboxsync CHECK_ERROR(machine, COMSETTER(FaultTolerancePort)(ValueUnion.u32));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(FaultTolerancePassword)(Bstr(ValueUnion.psz).raw()));
40dce69ff1c2949a489337922f30f1021d62d864vboxsync CHECK_ERROR(machine, COMSETTER(FaultToleranceSyncInterval)(ValueUnion.u32));
1207f59aa62006952dbb0bf7700decf34d8caeb2vboxsync CHECK_ERROR(machine, COMSETTER(HardwareUUID)(Bstr(ValueUnion.psz).raw()));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(HPETEnabled)(ValueUnion.f));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(IOCacheEnabled)(ValueUnion.f));
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, COMSETTER(IOCacheSize)(ValueUnion.u32));
7a29aa5ce149ccd344a2929d2815b8e212690b92vboxsync CHECK_ERROR(machine, COMSETTER(ChipsetType)(ChipsetType_PIIX3));
7a29aa5ce149ccd344a2929d2815b8e212690b92vboxsync CHECK_ERROR(machine, COMSETTER(ChipsetType)(ChipsetType_ICH9));
e4efe3adcccfda0bcbd5a1f7f9644ce6c323c6f4vboxsync CHECK_ERROR(biosSettings, COMGETTER(IOAPICEnabled)(&fIoApic));
e4efe3adcccfda0bcbd5a1f7f9644ce6c323c6f4vboxsync RTStrmPrintf(g_pStdErr, "*** I/O APIC must be enabled for ICH9, enabling. ***\n");
e4efe3adcccfda0bcbd5a1f7f9644ce6c323c6f4vboxsync CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(TRUE));
7a29aa5ce149ccd344a2929d2815b8e212690b92vboxsync errorArgument("Invalid --chipset argument '%s' (valid: piix3,ich9)", ValueUnion.psz);
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureEnabled)(ValueUnion.f));
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync CHECK_ERROR(machine, COMGETTER(MonitorCount)(&cMonitors));
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync errorArgument("Invalid list of screens specified\n");
48890ac9b4b339e0341e826b5c26ce6408729987vboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureScreens)(ComSafeArrayAsInParam(screens)));
6f1ce0274d766b4a37d6bede42ed83d42edbbe92vboxsync /* empty string will fall through, leaving bstr empty */
6f1ce0274d766b4a37d6bede42ed83d42edbbe92vboxsync int vrc = RTPathAbs(ValueUnion.psz, szVCFileAbs, sizeof(szVCFileAbs));
6f1ce0274d766b4a37d6bede42ed83d42edbbe92vboxsync errorArgument("Cannot convert filename \"%s\" to absolute path\n", ValueUnion.psz);
f57758f0bcf995d350d64a7c059ac93573144c05vboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureFile)(bstr.raw()));
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureWidth)(ValueUnion.u32));
3f00104a87d8a725dfa0348b69cbdac901062a4avboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureHeight)(ValueUnion.u32));
5d57bcb78f1f3f918bd3daf709b551b8c2d30485vboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureRate)(ValueUnion.u32));
94e6c42807255a60e08010231689ef8823733967vboxsync CHECK_ERROR(machine, COMSETTER(VideoCaptureFPS)(ValueUnion.u32));
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync CHECK_ERROR(machine, COMSETTER(AutostartEnabled)(ValueUnion.f));
8c859f9b5248b011cfe07153154fe77ff69d67cevboxsync CHECK_ERROR(machine, COMSETTER(AutostartDelay)(ValueUnion.u32));
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync AutostopType_T enmAutostopType = AutostopType_Disabled;
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync else if (!RTStrICmp(ValueUnion.psz, "acpishutdown"))
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync errorArgument("Invalid --autostop-type argument '%s' (valid: disabled, savestate, poweroff, acpishutdown)", ValueUnion.psz);
45a01ef53b009e9f56ce427bd8688da02ad32389vboxsync CHECK_ERROR(machine, COMSETTER(AutostopType)(enmAutostopType));
a1b4fb3917412d2632d358ff8989f1ec971f2d5bvboxsync iGuestAddr = pAt != NULL ? parsePci(pAt + 1) : iHostAddr;
505ddd00252720bfb5569fcb17bfda53dc141e3bvboxsync errorArgument("Invalid --pciattach argument '%s' (valid: 'HB:HD.HF@GB:GD.GF' or just 'HB:HD.HF')", ValueUnion.psz);
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, AttachHostPCIDevice(iHostAddr, iGuestAddr, TRUE));
505ddd00252720bfb5569fcb17bfda53dc141e3bvboxsync errorArgument("Invalid --pcidetach argument '%s' (valid: 'HB:HD.HF')", ValueUnion.psz);
1cd59fdf671ca60c64d77e3f7046aaecf7003824vboxsync CHECK_ERROR(machine, DetachHostPCIDevice(iHostAddr));
7708252d252a55417a6a817041e4356797e34255vboxsync CHECK_ERROR(machine, COMSETTER(EmulatedUSBCardReaderEnabled)(ValueUnion.f));
7708252d252a55417a6a817041e4356797e34255vboxsync#endif /* VBOX_WITH_USB_CARDREADER */
904810c4c6668233349b025cc58013cb7c11c701vboxsync CHECK_ERROR(machine, COMSETTER(DefaultFrontend)(bstr.raw()));
147e101bcd061b5e085e4a2c0cc9fc35546ff1aavboxsync /* commit changes */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync /* it's important to always close sessions */
71c8a528203c289a8585ce10ac6bafc4274058c6vboxsync#endif /* !VBOX_ONLY_DOCS */