Why do not the remove-hard drive remove a disc with a new SCSI controller?

Hi PowerCLI gurus,

I try to use PowerCLI to automate the solution for article configuration of disks to use VMware Paravirtual (PVSCSI) SCSI adapters (1010398).

Remove-hard drive sometimes gives me a misleading error when I use it to remove a hard drive with a new SCSI controller.

The FlatHardDisk specified 'Hard disk 3' no longer exists, or never existed.

Can anyone here explain the error?

My version of vCenter server is 5.1.0.

My PowerCLI version is 2.0.

Here's what I've done to reproduce the error.

First of all, I connect to vCenter and stop the virtual machine.

$TestVM = 'TESTVM '.

$TestServer = ' vcenter - test.local ".

SE connect-VIServer-Server $TestServer

Stop-VM - $TestVM VM - confirm: $false

I add a new hard drive and store it in a variable so I can refer to it for the next steps.

New hard drive '.

-VM $TestVM '

-Persistent persistence"

-Flat DiskType '

CapacityKB - 1024'

StorageFormat - thin '

-OutVariable TempDisk

I make a note of its name.

$TempDisk.Name

Because my VM already has 2 discs, the output is "hard drive 3.

Then I add a new SCSI controller on the hard drive.

New SCSI controller.

Hard drive - $TempDisk '

-Type ParaVirtual '

NoSharing - BusSharingMode

Now, I try to remove the hard drive from the variable to remove the disc.

Remove-hard drive - hard drive $TempDisk - DeletePermanently-confirm: $false

It fails with an error that says "Hard drive 3" has already been removed.

Remove HDD: 12/02/2014-18:51:33 remove-hard drive the FlatHardDisk specified 'Hard disk 3' no longer exists, or never existed.

On line: 1 char: 1

+ Delete-hard drive - hard drive $TempDisk - DeletePermanently-confirm: $false

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo: ObjectNotFound: (3:FlatHardDiskImpl drive) [Remove-hard drive], VimException

+ FullyQualifiedErrorId: Client20_VirtualDeviceServiceImpl_TryValidateDeviceExists_DeviceDoesNotExist, VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveHardDisk

But I see that there are still "hard drive 3"!

Get-disk hard - VM $TestVM - name 'hard drive 3.

CapacityGB persistence Filename

----------      -----------                                    --------

0.001 persist... B-DATA-01] TESTVM/TESTVM_9.vmdk

Is this a bug or am I missing something?

I don't think that the cmdlet uses actually the UID, but more likely a MoRef to the vSphere object that represents the hard disk.

Remember that under the covers most of the PowerCLI cmdlets do calls to the vSphere API.

Change the Uid, property value indicates that the hard drive connected to the new controller is a new and different purpose.

And this explains why the hard drive remove does not work with the original hard disk object, it no longer exists.

Tags: VMware

Similar Questions

  • How to transfer files from the old hard drive to a disc new hard, old hard disk has been removed?

    I had a hard disk going bad. Installed a new hard drive and the need to transfer files from the old hard drive. I have an external enclosure for the old hard drive and can connect by usb port.

    The process is fairly simple once you put the old drive in the external box. You can use the usual methods of copy and paste in Windows Explorer. If you copy files, complete folders, you can take a look at RichCopy.

    http://TechNet.Microsoft.com/en-us/magazine/2009.04.UtilitySpotlight.aspx

    Tom Ferguson

  • USB on Samsung detects is not the external hard drive

    I have Samsung Series 9-two usb ports on right are does not detect my external hard drive - he was working, I don't know what happened, and now I can only connect it to the USB port on the left side... Please help

    I call the support Samsung, or review their forums, that what you describe suggests an internal hardware problem (connection), not a victory, one

  • When I deleted a picture of my MacBook, why it also remove the external hard drive?

    So I tried to help my wife to free up space on his MacBook Pro by putting all of his photos on an external hard drive. After iPhoto slide the hard disk and wait 40 minutes so that he could transfer, I wanted to make sure it worked. I ejected the disk and then plugged in. Of course, all iphotos were still there. Just to be sure, I deleted one file in the folder on the computer's iphoto. I went to my shock and horror, the external hard drive, that it has been deleted it too! How is that possible? I've been scouring the Internet trying to retrieve this file with no luck. It was not in the trash. There is a tab "recently deleted". Time machine was not turned on. iCloud shows nothing. I can't download any software, because the computer is completely filled. How is it possible that by deleting this folder on the computer he did also leave the hard drive? AND it has not been saved in the trash? I have used PC, and whenever I need something in return, he was ALWAYS in the trash. And if I deleted something on the computer with an external hard drive connected, it would NEVER be removed from the external hard drive at the same time. I'm so frustrated and feeling SO bad that I deleted a folder with important pictures of our kids. Is that what I can do to recover the pictures? Any help is greatly appreciated.

    You used Time Machine at all? I see you say it was not on, but it never on and is at - it a backup Time Machine on the Macbook Pro?

  • try re-installing CS5 on a new hard drive... I forgot to remove my CS5 on the old hard drive... I have the CD of installation of CS5... I've updated from CS3 and have two serial numbers

    try re-installing CS5 on a new hard drive... I forgot to remove my CS5 on the old hard drive... I have the CD of installation of CS5... I've updated from CS3 and have two serial numbers...

    I use a PC...

    Please check Adobe - Creative Suite 5 Master Collection: System requirements and try to install the product, please let us know if you are unable to activate. You can check: error: "this serial number is not for a product calling it" | CS6 cs5, CS5.5,

    I hope this helps.

  • I've got 4 Lightroom and my hard drive is too full with photos I have in lightroom. I want to move a lot to a USB key and remove them from lightroom. What are the steps to do this please?

    I've got 4 Lightroom and my hard drive is too full with photos I have in lightroom. I want to move a lot to a USB key and remove them from lightroom. What are the steps to do this please?

    I have some listed here videos that will help you with this

    Organization of Lightroom - Lightroom and Photoshop training

    Dave

  • Seagate: the external hard drive is not displayed in my computer

    My seagate external hard drive does not show in my computer and also the Disk Manager but its shown in Device Manager. help out me. I have a lot of data in it.

    Nitesh salvation,

    Thanks for posting your question in the Microsoft Community forums.

    I understand from your description you have posted, that the external hard drive is not recognized by the computer of Windows 8.

    Before you continue with the troubleshooting steps, please answer the questions below.

    (1) have you checked with different ports or different computers?

    (2) remember to make changes before this problem?

    (3) you are able to detect the drive in disk management?

    I suggest to follow the steps below and check if the problem persists.

    Method 1: Run the troubleshooter of material and check out la.

    Follow the steps to run the Troubleshooter:

    (a) press the Windows key + C on your keyboard to show the charms.

    (b) type of Troubleshooting , and then click solving problems under settings.

    (c) now, type Hardware Troubleshooter in the option Search .

    (d) click on hardware store to run the troubleshooter.

    If you are able to detect the drive in disk management, I suggest you to assign a letter.

    Method 2: Assign drive letter:

    The disk management.

    To assign a drive letter if it has not already received, click Add, click the letter you want to use, and then click OK.
    To change a drive letter, click on edit, click on assign the following drive letter, click the letter you want to use and then click OK.

    To remove a drive letter, click on remove and then click Yes to confirm that you want to remove.

    You can also check out the article below and follow the instructions.

    Why isn't Windows does not find my device?

    Hope this information was helpful, if you need help, feel free to post. We will be happy to help you.

  • After Vista update cannot find the external hard drive, AutoPlay does not work, and new unusable disk appears under my computer

    After Vista update cannot find the external hard drive, AutoPlay does not work, and new unusable disk appears under my computer. Also I can't 'manage' my computer because I do not have "permissions". I tried a fix he 45071 and it did nothing.

    Applications, (Norton and McAfee) (including free evaluation versions are notorious for not not upgrade (or uninstalling) itself.) If NIS has been installed for 3 years, you have NIS update at least once and maybe twice (e.g., NIS 2009 > NIS 2010 > NIS 2011).

    [You may want to print these instructions for reference offline. If a step said to reboot, reboot.]

    1. download the Norton Removal Tool, save it to your desktop: ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe

    2. close all open applications (that is, anything with an icon on the taskbar).

    3. After completing some you have a copy of your handy product key, uninstall all Norton software (including LiveUpdate and everything Norton Add ons) viaControl Panel | Programs | Uninstall a program (or Control Panel |) Programs and features, if you are using the classic view).

    4 IMPORTANT! -Online activate Windows Firewall immediately after the restart.

    NB: Now you're "working without a net": no to ANYTHING else online (e.g., navigation, reading e-mail, chat) until you have completed step #7 below!

    5. right click on the file that you saved in step #1 above, and then select run as administrator.  DO TAP not your keyboard until the race ends, then restart.

    6. do a clean install of NIS 2011 (using your product ID, if need be) & reboot. CF. http://www.symantec.com/norton/support/kb/web_view.jsp?wv_type=public_web&docurl=20080514162318EN

    NOTE: Do NOT activate or install additional modules of Norton (for example, Norton Anti-Phishing) immediately.

    7. manually and repeatedly run LiveUpdate (Norton) until you get a prompt "no update more".

    8. open Internet Explorer (only) to http://support.microsoft.com/kb/923737 & run the difficulty.

    9. open Internet Explorer (only) to http://support.microsoft.com/kb/971058 & run that set it by DEFAULT and modes and AGGRESSIVE. [1]

    10. restart once again & test.

    NB: Installation KB971029 disables AutoRun/autoplay on USB connected but not 'brilliant media' external drives (i.e., CDs & DVDs). See http://blogs.technet.com/b/msrc/archive/2011/02/08/deeper-insight-into-the-security-advisory-967940-update.aspx

    ~~~~~~~~~~~~~~~~~~~~~~~~
    [1] full Disclosure: the difficulty operating in AGGRESSIVE mode will remove your update history but not list the updates installed in Add/Remove Programs (Windows XP) or installed updates.

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • HP ProBook s 4540: How can I tell if my laptop has all the spare HARD drive bay or not?

    How can I tell if my laptop has all the spare HARD drive bay or not? I want to use an SSD, but also my HARD drive as secondary.

    @ShohagDr

    This model has only one.

    Your maintenance and Service Guide here.

    http://www.HP.com/CTG/manual/c03758231.PDF

    Laptop HP ProBook s 4540 - videos to remove/replace

    http://h20464.www2.HP.com/results.htm?SID=5229455&MEID=0B16F6F9-A9BB-4275-8FB4-57CCA3816318

    REO

  • HP Pavilion Elite HPE - 580t: SATA HDD recognized and boots with the 2nd HARD drive, but not without

    Hello

    I have a Pavilion HPE - 580t with windows 7 installed.  The original drive (Drive1) has (according to Windows Disk Manager), a 100 MB system partition, a partition of 1 GB operating system and recovery partition.  The drive began to generate disk errors.  I added a second SATA (lecteur2), which has been recognized in the BIOS - it always appears at startup.

    I do not have to implement a system of lecteur2, but re-installed Windows 7 100 MB partition using lecteur2 as boot drive (not a cover), and it works fine, for most.  Reader1 still generates errors and slows down the office, but if I disconnect reader1, lecteur2 is ignored at the start, as the Bureau attempts a network boot.  I have confirmed in Windows OS is the start of the lecteur2, not reader1, but once again, lecteur2 is ignored as boot device if reader1 is not present.  I should add that this was the case when I was reinstalling the OS, I tried unplugging reader1 prior to re - install, but could not do and still access lecteur2.

    I tried to go up during the boot sequence in the Setup (F10), no change.  One additional thing - Setup (F10) is available that when reader1 is connected - F10 key has no effect at startup if reader1 is detached.  F10 Setup runs from the system on Disk1 area?  Any ideas on what I need to do to drop Drive1?

    Thank you

    David

    I can now tell you 2 things on your system.

    (1) the original hard drive is 1.5 TB and that is embedded in the tattoo of HP.

    (2) you cannot use a disk less than 1.5 TB as primary drive.

    Never seen a facility like this scheme start between readers.  The only way I see on this perdictament is to remove the 1 TB drive and let the process of recovery of re - install the operating system. Then immediately clone the original on a new disk of 1.5 or 2 t. Attention to not exceed 2 TB. Seagate and WD has a free program for Disk Wizard for cloning option.

  • Cloning hard drive with Clonezilla failed, gave a bad sector error message and now the original hard drive will not boot

    Original title: startup problem

    I tried cloning from my hard drive with Clonezilla, and he gave me a bad sector error.  I have since run the hard drive test in bios and it passed.  Anyway, clone has failed, and now the original hard drive will not boot.  My dvd player won't turn when I try to load the Vista repair CD (Vista Home Premium 32 bit).  Clonezilla removes the start settings for the original disc?  And if so, how can I restore it?  The computer starts just a black screen with a cursor at the top left.  When I install the hard drive in a box and connect it to another computer, it shows the partitions and files all seem to be there.

    Hi DougEisenmann,

    Clonezilla is not supported by Microsoft.

    If you are unable to boot from the Vista repair disk then you will need to go into the system BIOS and make sure that it is configured to boot from the DVD drive.

    Check out the link:

    Windows to boot from a CD or DVD

    http://Windows.Microsoft.com/en-us/Windows-Vista/Start-Windows-from-a-CD-or-DVD

    BIOS: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/BIOS-frequently-asked-questions

    Important: Change the BIOS (Basic input output system) / Semiconductor (CMOS) to complementary metal oxide settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

    See also the thread which has some troubleshooting steps for this same issue.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-system/Windows-Vista-crashedstartup-repair-wont-launch/49315171-1601-49DD-84fe-50bebd9ddbae

    The above link contains third party links provided by other users.

    Note: The use of third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer

  • Updated the motherboard, processor and RAM and upgraded to Windows 7 Ultimate 64 bit, after upgrade the external hard drive encrypted with bitlocker will not enter the password.

    Original title: bitllocker Windows 7 issue

    Hello

    I recently updated my motherboard, processor and RAM, but I kept my original 500 GB hard drive, and equipped with a hard drive 2 TB extra, after the upgrade, I downloaded windows 7 ultimate 64-bit. After the upgrade I plugged my external hard drive (which has all my stuff important on it, that is to say the photo, video etc.) to realize that I had he encrypted with bitlocker on my old sysem. It allows Me to enter my password, it looks for a USB flash drive key, I did not. My question is:

    Can I replace my old system with the old motherboard, hard drive and the original RAM to remove the external hard drive for bitlocker?

    I still have the file windows.old on my hard drive, I have to restore it and remove the most recent version of windows 7 off the drive. I do this before I rebuild my old PC? I'm stuck here and would not lose all my photos (the wife would kill me!) I would appreciate your help.

    Hello

    Reassembly of the old computer won't help. You will always need the key to open the Bitlocker.

    You can read the articles and check:

    What is the difference between BitLocker Drive encryption and EFS file system?

    Protect your files using BitLocker Drive encryption

    In Windows 7 BitLocker Drive Encryption: frequently asked Questions

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

  • I have a problem with the external hard drive not detected on the computer as a disk.

    I connected an external hard drive toshiba via USB on this victory 8 x 64 computer that is also a toshiba and the computer doesn't show as a reader in fact it shows that he as a device so what gives. This thing have not even a letter such as C: (what internal hard drive) I watch the little arrow to show you, it is prudent to remove it so it appears here, what does I have a drive bad ext or what? Oh yes, I have tried all my ports even

    Hello

    I suggest you to assign a drive letter for the external hard drive and see if it helps.

    To do:

    a. press the Windows key + R and type diskmgmt.msc.

    (b) if the hard drive recognized in disk management and if there is no drive letter assigned, I suggest you do a right click on the drive and assign a drive letter and check if it helps.

    c. right click paths and the drive letter Change.

    Do one of the following:

    ·         To assign a drive letter if it has not already received, click Add, click the letter you want to use and then click onOK.

    ·         To change a drive letter, click change, click on assign the following drive letter, click the letter you want to use and then click on OK.

    d. restart the computer and check.

    Hope that the external hard drive will not be detected after that.

    Please report if you encounter any problems related to Windows and we will be happy to help you.

  • Lightroom does not recognize the external hard drive?

    When I try to import files from anywhere - my office, or a SD - card in Lightroom 4 or now 6 (updated just to see if it would help), Lightroom is the photo file in what I would call an external hard drive of ghost. It creates a second external hard drive file that seems to be a copy of the original. A few weeks ago, the name of external hard drives has been accidentally changed or partially erased when I backup my hard drive without supervision in Time Machine. I'm working on an iMac with OS 10.11.4. At that time there Lightroom could not find any of my files of course! So, I renamed with much attention the hard drive exactly the same original name and Lightroom everything very well - recognized except, I started having this problem of import. When I import a file of the photo, he put it in an external hard drive of Ghost with the same name, size and number of files. If I try to move the file to the real external hard drive where it is supposed to go, Lightroom told me that the file already exists in Lightroom. If I look in my external drive outside of Lightroom, the file is where it is supposed to be. I tried just 'Add' the file to Lightroom, rather than copy or move, and that's okay. I tried to re-pointing Lightroom on your drive. Does not work. The only way I can get the files to go where I want they is to import, then highlight the recently imported file and move it to the folder of the mother. So, I have to move the file into the folder of the mother in the subfolder and then delete the now empty ghost the disk folder manually hard phantom. Help! Is there a way to merge the external hard drive with his ghost (or duplicate)? I can't find anything in the forums or documentation, and when I tried to call tech support, I came across a brick wall which is very frustrating. They said I couldn't get help by phone, I have to use the forums. So, please, let me know what I can try.

    Hello Deborah

    Seems to me this is probably a problem of conflict with the readers in your catalog and LR is confusing where to put images and creates a clone instead. You have to work smart to get rid of the clone disk keeping the images with the same folder structure. If it's a long process, however, I'll try to be as simple as I could.

    To do a test at White folder on the drive itself out of Lightroom that must be maintained at the same place where the main images folder (main folder means - the very first folder under your player in your catalogue which should include all subfolders on the disc itself), then put a picture in the test folder and import it. the test folder will be part of the new drive of clone in catalog you would then move the main folder of the Original disc to the Clone drive in your catalog. Once you are done with the displacement of all the structures of folders in the test under drive clone folder. The original drive that was not identified by Lightroom would be gone if this isn't the case you can remove it manually and this is how you would leave with single drive with all your files/images existing and if you try to import the images now. They would go directly in the same destination folder that you choose on the screen to import instead of going in any drive clone/ghost.

    Thanks Deborah for bringing This issue to our view. And I amso glad I was able to solve this problem for you on call.

  • My mac does not detect my hard drive after the upgrade. How to solve this problem?

    My mac does not detect my hard drive after upgrading to Mac OS Sierra. How to solve this problem?

    Please provide more detailed information. You can read write an effective communities of Apple support question. Maybe you could open disk utility and take a screen snap so that we can see what you see.

    To post a screenshot

    1. Press command + shift + 4, that will change the cursor to the line of sight.
    2. Hold down the mouse button and the collimator allows you to select the part of the screen you want to capture.
    3. Release the mouse button and the image will be saved on your desktop.
    4. Click on the camera icon in the toolbar of the message forum Editor.
    5. Drag the image on the button select a file and click the Insert button.

Maybe you are looking for