1 Reply Latest reply: May 9, 2014 1:25 AM by budachst RSS

    Delete clone via CLI doesn't delete the virtual disks

    juan.araya

      Already i have a mini farm of OVM 3.2. For backup porpuses i make an simple script who create a clone of an existing VM, then it copy the clone's virtual disks to my backup drive (NFS mount) and finally deletes the clone. All this are made by OVM CLI commands but today when i look in the repository can see it is full of Virtual Disks, a lot more of the ones that my VM uses.

       

      I think that only thing that could cause this amount of virtual disks (img files) would be the "handmade" backup process. And that are failing because when i delete the clone (via CLI) it doesn't delete the virtual disks. It's diferent if i try to delete a clone VM via OVMM because it asks me if i want to delete the virtual disks too.

       

      Anyone can confirm if it's this happen in your environment too? Theres any way to force a delete via CLI to include the virtual disks too?

       

      Thanks.

        • 1. Re: Delete clone via CLI doesn't delete the virtual disks
          budachst

          Can it be, that using -F with ovm_vmcrontrol is what you'd need to do?

           

          [root@oraclevmm ~]# ovm_vmcontrol -h

          Oracle VM VM Control utility 0.6.4.

          The Oracle VM VM Control utility allows the user to send

          simple control commands to a Virtual Machine

          Arguments :

              -u [user name] Oracle VM Manager admin username (required)

              -p [password] admin password (required)

              -h [hostname] Oracle VM Manager hostname (required)

              -X use secure (ssl) connection to port 54322

              -v [vm name] virtual machine name

              -U [vm UUID] virtual machine UUID

              -c [command] console command (required)

                 [start, stop, suspend, resume, status, restart, kill, info, lock, list, migrate, events, vcpuset, vcpuget, gettags, settags, fixcfg, delete, setoncrash, getoncrash]

              -t [target] target server name (in conjunction with -c migrate)

              -s [cpulist] comma separated cpu thread list(in conjunction with -c vcpuset)

              -T [taglist] comma separated tags list (in conjunction with -c settags

              -A acknowledge events (in conjunction with -c events

              -F force delete virtual disks (in conjunction with -c delete

              -C on_crash setting : [preserve, restart] (in conjunction with -c getoncrash)

           

          So, a ovm_vmcontrol -c delete -F ....  should remove the associated vdisks as well.