Error trying to clone a virtual machine
Hello
I'm trying to use the vsphere api 5.0 to clone a virtual machine that was created in the web client.
Here is my XML SOAP message:
<? XML version = "1.0" encoding = "UTF-8"? >
" < SOAP-SOAP ENV:Envelope - ENV:encodingStyle = ' http://schemas.xmlsoap.org/SOAP/encoding/ "xmlns:SOAP - ENV =" " http://schemas.xmlsoap.org/SOAP/envelope/ "container =" " http://www.w3.org/2001/XMLSchema "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "xmlns:SOAP - ENC =" " http://schemas.xmlsoap.org/SOAP/encoding/ ">
< SOAP - ENV:Body >
< CloneVM_Task xmlns = "urn: vim25" >
< _this type = 'VirtualMachine' > vm-xxxxx < / _this >
< folder > datacenter-xxxxx < / case >
< name > clone-test-1 < / name >
< spec >
< location >
store of data <>data store - xxxxx < / datastore >
resgroup-xxxxx < pool > < / pool >
< / location >
false < template > < / template >
false < powerOn > < / powerOn >
< / spec >
< / CloneVM_Task >
< / SOAP - ENV:Body >
< / SOAP - ENV:Envelope >
but I get the error "the application refers to an unexpected or unknown type".
Here is the entire response in a table:
{Array (15)}
'key' = >
String(11) "task-xxxxxxx".
"task" = >
String(11) "task-xxxxxxx".
'name' = >
(12) a string "CloneVM_Task".
'descriptionId' = >
(20) a string "VirtualMachine.clone".
'entity' = >
String (8) "vm-xxxxx".
"entityName" = >
(8) a string 'xxxxxx '.
'State' = >
String(5) "error".
'cancelled' = >
String(5) "false."
'Cancel' = >
(4) a string 'true '.
'error' = >
{Array (2)}
'fault' = >
{Array (1)}
"argument" = >
(22) a string "ManagedObjectReference".
}
'localizedMessage' = >
String (52) "request refers to an unexpected or unknown type."
}
'reason' = >
{Array (1)}
'userName' = >
String (10) "myusername".
}
'queueTime' = >
(26) string "xxxx".
"startTime" = >
(27) string "xxxx".
'completeTime' = >
(26) string "xxxx".
'eventChainId' = >
String (7) 'xxxxxxx '.
}
Thanks in advance for any help, it will be greatly appreciated!
Yes, login and vcenter.
Thanks for trying to help, but I managed to solve it. It turns out that it was
1. I was providing the setting wrong folder (should have been the result of FindByInventoryPath('your_data_center_name/vm') instead of FindByInventoryPath ('your_data_center_name')
2. I didn't need to provide anything inside the 'location' parameter, it comes to be present
Thank you again and hope that the above comments help someone else trying to do the same thing
Tags: VMware
Similar Questions
-
Error trying to deploy a virtual machine from a template
Hello everyone,
We went from ESX 3.5 U4 and VC 2.0 to vSphere 4 and ESX 4.0. In VI 3 deployment of virtual machines in models worked fine without any errors. Now, I have the problem that I can't deploy virtual machines from templates more. I upgraded VMWare tools on each machine for vSphere 4. But whenever I try to deploy a VM from a template I get the following error: "number of virtual devices exceeds the maximum for a given controller. This happens only when I go to the option "Change the virtual hardware (experimental)" and by changing the virtual network to another local VIRTUAL network adapter (in my case from INTERNAL to VLAN21) before you deploy. When I'm not changing the network card virtual, all works well.
I have been through a few KB and some discussion of the community, but those who are almost for vmware converter.
Could you please help me?
Thanks in advance for any answers.
Mirco79
Convert virtual machine model.
Modify the virtual machine settings.
Choose a network suitable for model (it shows probably no name)
Convert virtual machine model
Try to deploy new virtual machine model to see if it works again correctly.
StarWind Software R & D
-
Clone the virtual machine to the local data store
Hi all
I'm looking to automate a task daily (or almost) of my friends with a small script with powercli.
I'm trying to "backup" or to clone a virtual machine, I work in a storage of one of our servers.
The servers are managed by a 5.1 vCenter and the machine is on a shared storage.
From time to time, I clean, stop the machine, remove all snapshots and clone the virtual machine to one of the local server as a backup storage. So I put together a small script which almost works. It works as long as the target data store is a shared storage, but not with a local storage.
I get always an error that claims it can not access the local data store and is not a permissions problem...
Given that I can accomplish this via the customer without problem I thought it is possible via powercli too, or I'm wrong?
My Script up to now:
# Variables$VC = "vc.domain.com" #vCenter Server$User = "domain\user" #User$Pass = 'test123' #User PW$VMName = 'scripttest' #VM$BackupSuffix = "backup" #Suffix to add the name of VM to mark this as a backup$VmHost = "esx2.domain.com".$Datastore = 'ESX2-LocalData' #Datastore$BackupFolder = 'Backup' #Folder the VM gets classified# Register cmdlets to VMware
If (-not (Get-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue)) {}
Add-PSSnapin VMware.VimAutomation.Core
}
# Connect to the server
SE connect-ViServer $VC - user $User-password $Pass
# Remove the old clone
$OldBackups = get - VM | WHERE {$_.} {Name: corresponds to '$VMName - $BackupSuffix'}
If ($OldBackups - don't "")
{
If ($OldBackups.Count - gt 1)
{
Write-Host "better check! "Found several results:
Foreach ($VM to $OldBackups)
{
Write-Host $VM. Name
}
}
on the other
{
Remove-VM - VM $OldBackups - DeleteFromDisk-confirm: $false
}
}
# Clone VM
$VMInfo = get - VM $VMName | Get-View
$CloneSpec = new-Object Vmware.Vim.VirtualMachineCloneSpec
$CloneSpec.Snapshot = $VMInfo.Snapshot.CurrentSnaphshot
$CloneSpec.Location = new-Object Vmware.Vim.VirtualMachineRelocateSpec
$CloneSpec.Location.Datastore = (get-Datastore-name $Datastore |) Get - View). MoRef
$CloneSpec.Location.Transform = [Vmware.Vim.VirtualMachineRelocateTransformation]: sparse
$CloneFolder = $VMInfo.Parent
$CloneName = "$VMName - $BackupSuffix".
$TaskCloneID = $VMInfo.CloneVM_Task ($CloneFolder, $CloneName, $CloneSpec)
# Check if the task is completed
$Check = $false
While ($Check - eq $false)
{
$Tasks = get-job | Select State, id | Where {$_.} State - eq "Running" - and $_. State - eq "pending"}
ForEach ($Task in $Tasks)
{
If ($Task.id - eq $TaskCloneID)
{$Check = $false}
on the other
{$Check = $true}
}
Start-Sleep 10
}
# Move clone to the backup folder
Move-VM - VM '$VMName - $BackupSuffix' - Destination $BackupFolder
# Disconnect
Disconnect-VIServer-confirm: $false
Can you show us the complete error message you get?
BTW, the clone step can be replaced by the New-VM cmdlet with the setting of the virtual machine.
-
Oracle Jdeveloper error on Oracle Bigdata Lite Virtual Machine
Hi all
I use large data Oracle lite virtual machine from the following link: Oracle Big Data VM Lite.
I'm trying to practice the tutorial on the following link: http://www.oracle.com/technetwork/topics/bigdata/articles/intro-to-oracle-nosql-db-hol-1937059.pdf.
When I try to run the MoviePlex project in Oracle Jdeveloper, who in turn calls Weblogic server and triggers the following error during the creation of the Weblogic domain:
[Waiting for the field to complete the construction...]
[08: 41:11] Creation of integrated Weblogic domain...
[08: 41:39] integrated Weblogic domain completed successfully.
Using the 7101 port *.
/ Home/Oracle /. JDeveloper/system11.1.1.6.38.61.92/defaultdomain/bin/startWebLogic.sh
[waiting for the server to complete its initialization...]
.
.
Arguments of memory in JAVA:-Xms512m-Xmx512m
.
Start mode of WLS = development
.
CLASSPATH=/u01/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/Middleware/patch_jdev1111/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/latest/lib/tools.jar:/u01/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/u01/Middleware/wlserver_10.3/server/lib/weblogic.jar:/u01/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/u01/Middleware/wlserver_10.3/server/lib/webservices.jar:/u01/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u01/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/u01/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/ U01/middleware/wlserver_10.3/server/lib/XQRL.jar::/U01/connectors/OLH/jlib/*:/usr/lib/Hadoop/*:/usr/lib/Hadoop/client/*:/U01/NoSQL/kV-EE/lib/kvstore.jar:.
.
Unrecognized option:-jrockit
PATH=/u01/Middleware/wlserver_10.3/server/bin:/u01/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/java/latest/jre/bin:/usr/java/latest/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib64/R/bin:/u01/Middleware/jdeveloper/jdev/bin:/usr/java/latest/bin:/home/oracle/bin:/u01/app/oracle/product/12.1.0/dbhome_1/bin:/home/oracle/scripts:/opt/bin:/home/oracle/bin
.
***************************************************
* To start WebLogic Server, use a username and *.
* password assigned to an administrator-level user. For *.
* server administration, using the WebLogic Server *.
* console in http://hostname/ReportServer: port/console *
***************************************************
from weblogic with the Java version:
WLS starting with line:
jrockit - /usr/java/latest/bin/Java-Xms512m-Xmx512m-Dweblogic.Name=DefaultServer-Djava.security.policy=/u01/Middleware/wlserver_10.3/server/lib/weblogic.policy-Djavax.net.ssl.trustStore=/u01/Middleware/wlserver_10.3/server/lib/DemoTrust.jks-Dweblogic.nodemanager.ServiceEnabled=true - Xverify : aucun-da-Dplatform.home=/u01/Middleware/wlserver_10.3-Dwls.home=/u01/Middleware/wlserver_10.3/server-Dweblogic.home=/u01/Middleware/wlserver_10.3/server-Djps.app.credential.overwrite.allowed=true-Dweblogic.management.discover=true-Dwlw.iterativeDev=-Dwlw.testConsole=-Dwlw.logErrorsToConsole=-Dweblogic.ext.dirs=/u01/Middleware/patch_wls1035/profiles/default/sysext_manifest_classpath:/u01/Middleware/patch_jdev1111/profiles/default/sysext_manifest_classpath weblogic. Server
Error: Could not create the Virtual Machine Java.
Error: A fatal error has occurred. Program ends.
Unrecognized option:-jrockit
Error: Could not create the Virtual Machine Java.
Error: A fatal error has occurred. Program ends.
Process is complete.
The version of JRE installed on the virtual computer is as below:
[oracle@bigdatalite ~] java $-version
Java version "1.7.0_51".
Java (TM) SE Runtime Environment (build 1.7.0_51 - b13)
Java for 64-bit Server VM (build 24.51 - b03, mixed mode)
[oracle@bigdatalite ~] $
I searched on Google but also OTN but found no solution.
Can anyone already encountered the same problem or can help, it will be highly appreciated.
Thank you
Bilal
Hi Bilal,
You can try to change the folder to remove the parameter Jrocket below...
concerning
Keith
File: /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/DefaultDomain/bin/setDomainEnv.sh
Add:
# Clearing JAVA_VM - Difficulty to remove the setting of jrockit
JAVA_VM =""just before:
If ["${JAVA_VENDOR}"! = "BEA"]; then
JAVA_VM = "${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}".
export JAVA_VM
on the other
JAVA_VM = "${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}".
export JAVA_VM
FI -
Clone a virtual machine to a Cluster data store
Hello
Really simple (hopefully), but I'm trying to write a workflow that includes the provision of a virtual computer to a cluster of data store. I'm a link to the workflow 'Clone the virtual machine, no customizations' that only accepts a store of input data.
I hope that I am a bit stupid here and there is a simple answer?
Thank you.
There is no simple answer. DRS clusters are actually a set of rules and not a real thing, you can deploy a VMDK. I suggest to use Onyx to deploy a virtual computer to a DRS cluster and see what it generates. If I remember correctly, it executes DRS rules to get a recommendation for where to put a VMDK fundamentally and then uses the exit in order to actually deploy the model.
I opted to write just a simple workflow that finds the data store with the most of freespace that corresponds to a string - for example, if I have a DRS cluster named DSCluster_ugabuga, I have a lot of data stores named something like "ugabuga... ». So you ask these storages of data and find the one which most freespace.
-
Trying to copy a virtual machine from one server to another
Hi all
I'm new to ESXi 4, although I used VMWare Workstation for years. I am trying to copy a virtual machine from a Windows system (Sysprep) from one host to another. The two hosts are identical systems with the exact same ESXi host configuration. Same hw, same version of ESXi, same setup, same size of the partition.
When I use the Vsphere data store browse to 'download' the vmdk and vmx files to a local drive (Windows Server 2003), I get the following 3 files: the same vmx file, a tiny vmdk file and a file huge filename - flat hard. The file vmdk on browser to store data from the source host is about 23 GB. The flat on the local system vmdk file is almost 63 GB.
Can I reopen Vsphere on the destination server and "load" the 3 files in a directory that I created in the data store. Once there, I use the browser "Add to inventory." When I try to turn on the virtual machine, I get the error message "not enough space on the data store."
Any ideas of what I could have done wrong? Again the data store configuration is identical:
Local disk to VMware: 62.95 GB, Total formatted capacity: 62,75 GB. 1 VMFS 3.33 MB block size it's the only VM on the system.
Thanks in advance,
Mark
What you see is by design.
When you try to copy a disc loaded end service, with the browser data store or FastSCP, the virtual disk will be inflated. Use the converter such as recommended by AlbertWT.
Since the virtual disks of destination must already 60 GB of disk space you may not able to power on the virtual machine, because there is not enough disk space for the swap file, which is the size of the configured RAM (less reserve, if necessary).
André
-
Java with Minecraft error "error: could not create the Virtual Machine Java.»
When I try to open Minecraft SP, it won't let me open and there is a message saying:
"Error: could not create the Virtual Machine Java.".Error: A fatal error has occurred. Program will exit. »How can I solve this problem?Hello
What is the operating system installed on your computer?You can ask your question on the Minecraft forums for assistance. Check out the following link.
http://www.minecraftforum.NET/viewforum.php?f=1002 -
Clone a virtual machine directly from single ESXi host
Hi, I want to clone a virtual machine with all the related feathers which the Associate ID (CPU ID, UUID, BIOS ID, etc.) and redeployed on another single ESXi host. It could help me how can I do?
Hello
without vCenter server you can accomplish this by check script PowerCLI this useful post below:
Tools of HL - part 1 - clone a virtual machine without vCenter - notes LucD
If you want to clone individual disks check this KB:
VMware KB: Cloning of disks to the individual virtual machine through the ESX/ESXi terminal host
_________________________________________________________________________________________
If you have found this device or any other answer useful, please consider to award points. (use the useful or correct)
Kind regards
P.
-
VCo workflow to clone a virtual machine of centos. Network interface problem
Hello
I use vco workflows to clone a virtual machine of vcenter. The virtual machine is running centos 6.0. When cloning is complete. I see the network eth0 and eth1 interfaces set correctly the static gateway ip and address information I provided. I deleted the 70 - persistent - net .rules on the basic vm form which I clone. So, I get the correct interface names. But when vm powers on and I run "ifconfig eth0" I don't see the IP address of this interface has all the details. same for the other interface also.
But if I do a system restart network without changes to networking and then do an ifconfig I see the IP with the previous information. I don't know why the service network restart is necessary so that he can recognize the ip address.
Any ideas what I could do wrong. or to avoid this manual step of the execution of the service network restart command on the creation of the vm.
Thank you
Kiran
Yes I'm restarting after after the application of customization.
Has been able to solve the problem... In CentOS, the network service does not work by default. This is why it does not have network interfaces at startup. So now the machine instant, I started the network services and stop the Network Manager service
using chkconfig network on
chkconfig NetworkManager off
and then cloned from this virtual machine... and apply the customization settings. during the start now it shows the interfaces properly without needing a service restart
-
Clone a virtual machine and change is the network settings?
I'm looking to clone a virtual machine several times change the network connection and the IP he uses, any help appreciated.
NP, alternative, will host this script:
$vmlist
=
Import-CSV
C:vms.csv
foreach
(
$item
in
$vmlist
) {
# I like to map out my variables
$vmname
=
$item
.vmname
$ipaddr
=
$item
.ipaddress
$subnet
=
$item
.subnet
$gateway
=
$item
.gateway
$pdnswins
=
$item
.pdnswins
$sdnswins
=
$item
.sdnswins
#Get the current interface info
$GuestInterface
= Get
-VMGuestNetworkInterface
-VM
$vmname
-HostCredential
$HostCred
-GuestCredential
$GuestCred
#If the IP in the VM matches, then I don't need to update
If (
$ipaddr
-ne
$(
$GuestInterface
.ip)) {
Set
-VMGuestNetworkInterface
-VMGuestNetworkInterface
$GuestInterface
-HostCredential
$HostCred
-GuestCredential
$GuestCred
-IP
$ipaddr
-Netmask
$subnet
-Gateway
$gateway
-DNS
$pdnswins
,
$sdnswins
-WINS
$pdnswins
,
$sdnswins
}
}
-
How to clone a virtual machine using ESXi 4.1 and vSphere?
Instructions for I have seen that you can click with the right button on a virtual machine and choose "Clone", but I think it's only for vCenter
Is there a way to clone a virtual machine in vSphere?
Thank you
If you have a licensed copy of ESXi (not vSphere Hypervisor, the free version), you can try the document below. However, if you do not have a licensed copy you vCenter for cloning function
-
How to clone a virtual machine with the drive?
Hello
Previously, I used VMware Workstation and has a mastery of "clone". Now I use the reader and I would like to clone my current VM and there is no special orders. Simply copy the directory would probably not there a lot of information such as DNS name, etc. that are likely to be changed. Is it possible to clone a virtual machine with player or do I Workstation?
Many thanks in advance,
Nicolas
In my computer a full clone is nothing more then is not a copy that was made unique in the process and the players of VMware capacity but there is nothing stopping you from manually making a copy and then manually by making the changes to make it unique.
-
Stage of JavaFX Builder 1.0 error: could not create the Virtual Machine Java.
Hello
I have installed JavaFX scene Builder under Windows 7 x 32. The installation process is OK, but when I try to launch the app it crashes and displays an error that says:
"Error: could not create the Virtual Machine Java.".
Error: A fatal error has occurred. Program will exit. »
I installed JVM 7u5, JDK 7u5, JavaFX SDK 2.1.1 JavaFX 2.1.1 (Java EE JDK + Glassfish) I would be grateful if someone could tell me if there is something missing. I reinstalled almost all software java several times, but without success.
Kind regards!
Published by: 942925 on June 26, 2012 10:23Hello
This message appears usually when the JVM cannot allocate sufficient memory. It may be the consequence of the stage Builder set - Xmx1024m command line: this is currently followed by default TLD-4515 and will be fixed in the next few weeks.
For the time being you can give a try on a system with more memory. Moreover, what is your current hardware configuration?
Concerning -
I did not know that on ESX 3.5, in order to afin de vivre live clone a virtual machine from one ESX host to another, source and destination stores had to be available. However, I'm currently cloning a virtual machine to a host in a datacenter and cluster to one host in a different data center, but the destination store is not available at the source host and visa versa.
How is that possible? This is a new feature of vSphere?
That seems to work on the console port. See this thread: http://communities.vmware.com/message/1475721#1475721
AWo
VCP 3 & 4
Author @ vmwire.net
\[:o]===\[o:]
= You want to have this ad as a ringtone on your mobile phone? =
= Send 'Assignment' to 911 for only $999999,99! =
-
Vcac 6
Hello, I am running a script ExternalWFStubs.MachineProvisioned powercli. I was using Call of Scripts Powershell/PowerCLI since a Workflow vCAC as reference.
The script works well after the virtual machine is configured, and it does what it is supposed to do, but the deployed virtual machine is removed when it is finished and the following error is thrown.
Workflow: WFStubMachineProvisioned
Details of the results: failed with the following exception: cannot call this function because the current host only implements it.
Has anyone another vu cela and know what is happening? I will continue to check and post back with what I find.
Thank you
You are able to share the PowerCLI?
Grant
Maybe you are looking for
-
Dv2: My pc has a poweron password
I have a pavilion dv2-1010eo and I got a poweron password and I tried to reset the cmos Bettery and it's not helping
-
Toshiba secured 500 GB does not work with Vista 64 bit
I bought a Toshiba 500GB (PX1668e-1he0) guaranteed, and I can't install it on my PC with Windows Vista Ultimate 64-bit.On the box says it works at least with Vista, but I can't install it.When I plug it i and autorun start I have an error message: th
-
Satellite M50-105: I want to improve RAM 1 GB
Hello I have a Toshiba Satellite M50 - 105 Notebook with 512 MB of memory and want to switch to 1 GB. Should what I?
-
Re: I lost the recovery disc 1 for Satellite P10
Hi there, my son lost the recovery disc 1 for its Satellite P10.We got disc 2 (drivers) but no disc 1. Where can I get an another restore disc 1. and what it cost around. Post edited by: merdat
-
network problem with regard to streaming
Could someone tell me what I am doing wrong? When I click on stop, the upload stream does not stop downloading. This occurs on the device and not the Simulator. public class MusicPlayer extends MainScreen implements FieldChangeListener { HttpConnecti