Hi,

Trying to create a VM while attaching an existing disk. I can create the VM 
then attach the disk with an additional call, but I thought it should be 
possible to do it in one hit?


My code is

vm = vms_service.add(

    types.Vm(

        name='alma8.7',

        description='AlmaLinux 8.7 CIS Packer image',

        cluster=types.Cluster(

            name='Default',

        ),

        type=types.VmType('server'),

        template=types.Template(

            name='Blank',

        ),

        disk_attachments=[types.DiskAttachment(

            disk=types.Disk(id = "0532e728-a1fb-4ff8-a4f3-0702fc876fce"),

            bootable=True,

            active=True,

            interface=types.DiskInterface.VIRTIO,

        )]

    ),

)





This request returns no error but the disk isn't actually attached to the 
created VM.
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/ULFW36VXPHV4VOTPS7GPODPLK4F75M7I/

Reply via email to