VMware {code} Community
kri-2
Hot Shot
Hot Shot
Jump to solution

VIPerlToolkit: How to create a floppy image

Hi,

just wondering how to create a new floppyimage in a datastore using the viperltoolkit like it is possible in the edit dialog of a virtual machine (see the screenshot).

I think this must be two (hidden) steps:

1. Create the *.flp file in the specified storage ( but how? )

2. Use this file as backing for the floppy device ( I am able to do this Smiley Happy )

Can Someone help me with the first one? I could not find any method that could be the right one.

Thanks, Chris

Reply
0 Kudos
1 Solution

Accepted Solutions
Steve_Jin
Expert
Expert
Jump to solution

When you create the floppy device, make sure you choose "create" in the VirtualDeviceSpec.FileOperation

http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.vm.device.VirtualDeviceSpec.FileOperation....

http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.vm.device.VirtualDeviceSpec.html

Steve JIN, VMware Engineering

Creator of VI Java API:

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org

View solution in original post

Reply
0 Kudos
2 Replies
Steve_Jin
Expert
Expert
Jump to solution

When you create the floppy device, make sure you choose "create" in the VirtualDeviceSpec.FileOperation

http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.vm.device.VirtualDeviceSpec.FileOperation....

http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.vm.device.VirtualDeviceSpec.html

Steve JIN, VMware Engineering

Creator of VI Java API:

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
Reply
0 Kudos
kri-2
Hot Shot
Hot Shot
Jump to solution

Great Steve,

I missed this point.

now it works with the following code:

my @virFloppySpec = (VirtualDeviceConfigSpec->new( device => $virFloppy,

fileOperation => VirtualDeviceConfigSpecFileOperation->new('create'),

operation => VirtualDeviceConfigSpecOperation->new('edit')));

Thanks, Chris

Reply
0 Kudos