Add additional disks in VM

Hello

I'm working on a workflow that will add disks to an existing virtual computer.  I looked at the default workflow 'Add drive '.  2 entries, I can not understand is diskIndex and scsiBusNumber.  How can I find these numbers?  Is there a way to search for the existing virtual computer, extract the current support information, then increase the diskIndex 1 to create a loop for additional disks?

Any help or point me in the right direction.

Thank you

B

Hello B, give this a try... workflow you mention vCenter is so here:

Entry: vm (VC:VirtualMachine)

Released: diskIndex (number), busNumber (number), data store (VC:Datastore)

The diskIndex returned should be the next available diskIndex. The busNumber is the current busNumber of the disc already in the virtual machine. And the data store is the first store of data referenced by the virtual machine

Code:

scsiControllerKey = -1;
var devices = vm.config.hardware.device;
var bus = null;

if ( devices != null )  {
    for ( device in devices )  {
        if ( devices[device] instanceof VcVirtualBusLogicController || devices[device] instanceof VcVirtualLsiLogicController
        || devices[device] instanceof VcParaVirtualSCSIController || devices[device] instanceof VcVirtualLsiLogicSASController )  {
                scsiControllerKey = devices[device].key;
                bus = devices[device];
                busNumber = devices[device].busNumber;
                //System.log( "SCSI controller found. (Key: " + scsiControllerKey + ")" );
                //System.log(" Bus Number: "+busNumber);
                break;
        }
    }
}

var validNumbers = [0,1,2,3,4,5,6];
var devices = vm.config.hardware.device;
if ( devices != null )  {
     for ( device in devices )  {
          if ( devices[device] instanceof VcVirtualDisk) {
               var u = devices[device].unitNumber;
                for (i in validNumbers) {
                    if (validNumbers[i] == u) {
                        validNumbers.splice(i,1); // Remove number in use
                    }
                }
          }
     }
}
var datastore = vm.datastore[0];
var diskIndex = validNumbers[0];
//System.log("diskIndex: "+diskIndex);

Tags: VMware

Similar Questions

  • PowerEdge R510 - expand RAID5 with additional disks

    Hello

    I have an ESX5 VMWare hypervisor running of PE R510 (embedded) on SDs in the mirror.  We currently have SAS 5 x 146 GB drives in a RAID5 configuration that provides approximately 1.6 gross TB of storage for the VMFS data store.

    I'm trying to understand whether it is possible to add additional disks to this configuration RAID5, so expand the virtual disk, without the need to destroy/loose data in place?  If so, what steps would be to do this?

    Thank you

    Chris

    Yes, it's called Online Capacity Expansion.  You can reconfigure your 5 RAID 5 disks to include more records by adding them to the table.  It is non-destructive and can be done online.  You can use the service reconfigures the software OpenManage for do this, either by adding the VIB ESX or boot from a disk Live OMSA.

    Once you have added the records in the table, you need to resize partitions in ESX.  Also, I think that 5 + uses default TPG, but keep in mind that if it is not the case, then your picture will be limited by ESX 2 TB of usable space.  This would likely only (potentially) be a problem if you have gone to some other version 5.x.

  • Add additional sata disk to pavillion m9400t elite

    Hello, I have a HP Pavilion Elite M9400T desktop computer.  I'm on the disc and you want to add an additional hard drive.  The case of the opening, I found that the two slots of the disc already have records in them.  I also found that SATA0 and SATA2 ports have taken in them and they are attached to the hard drive.  I found that the SATA4 port is empty and this is where I want to connect the additional disk.  I bought a Western Digital Black 2 TB 3.5 hard drive and buy an internal matter for mounting the drive in the empty 5.25 bay under the optical drive.  I also need to buy a SATA cable and adpater cable drive power.  Did I meet problems getting the systΦme can recognize the added disk?  Are there things I should be aware of I have install additional drive?  Thanks for the info.

    The "T" of the HP Pavilion Elite M9400T designates a custom configuration. These can be found here.

    Based on your post, your system has a RAID0 (spans 2 discs) or RAID1 (mirrored), which

    (A) 2 x 500 GB drives in RAID 1 (helpful 500 GB storage capacity)

    (B) 640 (2 x 320) GB, RAID 0

    (C) 1 TB (2 x 500) RAID 0

    So, what's your configuration?

    Add the 3rd disc system is simple, and your logic is correct.  Installation, connection and format.

    The system is 5 years old (readers have a limited duration), you may be eligible to advance the survival rate by installing the new drive as primary and the old records of retirement.

  • HP ENVY laptop laptop 15-as032nr: buy 512 GB SSD laptop. You want to add additional 1 to hard drive. Can it be done?

    Hello

    I bought the HP ENVY 15-as032nr with only 512 GB SSD laptop. I want to add additional 1 to hard drive. Can it be done?

    Yes, you have the 512 m2 NVME PCI - e (lucky) drive gig and that goes into a slot and then there is also a slot open for a standard hard disk 2.5 thumbs or SATA SSD. See pages 30-33 of the manual here:

    Repair manuals

    It is likely that your laptop does not contain the HDD mounting kit and cable as shown on page 30 and 31 and this note is in the Manual:

    The disk spare parts kit hard does not include the rubber hard drive support or cable hard drive. The hard disk rubber support is available using the spare part number 857797-001. The hard drive cable is available by using the spare part number 857806-001

    https://parts.HP.com/hpparts/Search_Results.aspx?mscssid=F5105F025E184DADB5A6F058D84F0A48&SearchIn=PartNumber&SearchPN=857797-001

    https://parts.HP.com/hpparts/Search_Results.aspx?mscssid=F5105F025E184DADB5A6F058D84F0A48&SearchIn=PartNumber&SearchPN=857806-001

    An extra $ 66 for the housing and the cable seems a bit strong, but I couldn't find their sale anywhere other than HP Store.

    This isn't a simple upgrade; If you need assistance.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • Cannot add additional VDMKs for storage

    I'm trying to add additional VMDK for storage.  By guide, added to the disks on the virtual machine for the data - will.  Since the console for data - is connected with root.  The/opt/vmware-hdva-install/bin/zca-expand-lv of command indicates "no new disk found.

    The instructions in the installation space Horizon online guide are very frank and I started on a couple of times.  All sauce secret I'm missing?

    I had to restart the device after you have added the additional disk until the zca-expand-lv command found...

  • Adding additional disk space to Perc 6 / i server R710

    I have currently 3 250 GB installation as a raid 5 (original configuration) disks on a server R710 with a Perc 6 / i controller.  I ordered 3 discs (same readers) that we are running out of disk space. There is a set up disk C: and D:.  Can someone point me to instructions for adding these additional disks for the raid existing (drive D) without having dataloss?

    Thank you

    Gary

    If you don't have that one 'disk' listed in disk management, then you have only a single VD configured, which is good.

    You must install OMSA to broaden your VD. You then insert your new drives, make sure that they show as ready under physical disks, then go to virtual disks and select Reconfigure to your RAID 5. Adding two drives in your RAID 5 will add about 500GB (bit math makes it a little less) to your current Windows 'disk '. After the reconfigure statement, you will have something similar to below. Then, assuming that you do not run 2003, you click on the D: drive and choose Extend to finish with the second photo:

  • can I add additional e-mail addresses to my icloud account

    can I add additional e-mail addresses to my iCloud account or do I need a new account for each address iCloud?

    See here - iCloud: create or modify e-mail aliases

  • How to add additional information to the files of the House

    Is it possible to add additional information to home video and TV shows/movies that I imported my self not that store from iTunes.

    I did some research and it seems that you can use a third-party software to do.

  • I don't know how to add additional devices to my list of "trusted devices" in my Apple account.  When I opened my account on Apple using my apple id, I see only my iphone6 listed as a "trusted device";  There is a button to edit, for example. Delete the d

    I don't know how to add additional devices to my list of "trusted devices" in my Apple account.  When I opened my account on Apple using my apple id, I see only my iphone6 listed as a "trusted device";  There is a button to edit, for example. deleting devices, but I can't, or I do not understand how to add my other devices to my approved devices - but is anyone know how to add my Mac and iPad to this list?

    Download a purchase on a device should associate this device with your Apple ID take a look at this.

    View and delete devices in iTunes - Apple Support

  • ModifyReportEntry add additional data

    Hello to all Experts Teststand,

    I am developing system of automatic test of electronic components.

    I use TestStand 2014 and 2014 LabVIEW. I'm generating the report in XML format using horizontal.xsl to view the report.

    I am trying to add additional data (for example name these 'StepDescription' data) to my report in the body of the report. I found information on how to edit the xsl file to add a new column to the report table (using BeginTable) and set the type of the step to which the present new data (search for "ADD_COLUMN_DATA_" in the file xsl. It is done and works very well.

    Now, I have to add my data to the output XML file so that the xsl can display this data in the new column "StepDescription.

    I use the ModifyReportEntry callback to add my data to the report string. Here are my problems:

    1. I noticed that the ModifyReportEntry callback called any that I ran my sequence. I am generation my report in XML format. In the report option, the box 'Select a report generator to produce report body' was grey, so I can't select the checkbox 'Sequence '. Is this normal? If it is gray out, what should I use (sequence or DLL) to generate the body of the report for the XML output format?

    2. If you can help me solve the problem in 1., then there is another problem, that is, how to record "StepDescription" data to the result database? I ask this because if I use the "additional results" a step to write the data in the database, it will also appear on the report (as attributes of the property). How can I write the data from the database using 'Other results' without him printing again on the report (as data already appears in the column "StepDescription").

    Thanks for your help.

    Yours,

    chati

    As described here, ModifyReportEntry only works for HTML and ASCII reports.

    http://zone.NI.com/reference/en-XX/help/370052N-01/tsfundamentals/infotopics/sequential_model_callba...

    Pulido Technologies LLC

  • Reference Dell studio 1536 gacé graphic / help__i have a computer laptop dell studio and I want to add additional video from my laptop hybrid crossfire support card and I can't find a solution and a graphics card for my notbook

    Ideas:

    • I have a dell studio laptop and I want to add additional video from my laptop hybrid crossfire support card and I can't find a solution and a graphics card for my notbook

    There SR 780 chip and also I could not find any housing emty external or internal to a 3D support
    Help, please

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Hi waheedkhan

    Welcome to the Microsoft Answers Forum!

    To install additional video card for laptop is not possible as desktop, as the video card is integrated with the motherboard. However you can contact Dell technical support if they can provide an additional location for add video card. Here is the link to the support technology guide below: http://support.dell.com

    Thank you, and in what concerns:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can you add additional Google accounts without doing a hard reset?

    I can't add additional accounts of Google. I created another account Google using my PC and I am trying to add from the Menu--> Settings--> accounts--> add--> Google account and by signing then to my new Google account, but it won't let me. It keeps saying "cannot establish a connection of reliable data on the server. I have 3G coverage full where I tried to add the new Google account and tried to add other places as well. I have 'data base' are checked, as well as "Data roaming" within the parameters of the data delivery. I read in another thread that you may need to do a hard reset and then add all your Google represents both. That seems pretty extreme. Are there any other way to add a Google account, once you set up your main Google account days before?


  • Can I add additional USB ports?

    We just bought a pack of PC HP Pavilion p7 1036b.  There is simply not enough USB ports.  Can we add additional ports?

    Hello

    Yes you can, you can buy a USB hub called device such as this. They are many around.

    http://www.pccasegear.com/index.php?Main_Page=product_info&products_id=18565

    (You can buy USB3 now for futuer usage)

    Kind regards.

  • Ability to add additional pages to scan is now gone

    HI -.

    I use all-in-one Officejet 6700 printer. When you scan a document, the HP used to have software overview screen the + and - signs to add additional / remove unwanted scans. Now, the + and - signs are gone. I can't find another way to add additional scans for ongoing work.

    Any help would be greatly appreciated!

    Thank you!

    Ben

    HP Officejet printer, 6700 Premium e-All-in-One - H711n

    Model: CN583A

    Windows 8.1

    HP Envy Sleevebook 6

    Hi @ChicagoVols

    Looks like there is a problem with the software. Because the option to add/remove pages is missing, I feel the best thing to do is to uninstall and reinstall the software.

    Please follow the following steps and let me know the result;

    1. Hold down the Windows Logo key () on the keyboard and the 'R' to open the dialog box run, type %temp%
    2. Delete all files and folders in the temp folder. Choose Skip if all pop ups seem to say all files cannot be deleted
    3. The new software - uninstall the printer software Instructions
    4. Once the uninstall is complete, reboot the computer
    5. Follow these steps to reset the registry settings and options for Windows Installer.
  • Add the disk to the PERC H700 of RAID integrated table 5

    Hi all.

    I have currently a Dell PowerEdge R710 configured with 4 SAS - 2 10 146 k Seagate 2.5 "drives in a Perc h700 integrated Bay RAID-5. I ordered a SAS-2 10 146 k disk Seagate 2.5 "to add to the Bay RAID-5 storage, making it a 5-disc set. What is the best way to add the drive to the RAID-5 array without losing any data? I have OpenManage Server Admin on the server.

    OS: Windows Server 2003 R2 32 BIT

    You can use OMSA... go in storage, PERC, virtual disks and select Reconfigure in the drop-down list of tasks available for your RAID 5.  This will add the disk to your RAID 5, then you will need to adjust the partitions in Windows once it is completed.

Maybe you are looking for

  • How to stop sliding windows between open applications

    There is an irritating scenario whereby windows application open slide and disappear instead of (as I him wish) remaining on the desktop. If anyone can help by telling how to stop this considerable irritation, please? Kind regards Séverine

  • The Gmail screen has very little text. It's barely legible. (Google apps and sites nother) screens are fine

    Run Firefox 17.0 under Windows 7. The size of the text on the screens of GMail is small enough to be almost unreadable. Other applications of Google and other sites in general on Firefox are very good. Gmail on Internet Explorer is also very good. Ho

  • Magic Jack and El Capitan

    Magic Jack has worked well with Yosemite, but when I upgraded, it stopped working.  I took it with the MJ people and they said that they were working on this subject, but it was weeks ago.  Apple will help them recover?

  • help with HP mini 210-1100

    I got a HP Mini 210-1100, it came with Windows 7 starter. I would like to format and install XP... Is it safe to do?I'll be able to use all the functions of the netbook XP as well... (I was wondering cos the netbook CAME with the operating system by

  • How do I do to make the manager class to run the drawFocus method?

    Hello world. Please let me question. I want to have the handler class to do drawFocus. Development is not won if "FOCUSABLE" is specified to the constructor for the handler class. You know the method of the handler class drawFocus method? Moreover, I