vbox: use initFromSettings for construction VM

This commit is contained in:
Alexander Boettcher 2015-07-08 20:45:46 +02:00 committed by Norman Feske
parent 2fe0860ba7
commit dddb536e25
2 changed files with 2 additions and 7 deletions

View File

@ -118,11 +118,7 @@ append_if [expr $use_serial] config {
append config {
<rom name="test.vbox" />
<dir name="VirtualBox VMs">
<dir name="TestVM">
<rom name="test.iso" />
</dir>
</dir>
<rom name="test.iso" />
</vfs>
</libc>
</config>

View File

@ -89,7 +89,6 @@ HRESULT setupmachine()
static com::Utf8Str vm_config(c_vbox_file);
static com::Utf8Str vm_name(c_vbox_vmname);
settings::MachineConfigFile * machine_config = new settings::MachineConfigFile(&vm_config);
/* Machine object */
ComObjPtr<Machine> machine;
@ -103,7 +102,7 @@ HRESULT setupmachine()
if (FAILED(rc))
return rc;
rc = machine->init(virtualbox, vm_name, *machine_config);
rc = machine->initFromSettings(virtualbox, vm_config, nullptr);
if (FAILED(rc))
return rc;