def create_Snapshot_On_Root_Disk(self, virtual_machine):
        try:
            volumes = Volume.list(self.apiclient,
                                  virtualmachineid=virtual_machine.id,
                                  type='ROOT',
                                  listall=True)
            self.assertEqual(isinstance(volumes, list), True,
                             "Check list response returns a valid list")
            volume = volumes[0]

            cmd = createSnapshot.createSnapshotCmd()
            cmd.volumeid = volume.id
            cmd.account = self.account.name
            cmd.domainid = self.account.domainid
            return cmd
        except Exception as e:
            self.fail('Unable to create new job for snapshot: %s' % e)
    def create_Snapshot_On_Root_Disk(self, virtual_machine):
        try:
            volumes = Volume.list(
                                  self.apiclient,
                                  virtualmachineid=virtual_machine.id,
                                  type='ROOT',
                                  listall=True
                                  )
            self.assertEqual(
                            isinstance(volumes, list),
                            True,
                            "Check list response returns a valid list"
                        )
            volume = volumes[0]

            cmd = createSnapshot.createSnapshotCmd()
            cmd.volumeid = volume.id
            cmd.account = self.account.name
            cmd.domainid = self.account.domainid
            return cmd
        except Exception as e:
            self.fail('Unable to create new job for snapshot: %s' % e)