Comments (4)
What version of vsphere-connect are you using?
You probably need to define a device type. See this issue #12
from vsphere-connect.
I am using v1 of vsphere-connect. Btw this works:
'ReconfigVM_Task',
{
_this: util.moRef('VirtualMachine', virtualMachine.moref),
spec: {
deviceChange: {
device: {
key: dbVirtualDisk.key,
},
operation: 'remove',
},
},
},```
from vsphere-connect.
If anyone could tell me how such request should look like from object point of view. That's would be great. TRying to do all actions on vm to add/edit/remove a disk
from vsphere-connect.
After some investigation this seems to work
client.method('ReconfigVM_Task',
{
_this: moref,
spec: {
deviceChange: [{
device: {
attributes: { 'xsi:type': 'VirtualDisk' },
key: device.key,
capacityInKB: newCapacity,
unitNumber: device.unitNumber,
controllerKey: device.controllerKey,
backing: {
attributes: { 'xsi:type': 'VirtualDiskFlatVer2BackingInfo' },
fileName: device.backing.fileName,
diskMode: device.backing.diskMode,
},
},
operation: 'edit',
}],
},
})
where device
is the retrieved disk device.
What remains unsolved is how to automatically retrieve the xsi:type
for the original device and its backing
since they aren't conveyed in the js representation of the original soap response.
from vsphere-connect.
Related Issues (12)
- Support for vCenter 6.5 schema HOT 4
- Wait method (Task) to finish? HOT 1
- Can't pass parameters to method HOT 5
- nsp alerts for version 1.1.2 HOT 3
- Support for 6.7.1 HOT 4
- Could not find parent type for VApp in v1
- Add TypeScript support for this lib HOT 1
- Would you like to support multiple online accounts and make request through session? HOT 3
- is this project still active? HOT 3
- When a newer vSphere version is encountered, an error is thrown HOT 11
- Failed to import ova HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsphere-connect.