[Users] Related to extend disk size of existing virtual machine !

Hello, To add a disk to VM we use the following : api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]), size=512*MB, # type_='system', - disk type is deprecated status=None, interface='virtio', format='cow', sparse=True, bootable=True)) but the type_ attribute is deprecated , so I got the following exception : Failed to add disk status: 400 reason: Bad Request detail: Cannot add Virtual Machine Disk. Disk 1 already marked as system Now , if I try giving disk_type='Data' on GUI of RHEVM then it will be added to VM. I want to know from which ovirt-sdk version you have deprecated attribute disk_type ? I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I didn't find type_ attribute using this rpm ! How I can extend the disk size of a existing VM in RHEVM ? Help me ! Regards , Romil Gupta

----- Original Message -----
From: "Romil Gupta" <romilgupta19@gmail.com> To: users@ovirt.org, "Michael Pasternak" <mpastern@redhat.com>, "Eli Mesika" <emesika@redhat.com> Sent: Wednesday, November 21, 2012 8:19:25 AM Subject: [Users] Related to extend disk size of existing virtual machine !
Hello,
To add a disk to VM we use the following :
api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]), size=512*MB, # type_='system', - disk type is deprecated status=None, interface='virtio', format='cow', sparse=True, bootable=True))
but the type_ attribute is deprecated , so I got the following exception :
Failed to add disk
status: 400 reason: Bad Request detail: Cannot add Virtual Machine Disk. Disk 1 already marked as system
Now , if I try giving disk_type='Data' on GUI of RHEVM then it will be added to VM.
I want to know from which ovirt-sdk version you have deprecated attribute disk_type ?
According to the changelog, it was done in 3.1.0.3-1. * Mon Jun 25 2012 Michael Pasternak <mpastern@redhat.com> - 3.1.0.3-1 ... - to Disk type added provisioned_size property and removed /type/ (not supported in 3.1) ... What's the ovirt engine version you're working with?
I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I didn't find type_ attribute using this rpm !
How I can extend the disk size of a existing VM in RHEVM ?
There is currently no way to extend an existing disk.
Help me !
Regards , Romil Gupta
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

I m using RHEM 3.0 as a GUI and ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpmfor writting python script ! I have one existing VM in RHEVM3.0 that I have created using Template( memory 2GB , virtual disk = 10 GB ) in RHEVM 3.0 Now , I want to increase the virtual disk size upto 60 GB of VM . How I can do that ??? Regards, Romil On Wed, Nov 21, 2012 at 12:02 PM, Oved Ourfalli <ovedo@redhat.com> wrote:
----- Original Message -----
From: "Romil Gupta" <romilgupta19@gmail.com> To: users@ovirt.org, "Michael Pasternak" <mpastern@redhat.com>, "Eli Mesika" <emesika@redhat.com> Sent: Wednesday, November 21, 2012 8:19:25 AM Subject: [Users] Related to extend disk size of existing virtual machine !
Hello,
To add a disk to VM we use the following :
api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]),
size=512*MB, # type_='system', - disk type is deprecated status=None, interface='virtio', format='cow', sparse=True, bootable=True))
but the type_ attribute is deprecated , so I got the following exception :
Failed to add disk
status: 400 reason: Bad Request detail: Cannot add Virtual Machine Disk. Disk 1 already marked as system
Now , if I try giving disk_type='Data' on GUI of RHEVM then it will be added to VM.
I want to know from which ovirt-sdk version you have deprecated attribute disk_type ?
According to the changelog, it was done in 3.1.0.3-1.
* Mon Jun 25 2012 Michael Pasternak <mpastern@redhat.com> - 3.1.0.3-1 ... - to Disk type added provisioned_size property and removed /type/ (not supported in 3.1) ...
What's the ovirt engine version you're working with?
I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I didn't find type_ attribute using this rpm !
How I can extend the disk size of a existing VM in RHEVM ?
There is currently no way to extend an existing disk.
Help me !
Regards , Romil Gupta
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- I don't wish to be everything to everyone, but I would like to be something to someone.

----- Original Message -----
From: "Romil Gupta" <romilgupta19@gmail.com> To: "Oved Ourfalli" <ovedo@redhat.com> Cc: users@ovirt.org Sent: Wednesday, November 21, 2012 9:17:31 AM Subject: Re: [Users] Related to extend disk size of existing virtual machine !
I m using RHEM 3.0 as a GUI and ovirt-engine-sdk-3.1.0.3-1. el6.noarch.rpm for writting python script !
I have one existing VM in RHEVM3.0 that I have created using Template( memory 2GB , virtual disk = 10 GB ) in RHEVM 3.0 Now , I want to increase the virtual disk size upto 60 GB of VM . How I can do that ???
Due to the fact you're working with an older engine version, I'd suggest you install an older version of the ovirt-sdk RPM, that still contains this argument, and then you'll hopefully be able to add another disk.
Regards, Romil
On Wed, Nov 21, 2012 at 12:02 PM, Oved Ourfalli < ovedo@redhat.com > wrote:
----- Original Message -----
From: "Romil Gupta" < romilgupta19@gmail.com > To: users@ovirt.org , "Michael Pasternak" < mpastern@redhat.com >, "Eli Mesika" < emesika@redhat.com > Sent: Wednesday, November 21, 2012 8:19:25 AM Subject: [Users] Related to extend disk size of existing virtual machine !
Hello,
To add a disk to VM we use the following :
api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]), size=512*MB, # type_='system', - disk type is deprecated status=None, interface='virtio', format='cow', sparse=True, bootable=True))
but the type_ attribute is deprecated , so I got the following exception :
Failed to add disk
status: 400 reason: Bad Request detail: Cannot add Virtual Machine Disk. Disk 1 already marked as system
Now , if I try giving disk_type='Data' on GUI of RHEVM then it will be added to VM.
I want to know from which ovirt-sdk version you have deprecated attribute disk_type ?
According to the changelog, it was done in 3.1.0.3-1.
* Mon Jun 25 2012 Michael Pasternak < mpastern@redhat.com > - 3.1.0.3-1 ... - to Disk type added provisioned_size property and removed /type/ (not supported in 3.1) ...
What's the ovirt engine version you're working with?
I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I didn't find type_ attribute using this rpm !
How I can extend the disk size of a existing VM in RHEVM ?
There is currently no way to extend an existing disk.
Help me !
Regards , Romil Gupta
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- I don't wish to be everything to everyone, but I would like to be something to someone.
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 11/21/2012 09:21 AM, Oved Ourfalli wrote:
----- Original Message -----
From: "Romil Gupta" <romilgupta19@gmail.com> To: "Oved Ourfalli" <ovedo@redhat.com> Cc: users@ovirt.org Sent: Wednesday, November 21, 2012 9:17:31 AM Subject: Re: [Users] Related to extend disk size of existing virtual machine !
I m using RHEM 3.0 as a GUI and ovirt-engine-sdk-3.1.0.3-1. el6.noarch.rpm for writting python script !
I have one existing VM in RHEVM3.0 that I have created using Template( memory 2GB , virtual disk = 10 GB ) in RHEVM 3.0 Now , I want to increase the virtual disk size upto 60 GB of VM . How I can do that ???
Due to the fact you're working with an older engine version, I'd suggest you install an older version of the ovirt-sdk RPM, that still contains this argument, and then you'll hopefully be able to add another disk.
all versions of sdk should be backward compatible, .3 had bug (absence of 'type' attribute in api) -- Michael Pasternak RedHat, ENG-Virtualization R&D

Romil, On 11/21/2012 09:17 AM, Romil Gupta wrote:
I m using RHEM 3.0 as a GUI and ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpmfor writting python script !
I have one existing VM in RHEVM3.0 that I have created using Template( memory 2GB , virtual disk = 10 GB ) in RHEVM 3.0 Now , I want to increase the virtual disk size upto 60 GB of VM . How I can do that ???
Not sure it's supported, Ayal?
Regards, Romil
On Wed, Nov 21, 2012 at 12:02 PM, Oved Ourfalli <ovedo@redhat.com <mailto:ovedo@redhat.com>> wrote:
----- Original Message ----- > From: "Romil Gupta" <romilgupta19@gmail.com <mailto:romilgupta19@gmail.com>> > To: users@ovirt.org <mailto:users@ovirt.org>, "Michael Pasternak" <mpastern@redhat.com <mailto:mpastern@redhat.com>>, "Eli Mesika" <emesika@redhat.com <mailto:emesika@redhat.com>> > Sent: Wednesday, November 21, 2012 8:19:25 AM > Subject: [Users] Related to extend disk size of existing virtual machine ! > > > Hello, > > > To add a disk to VM we use the following : > > > api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]), > size=512*MB, # > type_='system', - > disk type is > deprecated > status=None, > interface='virtio', > format='cow', > sparse=True, > bootable=True)) > > but the type_ attribute is deprecated , so I got the following > exception : > > > > Failed to add disk > > > status: 400 > reason: Bad Request > detail: Cannot add Virtual Machine Disk. Disk 1 already marked as > system > > > Now , if I try giving disk_type='Data' on GUI of RHEVM then it will > be added to VM. > > > > > I want to know from which ovirt-sdk version you have deprecated > attribute disk_type ? > According to the changelog, it was done in 3.1.0.3-1.
* Mon Jun 25 2012 Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com>> - 3.1.0.3-1 ... - to Disk type added provisioned_size property and removed /type/ (not supported in 3.1) ...
What's the ovirt engine version you're working with?
> > I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I > didn't find type_ attribute using this rpm ! > > > How I can extend the disk size of a existing VM in RHEVM ? > There is currently no way to extend an existing disk.
> > Help me ! > > > > > > > > > Regards , > Romil Gupta > > > > _______________________________________________ > Users mailing list > Users@ovirt.org <mailto:Users@ovirt.org> > http://lists.ovirt.org/mailman/listinfo/users >
-- I don't wish to be everything to everyone, but I would like to be something to someone.
-- Michael Pasternak RedHat, ENG-Virtualization R&D

On 11/21/2012 08:19 AM, Romil Gupta wrote:
Hello,
To add a disk to VM we use the following :
api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]), size=512*MB, # type_='system', - disk type is deprecated status=None, interface='virtio', format='cow', sparse=True, bootable=True))
but the type_ attribute is deprecated , so I got the following exception :
Failed to add disk
status: 400 reason: Bad Request detail: Cannot add Virtual Machine Disk. Disk 1 already marked as system
Now , if I try giving disk_type='Data' on GUI of RHEVM then it will be added to VM.
I want to know from which ovirt-sdk version you have deprecated attribute disk_type ?
I am currently using ovirt-engine-sdk-3.1.0.3-1.el6.noarch.rpm and I didn't find type_ attribute using this rpm !
deprecated != removed, we had a bug in version that you're using, it was fixed in one of the following releases, please upgrade to latest sdk.
How I can extend the disk size of a existing VM in RHEVM ?
Help me !
Regards , Romil Gupta
-- Michael Pasternak RedHat, ENG-Virtualization R&D
participants (3)
-
Michael Pasternak
-
Oved Ourfalli
-
Romil Gupta