Vm cloning: unable to set default gw

Hi guys,.

the more time I spend on this troubleshooting problem more I think this is a bug.

I tried 2 different ways (new-vm and clonevm_task) of cloning a vm and I can not put the default gateway on my virtual machine.

My script was shortened and only shows the central part where I have problems. Default gateway shows the empty, but only on Windows Server 2008 Enterprise Edition x 86 and x 64. I tried to reinstall the operating system, but it makes no difference. Defining works of gateway by default on other Windows operating systems.

I rewrote the script to create a model of customization and it seems fine. And when I clone manually in the GUI I can make it work!

I have exactly the same problem when using the clonevm_task and the parameter ip in this way:

$vmcSpec
.Customization.NicSettingMap[0].Adapter.Ip.IpAddress = $ip $vmcSpec
.Customization.NicSettingMap[0].Adapter.SubnetMask = $subnetmask $vmcSpec
.Customization.NicSettingMap[0].Adapter.Gateway = $gateway $vmcSpec
.Customization.NicSettingMap[0].Adapter.DnsServerList = $dns



My script:

$vmname = "server1" $ip = "192.168.1.2" 

$subnetmask = "255.255.255.0" 

$gateway = "192.168.1.1" 

$dns = "192.168.0.1","192.168.0.2" 

$vmtemplate = "w2k8-ent-x86" 

$vmesxhost = "ESX1" 

$datastore = "LUN1" 

$notes = "PowerCLI cloning test" 


$CustSpec = New-OSCustomizationSpec -Name $vmname ` 

     -FullName 'Something' ` 
     -OrgName 'Something' ` 
     -OSType 'Windows' ` 
     -ChangeSID ` 
     -ProductKey "aaaaa-bbbbb-ccccc-ddddd-eeeee" ` 
     -AutoLogonCount 1 ` 
     -Type 'Persistent' ` 
     -AdminPassword "secret" ` 
     -TimeZone 105 ` 
     -Workgroup 'workgroup' ` 
     -LicenseMode 'PerSeat' 

Get-OSCustomizationSpec $custspec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIp -IpAddress $ip -SubnetMask $subnetmask -DefaultGateway $gateway -Dns $dns 

$task = New-VM -Template $vmtemplate -VMHost $vmesxhost -Name $vmname -Datastore $datastore -Description $notes -OSCustomizationSpec $custspec




Can anyone confirm if this is a bug? I put all a time between this question so now I want to know if I am against the impossible here

Thank you

Kim

Take a look at KB1016878.

The bypass of this Ko road may solve your problem?

Tags: VMware

Similar Questions

  • When you try to set default values, Explorer stops

    trying to set wmp as default. When I click on set as default I get explore stopped

    trying to set wmp as default. When I click on set as default I get explore stopped

    Suggestion:
    Run a file system check... sfc/scannow
    After sfc is done, at the end of the screen, it will say either (and I paraphrase)...
    No violation of the intergrety, or
    Found some files corrupted but unable to trouble.

    First see if you can set default this time.
    If this isn't the case, please post the resullt of the verification of the file system.

    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Cannot set default printer

    Installed the new wireless printer that 2540 Deskjet can print to Word but not Excel or Live Mail on Windows 7 and unable to by default.

    Have removed all other print devices

    Hi Arri,.

    Thank you for this error code. I used to find a potential solution. Here is a link to a third-party site that gives you detailed instructions on setting a registry entry that causes the problem. Let me know how it goes.

    Thank you

  • HP Envy 7640: Unable to set the scanning resolution

    Have been unable to set the resolution of scan during the scanning of the glass in a computer file (pdf, jpg). Guide the user to the HP page 47 7640 said: "● If you want to adjust the size of the scan, output type, scan resolution, or file type and so on, start scan from the software of the printer."
    ● To avoid all scanned text wrong or missing, make sure that the brightness is set properly the
    software.
    ● If you want to scan a document with several pages in a single file instead of several files, run it
    Scanner with the software of the printer instead of the sweep of the screen of the printer".

    First of all, where is the "printer software" to start the scan?

    Have tried all this. When I opened the series HP Envy 7640 (network): Assistant of HP printer, I click on "Scan the Document or Photo a" place in the scanning area. No scan dialog box never opens. Actually I tried to reinstall the printer driver. No change. Always impossible to get a scan dialog box. In addition, when I go in the start menu and the title of the series 7600 HP: HP envy, I click on the HP Scan icon. After a long wait, a dialog box appears that says: "Cannot communicate with Scanner", and it offers a few options. The first is to activate the device (printer), and then on; the second, control cables (its wireless operation); the third: try the software "fix." Happy to report that after stopping then on and running assistant printer again, this time by pressing the "scan a Photo Document' results in the appearance of a dialog box to make the changes that I've been looking for.

  • How to set default COPY for HP Officejet 6500 has more quality DRAFT?

    How can I set default COPY quality to the PROJECT for HP Officejet 6500 has more?

    Hello

    Press on copy on the front panel of the printer, then press the settings button.

    Quality faucet and quick selection / project.

    Press on set as the new default settings, and then click Yes to confirm the changes.

    Later draft quality will be used for the copy unless any other quality is selected.

    Kind regards

    Shlomi

  • Unable to set server 2012 without the protocol driver LLDP Microsoft network adapter. I have searched the driver but had no chance. My question is where is it located on the CD-ROM of the 2012 Server

    Unable to set server 2012 without the protocol driver LLDP Microsoft network adapter. I have searched the driver but had no chance. My question is where is it located on the CD-ROM of the 2012 Server? I use the version standard edition. Thanks for any advice.

    Thank you all.

    John Hayes

    Hello

    The question you posted would be better supported in the TechNet Forums. I suggest you to ask your question in the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en-us/categories/

    Thank you

  • Server Windows 2008 R2 Standard - TrustedInstaller owner of C:\ Drive - unable to set new owner

    I have a new Windows 2008 R2 Standard Server.  The original question started with W32Time won't start do not, but I think that it comes to this issue.  When I look at the 'owner' of the C:\ drive it shows "TrustedInstaller" as long as the current owner.  When I try to replace the owner of the server administrator account, I get this error:

    Unable to set new owner the disk Local (c).  Access is denied.

    Any ideas?

    Hello, Chris Prerno,.

    Microsoft Answers is for consumer issues on Windows XP, Windows Vista, Windows 7 and Windows 8 Preview Release. As you question deals with Windows Server 2008, there is a specific forum for this OS on TechNet.

    Please click on the link below and repost your question.
    http://social.technet.Microsoft.com/forums/en-us/winserverGP/threads

    Thank you

  • NO Audio: its stopped at night seems to be still unable to set device driver problem

    NO Audio: its stopped at night seems to be a problem of device driver, I can see the triangle of error w/yellow icon still unable to fix it please help

    There is no sound in any part laptop have only checked all devices, there is a device with a sign of error, still unable to set device driver or installation/change/do anything necessary for that driver of device/question - I seeks good at it don't know even know what this driver particular East-cant detect a name he didn't y no info re : change of name/install/dates, not really sure if she was there before-said msg also problem with dvd rom which seems to be related to this driver i don't have not installed/added the other cr discs only those who are in the laptop that doesn't work properly in playback of CD etc. - everything was beautiful 6/7-the next day after what seems like overnight or Pluss of updates etc. , something that's happened and cause a Legion of erros that I knew not until I went to play the audio and no sound - under display devices I see all the icons fax printers etc. on the laptop with my name icon, it has this error yellow triangle-i tried everything myself as well as all assistance web/pc I could find all recongnizes wht he is still unable to fix/solution... more than 20 years and this never happened before all its volumn etc is active and running it is certainly only one device - please help me I need to have sound for audio files and business that I must lead on this as soon as possible, thank you

    Hello

    ·         What version of the operating system is installed on the computer?

    ·         You get the error message?

    ·         Did you do changes on the laptop before the show?

    Follow the steps in the article.

    Tips for solving common audio problems

    No sound in Windows

    For reference:

    Sound cards: frequently asked questions

  • I am unable to access the Windows XP updates and unable to set up the automatic update. I have not given an error code. I was only told I can't perform these functions.

    I am unable to access the Windows XP updates and unable to set up the automatic update.  I have not given an error code.  I was only told I can't perform these functions.  I don't have the windows disk that the computer came preloaded with Windows and I don't remember the Administor password I created 5 years ago.  Can anyone help?

    Assume that:

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

    You receive an error message 'Administrators' only when you try to visit the Windows Update Web site or the Microsoft Update Web site

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

    Microsoft's strategy concerning lost or forgotten passwords

    What I can offer: http://support.microsoft.com/kb/321305

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

  • How can I set default values to set the Mode in the config of the AO?

    Hi, how can I set default values to allocate mode in the config of the AO. To be precise, in the attached vi, I need to set the Mode allocate in the AO Config to ' use FIFO memory (6) ' if the value inside the structure of my case is false and 'no change (0)' if the value inside the strusture case is true.

    Create two constants for Mode allocate input (right click > create > constant). A place in the real case of the structure of the case and place it in the case of false. Their son in the same tunnel (border of the structure of the case), then the tunnel of wire to the pole to allocate the AO Config Mode. I do not have traditional DAQ installed, but who should do it.

  • Cannot set default printer in Windows Vista.

    Hello
    My computer still works fine until lately something's happened to Windows Vista all of a sudden. One day I put on the computer and found that the left side of the menu 'start' all deleted, and the content on the right side of the Panel is still there. But then I found that I cannot print a document PDF and Excel, and the error message reads: "Before you print a document, you must install a printer." I have a HP Color laser printer connected to it since and it still works well. I can always print Word document (unless I have to manually select HP printer each time the dialog box I have ever had to do before), but cannot print PDF or Excel. On the 'control panel', the HP printer icon is still there, but it is not set as default printer, as it has always been. And when I tried to set up as a default printer, the error message reads: "can't set default printer.

    Can anyone help? Thank you very much.

    I would like to begin uninstalling the printer, restart and reinstall the printer to determine if that solves the problem...

  • Cannot set default printer. Error code 0 x 0000709

    Printer Deskjet HP3510 instaled on Hp laptop running windows 7. Cannot set default printer. Error code 0 x 0000709. Removing software and old computer

    tgwright,

    Thanks for the additional info. With the doctor print and scan does not locate a corrupted software/driver problems its time to turn to the operating system itself. Others who have had similar problems with the same error indicate a corrupted registry key, the origin of the problem:
    http://goo.GL/t94JG

    http://goo.GL/uejgi

    Beware these solutions indicate the change of information in registry (very dangerous if you don't know what you're doing). If you are not familiar with the registry or have never been here before that I would suggest seeking additional support in some way (local / Microsoft IT / PC repair service, etc.).

    Good luck!

  • Unable to set the transparency of the taskbar to laptop with windows 7.

    Original title: Please read my problem and give a solution as soon as possible.

    HII all... I'm unable to set the transparency of a taskbar for laptop with windows7 operating system? He demonstrated a tab to find out "trouble shoot problem and sero effects transparency" and shortly after clicking the laptop turns on the screen several times...

    Hi Mary,

    We need additional information to help you with the problem of transparency, please answer the following.

    1. which antivirus app do you use?

    2. do you use wired or wireless Internet?

    3. What is the brand and model of the computer?

    If the graphics card and driver were installed after that Windows 7 was first set up, depending on the manufacturer, you may need to update the computer performance index, which will automatically enable Aero. I suggest update you the display update driver and check the status of the issue.

    Update a hardware driver that is not working properly.

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    If the problem still exists; Keep the computer in a clean boot, run the Aero Troubleshooter and check the status of the issue.

    Guided Help: the problems of Aero in Windows 7.

    http://support.Microsoft.com/kb/976170?WA=wsignin1.0

    I hope this helps.

  • Error when you try to set the Parental control 'Unable to set settings for administrators user or unknown users.

    I am trying to set up Parental controls for the user account of my son and I get the following error: error when you try to set the Parental control 'Unable to set settings for administrators user or unknown users.

    I tried to use the administrator account.

    When I ran the System File Check sfc/scannow

    TI completed indicating certain files may be damaged and cannot be repaired and check the convertible bonds. LOG file.

    How can I know which files are corrupted.

    Any other Suggestions on how to fix this user profile?  Do I have a profile that I don't know?

    Hi wimuggss,
     
    Step 1: Disable UAC (User Account Control) and check the result
    See How can I change the behavior of user account control by using the cursor?
    Note: You must restart your computer when you enable or disable UAC. Change levels of notification does not require that you restart your computer.
     
    Important: Enable UAC after you complete the steps.
     
    Step 2: If the problem persists, try to set the parental control in safe mode and check the result. If you are able to apply settings in safe mode, this means that some program is causing this problem, mainly the security software.
    See Start your computer in safe mode
    Kind regards
    Syed - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.
  • Unable to set usage, only allowed 1%. When you click OK ' could not ask for the parameters for the reason next 0x8007007b '.

    Windows 7 Home Premium (64-bit) Service Pack one.  Unable to set usage, only allowed 1%. When you click OK or apply. Get error message» Could not apply the settings for the following reason: the syntax of label file name, directory or volume is incorrect (0x8007007b).

    Original title: System Restore

    Hello

    You did changes to the computer, before the show?

    The error 0x8007007B occurs when the system is configured to store the restore on a wrong path or location points

    Follow these steps and check.

    a. click Start, type sysdm.cpl and press enter.

    b. click on the System Protection tab.

    c. automatic restore points, deselect any location invalid or duplicate.

    d. click on check the C: drive with the Windows Logo.

    e. click apply , and then click on Ok.

Maybe you are looking for