How to make a virtual computer to connect to a CD player with an ISO mounted when you start the virtual machine?

I am the creation of virtual machines using PowerCLI 5.5 on vSphere 5.0; and while the virtual machine is turned off, I am able to mount an ISO on a CD player and change the boot order to boot from the CD-ROM (for another post).  I have the flag startConnected set to true, but am not having much luck getting the virtual machine to connect to the CDDrive

$cdObj = $Vm | New-CDDrive - IsoPath $isoPathName - StartConnected: $true

If ($cdObj - no $null)
{
#Power off VM if it is on
$VmState = $Vm.PowerState

If ($VmState - eq "Receptor")
{
$Vm | Stop-Vm-confirm: $false - ea 0
}

$BootHardDiskName = 'disk 1 '.
$VmView = get - VM $VmName - Server $serverObj.Name | Get-View
$HardDiskDeviceKey = ($VmView.Config.Hardware.Device |) Where-Object {$_.} DeviceInfo.Label - eq $BootHardDiskName}). Key

$BootableHardDisk = new-Object - TypeName VMware.Vim.VirtualMachineBootOptionsBootableDiskDevice - property @{'DeviceKey' = $HardDiskDeviceKey}
$BootableCDRom = new-Object-Type VMware.Vim.VirtualMachineBootOptionsBootableCdromDevice

#Set for CDRom boot order
$BootIso = new-Object VMware.Vim .VirtualMachineConfigSpec - property @ {}
"BootOptions' = New-Object VMware.Vim.VirtualMachineBootOptions - property @ {}
BootOrder = $BootableCDRom
}
}

#Set VM from the start settings at the start of the first CD and forces the display to update (sometimes delayed)
$VmView.ReconfigVM_Task ($BootIso) | out-null
$VmView.UpdateViewData ("Config.BootOptions.BootOrder")

#Power on VM
$Vm | Start-VM-confirm: $false - ea - global 0EV: vmOpsError | out-null

When I start the VM, it does start the ISO.

If I go to vCenter, the CD is pointing to the ISO file, but the 'Connected' to change settings option is not checked;  I can restart the VM of vCenter and then the VM restarts the ISO, but not in the script.

I even put code to add a lead time of 5 to 10 seconds; I restart the virtual machine twice in the script and I can't CD to connect to start the virtual computer.

Appreciate any suggestions.

Maureen

Have you tried to do a

Game-CDDrive - CD $cdObj - connected - confirm: $false

immediately after the start-VM?

Tags: VMware

Similar Questions

  • Computer stops responding with a black screen when you start Windows XP. Cannot select anything advanced startup options

    Original title: can't open Windows
    I can't open my laptop at all... block when I select anything in the mode without failure or screen black normal mode :(
    What should I do? Thank you!!!

    Hi Mihou,

    1 have. what changes you made before the question?

    2. What are the options you see in the advanced startup options?

    You can follow the methods in the article in order to solve the problem.

    Computer stops responding with a black screen when you start Windows XP
    http://support.Microsoft.com/?kbid=314503

    Azeez Nadeem - Microsoft Support [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • Computer stops responding with a black screen when you start Windows Vista

    Computer ceases to respond with a black screen when I run Vista, this happen right after the installation of updates. original title: computer stops responding with a black screen when you start Windows XP__

    If you think that Windows updates are loaded:

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy.  If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

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

  • When you start the computer, the error: "year error occurred in the program during the initialization of the error Code 0 x 80070002.

    Buy HP Pavilion with Windows 7 64 bit.  Migrate some applications and files of old laptop computer with Vista 32-bit.  Most applications migrated work but when I start the new computer, still get this error message: "year error occurred in the program during the initialization of the error Code 0 x 80070002. Once I close the error message box, applications seem to work.  What is a real problem or just a nuisance, I can't ignore?

    original title: Error Code 0 x 80070002

    Hello

    I suggest to start the computer in safe mode and check if the problem persists.

    Start your computer in safe mode:

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    If the problem does not occur in safe mode, and then perform a clean boot.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: Perform step 7 to put the computer to a normal startup.

  • How to make a virtual machine using the full screen?

    I have a 19 '' screen.  In the web page of vm manager when I click on 'console' to get a separate window and maximize that I get a full screen, but the virtual machine does not fill my monitor as the native operating system.

    I am losing valuable real estate.

    Is there a way to fill the screen as the native operating system?  I tried to play with just about anything.  The virtual machine is in a small box, is full from top to bottom but a few inches on each side is black.

    If anyone knows it would be very useful.

    Guest operating system do you use? As said more top vmware tools must be installed for the proper functioning of MKS. Done also by pressing CTRLALTENTER your virtual machine puts your virtual machine mode full screen to use all your "real estate"?

  • How to make an image on a scroll bar navigate to home, contact, etc. - page when you click it?

    IM building a site that I created the contact mode, House, etc. pages already. I also did an image for the homepage slider but I want to access a picture when you click on it to access the home page, but I can't seem to understand. I'm using flash cs4. I want to make a shortcut to different pages on the website

    One way you can do is make the code you showed generic and place it in the main timeline on a layer that spans the length of the timeline where this image clipping will be.

    Have your btnHome work (renamed to be btn below) for all options menu by making it an invisible button that covers the part of the image of the image styll.  Then use a variable for the gotoAndPlay ("selectedPage" below) argument which you reassign in each frame of the scrolling of the image.

    main timeline

    var selectedPage:String = 'Home';  what the starting value must be

    function goToPage(evt:Event):void {}

    gotoAndStop (selectedPage);

    }

    btn.addEventListener (MouseEvent.CLICK, GoToPage);

    Then, inside yor image scroller in each image, you set a new value for the variable selectedPage.

    For example, in the frame 2 you put:

    MovieClip (parent) .selectedPage = "music";

    in part 3 you put:

    MovieClip (parent) .selectedPage = "artist";

    and so on

  • I get a screen when you start the computer.

    Hello

    How are you?

    Recently, my system hung up and had to do a force restart. I get a screen when starting my computer with few options. I have to click ESC several times to get rid of the screen. This was not an option before. When I start my computer it used to start normally. How to get rid of the screen? Please advice.

    Photo I took of my mobile is attached.

    Windows 7

    AMD athlon

    Auto system

    Thank you

    Gershom

    Hi all

    Thank you for the support.

    I solved the problem by unplugging the cable from the hard drive inside the CPU and connected again. All is well now.

    If the system is not the start or make obstruction to the start-up stage, you can try the same thing.

    All the best.

    Thanks again John and Gerry.

    Surya Kumar

  • Get a box to enter the password when you start the computer

    * Original title: turn my computer

    When I start my computer, I get abox asking you the windows xp startup password.  This has never happened before and I don't know the password.

    Hello

    -Have there been recent changes made on the computer before the show?

    I suggest you to check if you can connect to your account or the account of default administrator in safe mode.

    Check out the link for more information on how to enter Safe Mode.

    A description of the start in Windows XP Mode options:
    http://support.Microsoft.com/kb/315222

    a. the built-in Administrator account is disabled by default.

    b. you will see an icon for the administrator on the homescreen mode without failure.

    c. connect you (the password will be a white)

    If you are able to start the computer in safe mode, try to check and restore the system.

    How to restore Windows XP to a previous state

    http://support.Microsoft.com/kb/306084

    Important: System Restore will return all your files non-system as documents, email, music, etc., to a previous state. These files of types are completely affected by the restoration of the system. If it was your intention with this tool to recover a deleted file to non-system, try using a file instead of system restore recovery program.

    Please get back to us with the information above to help you accordingly.

  • 'No operating system found' when you create the new machine virtual de DVD

    Hi, I had problems with the creation of a new machine virtual (Server 2008 R2).  After the initial creation, I turn on - then starts immediately to the network.  I tried to change the boot order in the BIOS and even removed the NIC via Virtual Machine properties.  I built VMs repeatedly using this method.  I use an ISO DVD that I know, I created works.  I select "connect to E:\. "that is my DVD drive on my laptop and have restarted (loses connection every time the DVD player).  I even changed the type of E1000 VMXNET3 network adapter - makes no difference.

    I feel good and truiy perplexed!

    Any ideas?

    You can connect the ISO remote only when the virtual machine is running.

    I suggest you set a delay (or get into the BIOS), in the property of the VM, press ESC during POST to enter the Boot Menu, select CD but wait to confirm.

    Connect the ISO and now start to begin.

    André

  • What is ov4n? When you start the computer, download the message about who and orangevolt 4 - 1.1.1 dll.

    I found this when I went to my "Start" button and went to my computer and it's the first thing under that. It is said ov4n & when I go to open it, it says orangevolt 4 - 1.1.1 dll.  Anyone know what it is? I'm almost afraid to open it but do not want to delete if I need... Help please...

    Hi JackieHoward,

    ·         Have you installed a software recently?

    ·         Have you seen this issue in the menu start earlier?

    ·         What is the operating system installed on the computer?

    Method 1: Check if you find the same in the list of installed programs. If so, try to uninstall it and see if it helps.

    How to change or remove a program in Windows XP

    Uninstall or change a program

    Method 2: You can run the Microsoft Safety Scanner for any infection by virus. Check out the following link to do the same thing.

    Microsoft Safety Scanner - free online tool for PC health and safety

  • Screen BACK up when you start the computer by using Windows XP

    I did a reinstall of my OS to Windows XP.  Now, every time I turn on the computer, or restart, I get the following message appears on a black screen (BACK):

    (I use the quotes to the messages from the computer).

    "Choose the operating system to start".

    "Microsoft Windows XP Home Edition" (this option is highlighted)

    "Microsoft Windows XP Home Edition" (repeated).

    "Use the top and down arrow keys to move the selection of your choice."

    "Press ENTER to choose."

    "Seconds until highlighted choice will begin automatically."  (There's a digital countdown to 25 to zero... and the computer continues normally)

    "For advanced troubleshooting startup options and for Windows, press F8."

    If I press the key "enter", with the first option highlighted, the computer will resume as usual.  But I've never met this before start screen.

    How can I get the computer to restart normally without stopping on this screen?

    Thank you very much for your help!

    Hello

    You format the drive that had Windows XP and reinstall Windows XP on it?

    The following articles may be useful:
    To specify the default operating system for startup
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/sysdm_advancd_startrecover_default_os.mspx?mfr=true

    How to edit the Boot.ini file in Windows XP
    http://support.Microsoft.com/kb/289022

  • We get an Ox7927f22e fatal execution engine error when you start the computer

    We hit OK then get the screen after that application has generated an exception that could not be treated.  Process id = Ox350 (848) wire Ox354 (852)

    Dear Sir

    After the startup of the computer toward the top of the first alert on my page.

    Extraordinary programmer:

    That the error is the result of a corrupt .net Framework installation.

    -Click on the Start button
    -(If you are running Windows XP, click RUN)
    -(If you are not running Windows XP, continue to the next step and start typing)
    -Type Appwiz.CPL
    -Press enter
    -Locate every announcement of Microsoft .net Framework, click it, and then click the uninstall/remove button. Complete uninstallation.
    -Restart the computer
    -Download .net Framework from the following site: http://msdn.microsoft.com/en-us/netframework/cc378097.aspx

    Click on the button download for .net Framework 3.5 SP1 (to the top of the page).
    -Download, save and run this file. Complete the installation and restart your computer.

    Your problem will be solved.

    Please, update me your status if you have any problems or questions.

    If you are satisfied with my help, please click the button I accept and I indeed will receive credit to this site to help you. In any case, I wish you a nice day.

    Thank you

    Kind regards

    Chauvet J.

  • Two error messages when you start the computer.

    First one: dll c./windows/dnt pung.dll not a windows image is valid.

    Second: error loading c/windows/dntpung.dll %1 is not an application valid win 32.

    Time to scan your PC from malware

    http://www.Malwarebytes.org/MBAM.php

    http://www.SUPERAntiSpyware.com/

  • How to make bing my computer as a search engine

    How to make bing my computer as a search engine

    Try changing your search engine. Open the Safari browser. Click the Safari menu at the top / select Preferences. In preferences, click the Search tab, select other than Bing search engine. Also, under the general tab / change the homepage.

  • VShield Configuration Manager 4.1 (and how to protect a virtual machine?)

    I have 2 ESXi hosts currently configured in vCenter 4.1.  Before vShield installation Manager, he had 3 vSwitches present on each server; a regular and two distributed.

    • vSwitch0 - connected to vmnic0 - has management and production of network 1 10.168.90.x

    • VLAN 10.1 - VMFN connected to vmnic1 on each host - connects to the private physical network 10.1.x.x

    • VLAN 10.2 - VMFN connected to vmnic2 on each host - connects to the private physical network 10.2.x.x

    After you install vShield Manager in a new virtual machine and then to deploy vShield Zones to each ESXi host, develops a new vSwitch

    vmservice-vswitch - again group of ports in Virtual Machine vmservice-vshield-pg - not connected to any physical cards

    VMS individual vShield-FW created for each host have connected network cards as below

    • Production network normal 1 - VM Network adapter (attached to vSwitch 0).

    • Production network normal 2 - VM Network adapter (attached to vSwitch 0).

    • Adapter 3 - vmservice-vshield-pg network

    I tried to connect my VMs to the network vmservice-vshield-pg in order

    to protect them and place them behiind the firewall.  However, who has

    seem to work, and my VM has lost network connectivity.

    How to protect a virtual machine that needs to connect to the normal production

    Network (on vSwitch0)?  Is there any configuration steps I'm missing?

    What happens if I want to connect a virtual machine or one of its network cards to one of the 10.1.xx

    or 10.2.x.x networks rather than the normal 10.168.90.x network?  What

    additional steps should I make?  The new 4.1 documentation is not

    helped at all, and it seems that the old vShield Zones 1.0 docs are not

    applies to all.

    There is no need to change the virtual computer is connected to the network.

    Just activate/install vShield zones on your hosts and add rules to the vSwitch or data center.

    The virtual machine will be becomes protected if no error is displayed.

Maybe you are looking for