diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-06 03:00:53 +0300 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-07 17:24:35 +0300 |
commit | a366a72d5aab61c75d976647ddd82f145c5ba379 (patch) | |
tree | 97ae8bdc050c3b7c1c1b53d78b9ceec74d930ae5 | |
parent | b8cd56a4c1e3bd314c15294c3683fc6a52cf5729 (diff) |
vm-creator: Don't start the domain twice
This gets rid of the annoying error on the console:
(gnome-boxes:30293): Boxes-WARNING **: libvirt-machine.vala:47: Unable
to start domain: Requested operation is not valid: domain is already
running
https://bugzilla.gnome.org/show_bug.cgi?id=679482
-rw-r--r-- | src/vm-creator.vala | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vm-creator.vala b/src/vm-creator.vala index 7300a04..a3bdcca 100644 --- a/src/vm-creator.vala +++ b/src/vm-creator.vala @@ -49,10 +49,6 @@ private class Boxes.VMCreator { } public void launch_vm (LibvirtMachine machine) throws GLib.Error { - machine.domain.start (0); - - set_post_install_config (machine); - if (!(install_media is UnattendedInstaller) || !(install_media as UnattendedInstaller).express_install) { ulong signal_id = 0; @@ -60,13 +56,16 @@ private class Boxes.VMCreator { if (App.app.ui_state != UIState.COLLECTION) return; - App.app.select_item (machine); + App.app.select_item (machine); // This also starts the domain for us App.app.fullscreen = true; App.app.disconnect (signal_id); return; }); - } + } else + machine.domain.start (0); + + set_post_install_config (machine); state_changed_id = machine.notify["state"].connect (on_machine_state_changed); machine.vm_creator = this; |