Parallel VM creation fails with non-descriptive error

If one user is creating a new VM and another user also tries to create a new VM while the first creation process is still in progress, creation fails with an error:

Creating virtual system with Citrix Xen .. .. creation failed : Failed to create root disk : Failed to attach VDI to host system : Failed to connect VDI d72ae6d4-90d6-43f8-a28f-eb0815bd5d3e to host d273aaa3-0d7a-42db-bbed-dc8d06755736 : A device with the name given already exists on the selected VM device: xvdb

Status: 
Closed (fixed)

Comments

Looks like this can happen due to Cloudmin re-using the same device file on the host system to attach a disk image. I will fix this in the next release ..

Just tested this again with the 6.1-2 build you sent me. Creation succeeded for both of the simultaneous operations, however something strange happened which is a bit worrying. The first VM created without any errors. The 2nd also created, but the password got set to the password from the first VM. Creation log is below.

I say 1st and 2nd because I kicked off the creation process for the 1st one about 20-30 seconds before the 2nd one.

cwtest.ams1-cloudmin.anu.net Copying 363.35 MB image file to host system ams1-xen-0.localdomain .................. .. done Creating virtual system with Citrix Xen .. .. creation started.

Waiting for creation to complete .......................................................................................................................................................................................................................................................... .. creation has completed successfully.

Adding virtual network interfaces .. .. created 1 interfaces

Removing missing disks from fstab file .. .. done

Mounting new instance's filesystem .. .. mounted on /mnt/citrix-fdc911d9-2a4e-7c5b-f9a8-e00513078f49

Setting root password .. .. done

Updating configuration files with hostname and IP address .. .. done

Updating network configuration files .. .. done

Allowing SSH logins by root .. .. already allowed

Setting SSH server port .. .. done

Un-mounting instance's filesystem .. .. done

Adding DNS entry cwtest.ams1-cloudmin.anu.net. for IP address 83.98.160.7 .. .. done

Starting up new Citrix Xen instance .. .. done

Regenerating SSH host keys .. .. failed : Failed to delete /etc/ssh/ssh_host_key : Login failed

Fetching current status .. .. status successfully retrieved (SSH login failed)

Re-fetching current status of host system ams1-xen-0.localdomain .. .. status successfully retrieved (Webmin down)

Enabling system at host boot time .. .. done

Ok, I found another way this could fail :-( It will be fixed in the 6.2 Cloudmin release for sure though!

Automatically closed -- issue fixed for 2 weeks with no activity.