Bug 453009 - Cannot create new virtual machines in virt-manager
Cannot create new virtual machines in virt-manager
Status: CLOSED DUPLICATE of bug 453488
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-26 11:53 EDT by Casey Dahlin
Modified: 2014-06-18 04:46 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-01 14:44:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virt-manager.log (812.70 KB, application/octet-stream)
2008-06-26 14:37 EDT, Casey Dahlin
no flags Details

  None (edit)
Description Casey Dahlin 2008-06-26 11:53:25 EDT
After attempting to install a virtual machine, I got an error during the OS
installer. I destroyed the VM, deleted the image from /var/lib/libvirt/images,
and tried again. Now I can't click finish in the virtmanager create new virtual
system wizard without getting a "Domain has already been started!" error message
with this backtrace:

Unable to complete install '<type 'exceptions.RuntimeError'> Domain has already
been started!
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 651, in do_install
    dom = guest.start_install(False, meter = meter)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 837, in
start_install
    self.validate_parms()
  File "/usr/lib/python2.5/site-packages/virtinst/FullVirtGuest.py", line 236,
in validate_parms
    Guest.Guest.validate_parms(self)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 951, in
validate_parms
    raise RuntimeError, _("Domain has already been started!")
RuntimeError: Domain has already been started!
'



I'm trying to use qemu-kvm, with a 4GiB file image (which virtmanager
successfully creates) 512MB of ram, 1 vcpu (on a dual core box), default network
settings.

Relevant versions:

Kernel: 2.6.25.3-18.fc9.x86_64
qemu: 0.9.1-5.fc9
libvirt: 0.4.2-3.fc9
virt-manager: 0.5.4-4.fc9

Will see if a reboot solves this. Component is almost certainly wrong, but I
figured I'd start it at the top.
Comment 1 Cole Robinson 2008-06-26 12:30:22 EDT
Destroy doesn't actually delete a VM, it would be more accurately named 'Force
Poweroff'. Did you destroy the vm via the command line or virt-manager? Also the
proper way to delete a VM is either the delete button in the manager window of
virt-manager or use 'virsh undefine'.

So just to be sure, the first install fails, you destroy the vm then delete the
config, the hit finish on the still open install screen?
Comment 2 Casey Dahlin 2008-06-26 13:40:03 EDT
I destroyed the vm, and I deleted the config. Sorry to be unclear.

On reboot, however, the config was back, as well as a new config which libvirt
had claimed to be unsuccessful in creating previously.
Comment 3 Casey Dahlin 2008-06-26 13:46:18 EDT
Ok, it seems what's happening is this: when I click finish, it is in fact
creating the virtual machine, but the new config is not showing up in the list,
the vnc window is not coming up, and (most oddly) the wizard window is not being
closed. Having lost my train of thought during the image creation, I was
thinking there was still another step and clicking finish again, which is where
the error happens.

So the issue is it isn't properly registering when I create a new vm (except for
the first time I do it in a sesssion). Simply closing virt-manager and reopening
it makes things show up again.
Comment 4 Cole Robinson 2008-06-26 14:19:49 EDT
Can you attach ~/.virt-manager/virt-manager.log please? Thanks
Comment 5 Casey Dahlin 2008-06-26 14:37:35 EDT
Created attachment 310359 [details]
virt-manager.log

Here you go.
Comment 6 Cole Robinson 2008-06-26 15:16:13 EDT
Okay, what you are seeing is a result of a couple libvirt bugs, one of which is
fixed upstream but not yet in fedora. Basically if you create a machine, destroy
and delete it, then create another machine with the exact same name, crap hits
the fan. Reason was that there was a leak in the destroy python bindings that
caused libvirt reference counting to go screwy, and the unfixed bug being that
libvirt's hash entries should key on uuid and not name.

The workaround is to change the name of the second guest, or restart
virt-manager in between the two attempts. This is only an issue when using
destroy and creating guests with identical names with a persistent hypervisor
connection (which virt-manager uses)

My guess is the new libvirt release will land in fedora soon which should solve
this issue, so we can keep this bug open till then and make sure it is indeed fixed.
Comment 7 Cole Robinson 2008-12-01 14:44:37 EST

*** This bug has been marked as a duplicate of bug 453488 ***

Note You need to log in before you can comment on or make changes to this bug.