I want to create a virtual machine from scratch in ESX but I can't figure out how to create the disks - the vmdk files. Any hints on how that can be done or even if it's possible at all ? Thanks
Dear Paul, Depending on how you want to create them, qemu-img tool might be what you're looking for. It can create empty vmdk disk images: qemu-img create -f vmdk ... Cheers, On 04/01/2015 06:25 PM, Paul Apostolescu wrote:> I want to create a virtual machine from scratch in ESX but I can't figure > out how to create the disks - the vmdk files. Any hints on how that can be > done or even if it's possible at all ? > > Thanks > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >-- Pierre Schweitzer <pierre@reactos.org> System & Network Administrator Senior Kernel Developer ReactOS Deutschland e.V.
On 04/01/2015 07:25 PM, Paul Apostolescu wrote:> I want to create a virtual machine from scratch in ESXMay be https://communities.vmware.com/community/vmtn/vsphere/content?filterID=contentstatus[published]~objecttype~objecttype[thread]
I can create vms using the vSphere API, I was interested if it's possible to programmatically create and start (i.e. without calling external tools) using libvirt only. On Wed, Apr 1, 2015 at 12:42 PM Mihamina Rakotomandimby < mihamina.rakotomandimby@rktmb.org> wrote:> On 04/01/2015 07:25 PM, Paul Apostolescu wrote: > > I want to create a virtual machine from scratch in ESX > May be > https://communities.vmware.com/community/vmtn/vsphere/content?filterID> contentstatus[published]~objecttype~objecttype[thread] > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >
I need to disk files to be created and allocated so I can start the vm - the vm itself will be PXE booted. I can programmatically create the domain however it fails to start because the disk files are not there. Thanks On Wed, Apr 1, 2015 at 12:35 PM Pierre Schweitzer <pierre@reactos.org> wrote:> Dear Paul, > > Depending on how you want to create them, qemu-img tool might be what > you're looking for. It can create empty vmdk disk images: qemu-img > create -f vmdk ... > > Cheers, > > On 04/01/2015 06:25 PM, Paul Apostolescu wrote: > > I want to create a virtual machine from scratch in ESX but I can't figure > > out how to create the disks - the vmdk files. Any hints on how that can > be > > done or even if it's possible at all ? > > > > Thanks > > > > > > > > _______________________________________________ > > libvirt-users mailing list > > libvirt-users@redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-users > > > > > -- > Pierre Schweitzer <pierre@reactos.org> > System & Network Administrator > Senior Kernel Developer > ReactOS Deutschland e.V. > >
2015-04-01 18:25 GMT+02:00 Paul Apostolescu <apbogdan@gmail.com>:> I want to create a virtual machine from scratch in ESX but I can't figure > out how to create the disks - the vmdk files. Any hints on how that can be > done or even if it's possible at all ?You can use the following virsh command: vol-create-as --pool ds --name test/disk.vmdk --capacity 10737418240 This will create a 10 GB VMDK image named test/disk.vmdk in the datastore ds. You need to replace ds with the actual name of a datastore on your ESX server. You can get a list of the available datastores with the virsh command pool-list. -- Matthias Bolte http://photron.blogspot.com
Thanks, that works perfectly ! On Wed, Apr 1, 2015 at 2:46 PM Matthias Bolte <matthias.bolte@googlemail.com> wrote:> 2015-04-01 18:25 GMT+02:00 Paul Apostolescu <apbogdan@gmail.com>: > > I want to create a virtual machine from scratch in ESX but I can't figure > > out how to create the disks - the vmdk files. Any hints on how that can > be > > done or even if it's possible at all ? > > You can use the following virsh command: > > vol-create-as --pool ds --name test/disk.vmdk --capacity 10737418240 > > This will create a 10 GB VMDK image named test/disk.vmdk in the > datastore ds. You need to replace ds with the actual name of a > datastore on your ESX server. You can get a list of the available > datastores with the virsh command pool-list. > > -- > Matthias Bolte > http://photron.blogspot.com >