Hi! I''m not sure if that is simple to do, but I thought I''d give it a go here. I''m creating a VM (my-vm) with the xe vm-install command using a template named my-temp. This template has a SR also named my-temp (yeah, that''s dumb). Anyway, when I try to create the VM, the SR name on that VM will be my-temp and not my-vm. Is there a way to, thought the API, create the VM my-vm with its SR named as my-vm and not my-temp? thanks!
Why not just change the name or your SR? with xapi the name is just a description, the UUID is the unique key. ________________________________________ From: xen-users-bounces@lists.xen.org [xen-users-bounces@lists.xen.org] on behalf of Miguel Silva [miguel.silva@feedzai.com] Sent: Thursday, April 19, 2012 9:19 AM To: xen-users@lists.xen.org Subject: [Xen-users] [XEN] API''s vm-install with different storage name Hi! I''m not sure if that is simple to do, but I thought I''d give it a go here. I''m creating a VM (my-vm) with the xe vm-install command using a template named my-temp. This template has a SR also named my-temp (yeah, that''s dumb). Anyway, when I try to create the VM, the SR name on that VM will be my-temp and not my-vm. Is there a way to, thought the API, create the VM my-vm with its SR named as my-vm and not my-temp? thanks! _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Ian Campbell
2012-Apr-23 07:41 UTC
Re: [XEN] API''s vm-install with different storage name
On Thu, 2012-04-19 at 15:19 +0100, Miguel Silva wrote:> Hi! > > I''m not sure if that is simple to do, but I thought I''d give it a go here. > > I''m creating a VM (my-vm) with the xe vm-install command using a > template named my-temp. This template has a SR also named my-temp > (yeah, that''s dumb). > Anyway, when I try to create the VM, the SR name on that VM will be > my-temp and not my-vm. > > Is there a way to, thought the API, create the VM my-vm with its SR > named as my-vm and not my-temp?An SR can contain VDIs (disks) for multiple VMs so there isn''t really a concept of an SR belonging to a VM only of a VMs disks belonging to an SR. If you want them to be the same for some aesthetic reason then you can just change the name as Joseph suggests. Ian.