Skip to main content
Solved

Removing client from subclient (not working) and commands execution log


Forum|alt.badge.img+2

Hello,

I am trying to remove a client from subclient (PowerShell), and it works in most of cases, however I came across with a strange case when automation just does not work, for no reason (the target client stays in the subclient)

I tried to use both methods I know:

Remove-CVVirtualMachine and qoperation execute

both with “error code: 0” on exit 😐

Also, I would deeply appreciate if anyone share the info under witch module in “process manager > logging” commands execution log can be found

Best answer by Alexey Tesov

In case someone else having the same issue, here is the answer to a question “how to remove a client from subclient

I solve it by using: qoperation execute -af $xml_path

here is an VERY important fragment of XML request

...

<vmContent>
            <children equalsOrNotEquals="1" displayName="$target" type="$client_type" name="$client_hash" />
</vmContent>

 

where $client_hash is strGUID of target client and $client_type is integer. I was not able to find anywhere in CV documentation that name parameter is critical for deleting clients with type 9 -- “Virtual Machine” 😑

Here is the full XML block:

$xmltemplate =@"
<?xml version='1.0' encoding='UTF-8'?>
<App_UpdateSubClientPropertiesRequest>
    <association>
        <entity appName="Virtual Server" instanceName="VMware" backupsetName="$BackupsetName"  clientName="$VCenterName" subclientName="$SubclientName" />
    </association>
    <subClientProperties>
        <vmContentOperationType>DELETE</vmContentOperationType>
        <vmContent>
            <children equalsOrNotEquals="1" displayName="$target" type="$client_type" name="$client_hash" />
        </vmContent>
    </subClientProperties>
</App_UpdateSubClientPropertiesRequest>
"@

 

 

 

View original
Did this answer your question?

2 replies

Forum|alt.badge.img+2

Oki, I found the logs:

qcommand
qscript
qsdk

however deletion still not working  


Forum|alt.badge.img+2
  • Author
  • Byte
  • 7 replies
  • Answer
  • August 22, 2024

In case someone else having the same issue, here is the answer to a question “how to remove a client from subclient

I solve it by using: qoperation execute -af $xml_path

here is an VERY important fragment of XML request

...

<vmContent>
            <children equalsOrNotEquals="1" displayName="$target" type="$client_type" name="$client_hash" />
</vmContent>

 

where $client_hash is strGUID of target client and $client_type is integer. I was not able to find anywhere in CV documentation that name parameter is critical for deleting clients with type 9 -- “Virtual Machine” 😑

Here is the full XML block:

$xmltemplate =@"
<?xml version='1.0' encoding='UTF-8'?>
<App_UpdateSubClientPropertiesRequest>
    <association>
        <entity appName="Virtual Server" instanceName="VMware" backupsetName="$BackupsetName"  clientName="$VCenterName" subclientName="$SubclientName" />
    </association>
    <subClientProperties>
        <vmContentOperationType>DELETE</vmContentOperationType>
        <vmContent>
            <children equalsOrNotEquals="1" displayName="$target" type="$client_type" name="$client_hash" />
        </vmContent>
    </subClientProperties>
</App_UpdateSubClientPropertiesRequest>
"@

 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings