VCO allows you to change the owner of the Virtual Machine

Hello

All the world has discovered a way to change the owner of a virtual computer through vCO?

I can update the IaaS record with the new owner:

//Find the vCAC Owner Object
var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'Users';
var filter = "indexof(UserName,'" + Owner + "') gt -1";
var orderBy = '';
var top = 1;
var skip = 0;
var headers = null;
var select = null;
var entity = vCACEntityManager.readModelEntitiesBySystemQuery(vCACHost.id, modelName, entitySetName, filter, orderBy, select, top, skip, headers);


System.log("User Name - " + entity[0].properties.get("UserName"));




//Setup new links
var links = {
  Owner: entity[0]
}


//Update VM with new Owner Link
var updateProperties = new Properties();
System.getModule("com








ibrary.vcac").updateVCACEntity(vCACHost.id, modelName, "VirtualMachines", vCACEntity.keyString, updateProperties, links, null);

Is anyway to update this information in the COFFEE database as well? The owner of the object of custom resource field is read-only, and there is no method to set the owner.

Thank you

James

After a few trials and investigations... I thought about it. Basically, you must update the link as posted on the virtualmachine entity owner earlier. You then the kickoff of operations workflow 2, UpdateMachineNotes and UpdateMachineOwner.

UpdateMachineNotes updates the VRMOwner field in vsphere, UpdateMachineOwner updates the DB COFFEE (I guess, did not follow it throughout again).

After creating the operation, you must add 2 workflowoperationarguments to identify which virtual machine to run the operation on and the user of the identity for the operation.

The following code executes a UpdateMachineNotes:

//Global Variables
var modelName = 'ManagementModelEntities.svc';
var links = null
var headers = null;

//Create the workflow operation
System.log("Create operation.")
var entitySetName = 'WorkflowOperations';
var properties = {
   OperationName:"UpdateMachineNotes"
};
var operation = vCACEntityManager.createModelEntity(vCACHost.id, modelName, entitySetName, properties, links, headers);

//Setup variables for arugments
var entitySetName = 'WorkflowOperationArguments';
var links = {
  "WorkflowOperation":operation
}

//Create workflow argument 1
System.log("Create argument 1.")
var properties = {
   Name:"VirtualMachineId",
   Value:vCACVM.virtualMachineID.toString()
};
var argEntity1 = vCACEntityManager.createModelEntity(vCACHost.id, modelName, entitySetName, properties, links, headers);

//Create workflow argument 2
System.log("Create argument 2.")
var properties = {
   Name:"IdentityUser",
   Value:Owner
};
var argEntity2 = vCACEntityManager.createModelEntity(vCACHost.id, modelName, entitySetName, properties, links, headers);

The following code executes a UpdateMachineOwner:

var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'WorkflowOperations';
var links = null
var headers = null;

var properties = {
   OperationName:"UpdateMachineOwner"
};
System.log("Create operation.")
var operation = vCACEntityManager.createModelEntity(vCACHost.id, modelName, entitySetName, properties, links, headers);

var entitySetName = 'WorkflowOperationArguments';
var links = {
  "WorkflowOperation":operation
}

System.log("Create argument 1.")
var properties = {
   Name:"VirtualMachineId",
   Value:vCACVM.virtualMachineID.toString()
};
var argEntity1 = vCACEntityManager.createModelEntity(vCACHost.id, modelName, entitySetName, properties, links, headers);

System.log("Create argument 2.")
var properties = {
   Name:"IdentityUser",
   Value:Owner
};

var argEntity2 = vCACEntityManager.createModelEntity(vCACHost.id, modelName, entitySetName, properties, links, headers);

Running an update owner, followed by these 2 operations link, will do exactly the same thing would have operations by clicking "Edit" in the GUI.

-James

Edit: The owner variable, should be in the format of @. vCACVM, is an IaaS VM object. vCACHost is a host of vCAC IaaS.

Tags: VMware

Similar Questions

  • What version of Adobe allows you to change the page on some pages orientaion and save the document with just a few of the tours pages?

    What version of Adobe allows you to change the orientation of the page on some pages and save the document (PDF) with only a few of the tours pages?

    Adobe is the name of the company, not the software as many people say. Since you want to know the exact software, it is important to know that.

    Any version of Acrobat Standard or Acrobat Pro to do this. These are commercial software (a cool weather or subscription).  The free Adobe Reader or Acrobat Reader cannot do this.

    Tip: there are two ways to turn the pages; alone will save him.

  • ESXi 4.0 on Dell 1850 this host doesn't support VT you have configured the virtual machine to use an operating system 64-bit client.

    Hello

    , I have in 3 data centers Dell 1850, identical hardware configurations.  I installed Esxi 4.0 to the ISO from site Web de VMware dell custom help. He is successfully installed on all servers, without error at all. I've updated them all to the last generation, using VMware vSphere Client. I have a problem with one of the server when I want to use 64-bit machines, he realizes: this host does not support VT you have configured the virtual machine to use an operating system 64-bit client.  However, this host is not able to run 64-bit virtual machines or virtual computer has 64-bit support disabled. For more information, see http://www.vmware.com/info?id=152. I don't understand why I got this, servers are identical, versions of BIOS, firmware, and all updates are the same. There is also a warning in the configuration tab, on the State of health link.

    Thanks in advance for any helpful suggestion.

    Yes according to the description of CPU, it seems that they do not support intel VT:

    http://Ark.Intel.com/product.aspx?ID=28016&processor=&spec-codes=SL7DX, SL7HH, SL7PF, SL7TD, SL8KQ

    Please give points for any helpful answer.

  • 2 allows you to change the files that the other has created

    I couldn't come up with search terms to find this answer:

    How can I set up a folder to be shared between 2 users on the same computer running Vista (without sharing on the network)? Specifically, I tried using the Public folder, but each isprevented user to modify files created by the other.  It seems that a file is 'held' by the person who created it, and no one can change it.

    Set the permissions on the files in question (which Yes, you want to keep in Public) to everyone. You can change the owner to users if necessary (and it's perhaps not everyone has permission to read/write to files).

    1. right click on the file or folder and then click Properties.
    2. click on the Security tab.
    3. under group or user names, click your name to see the permissions you have.

    To open a file, you must have the read permission. For more information about permissions, see what are permissions?

    http://tinyurl.com/2j9vgr

    MS - MVP - Elephant Boy computers - don't panic!

  • [Beginner] How to change the virtual machine name

    Hello

    How can I change the name of a Virtual Machine - I want to say the name that appears in VMPlayer (or VMWare Fusion) as it has recently used Virtual Machines. I tried to change the name of the vmx file but this does not affect the name of the virtual machine displayed in VMPlayer.

    Thank you very much.

    TomasBar wrote:

    How can I change the name of a Virtual Machine - I want to say the name that appears in VMPlayer (or VMWare Fusion) as it has recently used Virtual Machines.

    VMware Fusion 3.x and 2.x but not 1.x, you can click on and change the name of the virtual machine in the Virtual Machine library on the right side, just under the display area.

    For VMware Player you need to edit the "displayName ="parameter in the configuration file .vmx and of VMware Player virtual machine must be closed when you perform this operation."

  • How to change the virtual machine after clone

    I'm a beginner to learn vm.

    Now, I already cloned a new existing virtual machine in a virtual machine.

    Then, I want to change it.

    (1) change the name

    (2) change the number of the processor

    (3) change the size of the memory

    (4) change the size of the disk

    How to do?

    I use c# API. I put something when clone?

    Thanks for any help!

    Hello

    You can clone the virtual computer to a model first and then deploy it to this model. For customizing the properties of guest operating system, you can use sysprep (from Microsoft) or customization Spesification Manager (from VMware vCenter Server). Of course, you can also configure it manually change settings menu (from vSphere Client).

  • Not allowed to connect to the virtual machine after archive / installation of the Tiger

    I made an installation of archive / install OS 10.4 as part of the maintenance of the system. Today, VMware does not connect to the virtual machine and wants me to check my right to use the program and its directories.

    I recently bought VM Fusion and bought the license / registered. Something to do with installing the OS, maybe, but everything else works well.

    I don't have reinstall Fusion as part of the installation of archive / install.

    I would say that (this will not affect your VMS) because it is an easy thing to do and should decide on problems of permissions on the application itself.

  • VMware tools allows you to change the ip comments

    Is it possible to invoke the VMware Tools of a VM to change the parameters of intellectual property in the guest in a workflow orchestrator OS?

    Thank you very much.

    Comments script package manager

    Examples of powerShell script scripts manager (change IP and DNS servers addresses comments)

    Examples of batch script scripts manager (Administrator Local and management of DNS records)

  • JavaScript allows you to change the background of a table cell


    After a few hours searching for the answer to this frustrating problem, I have to ask the experts:

    How can I change the background of a table HTML via Javascript? The background is one of the two colors possible, based on a variable which is calculated. The table is a 2 x 3 and each cell will change the background color based on the variable.

    Thank you very much for your help!

    http://www.WebmasterWorld.com/forum91/485.htm

  • JavaScript allows you to change the value of the page element?

    How to use JavaScript to change the value of the page element?
    I can read the value of the page element.

    I can change it by JavaScript?

    Thank you.

    David

    Depends on what is the type of page element - for text/no Select something like:

    function setValue(){
      $x('P1_FIELD').value = 'Oracle';
    }
    

    For a select element, something like this:

    function setSelectValue(){
      html_setSelectValue('P1_SELECT', 'Oracle');
    }
    
  • Satego X 200 crashes on a second if the fan allows you to change the speed

    Hello people,
    my laptop hangs on a second if the fan changes speed. This happens not so often and that since little time.
    Excuse me for my English.

    Thanks in advance

    Laptop freezes for a second? Have you really noticed this? ;)
    I mean a s, it's really a short time and usually something like this shouldn't be noticeable.
    In any case I assume that him hangs for a while (1 sec :)) because the CPU is busy because of some applications and processes that are taking place in the background.

    Sometimes this happens to me also it s nothing unusual

  • Exchange Server allows you to change the password AD

    Hello. Our company uses roaming profiles.  One of our DCs had problems. I had to change a password in Active Directory with the Exchange Server.  This method cause a profile problem?  The error message said something like this: there was a problem opening session with your profile. A temporary profile will be used and no changes will be saved only when you disconnect.

    Thank you.

    Hey ih8mckelvin,

    This question is better suited for the community to the wire to TechNet. Follow this link and post your question re and they should be better suited to help out you. Thank you!
  • Problem with multiple downloads with the router. Allows you to change the TCP MSS value?

    Original title: TCP MSS

    Hi all.

    I currently have a problem with multiple downloads with my current router.  If I have two current downloads at the same time I have no access to all web sites.  It's almost as if the downloads take my meaning of bandwidth there is more nothing for ordinary surfing.

    As a test I put an older router on my system and have a significant improvement in performance.  I have 2 downloads in progress and also surf at the same time.

    To compare two routers, I noticed that the only real difference between the two is that the TCP MSS value is set to '0' on the router of the problem, and then assign him 1392 (MTU - 40) on the router to elderly who gives better performance.

    It is my understanding that this value governs the size of transmitted packets.

    My question is this:

    What is the MSS value which is causing the problem?

    Congratulations in advance.

    Be sure to interpret the values. The '0' means no not literally because the link would not work. It is likely, that it allows the local device set limits for the link. Don't forget that there is a Maximum value and as such can be any value up to such limit as defined by all devices in the path.

    You can try capping manually but it is unlikely that any local limit will come to effect unless you set very low.

  • Muse CC allows you to change the Dreamweaver CC site

    There is no limitation for minor changes, exchanging images and text etc, add new pages using the current formula

    Muse uses a system of closed model and do not directly edit HTML. you have things backwards. The classic approach is to design a site in Muse, publish to HTML, and then soften in DW if needed.

    Mylenium

  • First CS6 pro allows you to change the film in After effects CC?

    I was thinking about buying after effects cc but I wonder if you can still have a good workflow between adobe after effects cc and adobe first pro cs6?

    / Ted

    DL works only between the applications in the same suite.

Maybe you are looking for