How to create a new virtual machine with two warehouses of data through new-vm?

Hi guys,.

Can you please help or direct me to the right format? I'm new with vsphere powercli.

How to create a virtual machine with two other data store by using the new-vm?

$datastore1 = get-datastore. WHERE-object {$_.} Name - eq "lun1"}

$datastore2 = get-datastore. WHERE-object {$_.} Name - eq "lun2"}

new-vm-name vmtest01 - VMHost ESXserver - datastore $datastore1 diskmb - 8192 $datastore2 diskmb - 8192 - memorymb 4096 - numcpu 2 - ID winNetStandardGuest

I got this error when I run vsphere powercli. I appreciate if you can help. Thank you

New-VM: cannot bind parameter 'DiskMB '. Cannot convert the 'lun2"val

EU to type 'VMware.VimAutomation.ViCore.Impl.V1.DatastoreManagement.DatastoreIm '.

PL"type"System.Int64 ".

At line: 1 char: 85

+ new-vm-name vmtest01 - VMHost ESXserver - $datastore1 data store

diskmb - < < < < 8192, $datastore2 - diskmb 8192

+ CategoryInfo: InvalidArgument: ( , ParameterBindingE)

Xception

+ FullyQualifiedErrorId: CannotConvertArgumentNoMessage, VMware.VimAutomat

ion.ViCore.Cmdlets.Commands.NewVM

Bryan

The New-VM cmdlet takes a single value of the parameter - data store and all of the virtual disks will be located on this data store.

If I understand your request, you create a virtual machine with 2 virtual disks, each on a different data store.

You can use the cmdlet New - hard drive for it.

$datastore1 = get-datastore | where-object {$_.Name -eq "lun1"}
$datastore2 = get-datastore | where-object {$_.Name -eq "lun2"}

$vm = new-vm -name vmtest01 -VMHost ESXserver -datastore $datastore1 -diskmb 8192 -memorymb 4096 -numcpu 2 -GuestId winNetStandardGuest
new-harddisk -vm $vm -datastore $datastore2 CapacityKB (8192 * 1KB)

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • How to export/import a virtual machine with ESXi 5

    I use the free version of ESXi 5 and have created a virtual machine that is configured with the software for our project. I would like to share this virtual machine with other members of the team, some of whom are in other places and have slow network connections.  I want to pack the VM in a reasonable size file or a set of files I could ftp (or put it on DVD for people in areas of slow network) that they could then import into their ESXi hosts. The virtual machine has a 60 GB drive that is implemented by using the option 'thin', so it contains only 6 or 7 GB of real data right now.  Is it possible to export the image to a file or set of files that can be imported to another people ESXI host?  Before when I used VM Player we could do this by upgrading backup files in virtual machine directory and copy them to the new machine. With the ESXi data store, I don't know that something like this can be done.  I used vCenter Converter to convert to ESXi Infrastructure VM in VM Player format (and vice versa), but it is extremely slow. I think I might point the Source to my ESXi host and the Destination to a co-workers ESXi host and run a 'conversion' to transfer the files, but I think it would be very slow and impractical for some people to 'slow-network '.  I tried with vSphere Client navigation data store and I see the download options, but when I tried to download a VM directory it just hung.  I enabled ssh on my server ESXi and I found the store of data under/vmfs/volumes and when I look in the folder that contains my VM, there a file myvmname - flat hard which is 60 GB in size, so if I tar the contents of this folder to move elsewhere it will be huge.

    Can anyone suggest a solution?  The licensed version of ESXi would offer better alternatives?

    You can watch export OVF available in the Client vSphere for this function.

  • How do divide you a virtual machine between two data stores?

    We just installed a new SAN ICSI and created an ISCSI target on it. We have created a new data store on our server ESXi 4.0 and reminded our Iscsi target. Our virtual machines have two logical drives, for the system partition C: and E: for data. At present, all virtual machines are residing on the 1 data store, which is located on the local hard drives of the esxi server. How pass readers E: of the virtual machine to the SAN and let C: readers where they are?

    Hello

    Or if you don't have a Vmotion, you can use stand-alone Vcenter converter to migrate your VM on the same ESXi host. and during this process on the Advanced tab, you can divide your virtual disks in the desired data store. You can keep the C: drive as it is on the same data store and add new vmdk and select its data store that you want, and then can move E: or D: drive until the new vmdk.

    In this way, you can split your C: and other disks on different vmware disks on different data warehouses.

    Let me know if it helps.

    Kind regards

    Sumit

  • How can I create a simple virtual machine with the CD in a newWorkflow

    I created a new workflow with simple virtual machine and added a cdrom workflow but an error is shown.

    How can I reuse of so that the new created VM add a new cdrom in a workflow

    Captura.PNG

    Help me please

    First of all, you only need a single attribute of type VC:VirtualMachine, not two as in the screenshot. You don't need to specify its value; When the first workflow completes, its output should be attributed to this attribute, and then the assigned value must be passed as input to the second workflow.

    To check/edit links, open the first workflow to change, go to the 'Visual links' tab and make sure the workflow output is line connected to the attribute. Do the same for the second workflow, and then make sure that the attribute is connected to the line to the corresponding input parameter.

    Take a look at the workflow attached if you don't know how the maps should look like.

  • How to win 2012 Server virtual machine with vmware cluster running ESX 5.1 and ESX 4.0

    Hello

    I had cluster running ESX 4.0 host, I upgrade vcenter 5.1 and added a new host running 5.1

    When I try to create a new virtual machine, it does not give me option to choose win Server 2012.

    I tried to disable fail on etc... but not helped.

    Any thought.

    Thank you


    Got it, I had to choose the vm hardware version 9

  • Migration of a virtual machine with two RDM physical to a newly created VMFS Datastore 5.0

    Dear all,

    I'm redrawing the storage storing all the VM, I have a machine virtual with two physical RDM to 2 TB each, with only 800 consumed Go, the question is can I svMotion to the new 2.5 to data store? the virtual machine (40 GB VMDK, RDM TB 2 * 2)

    Thank you.


    Djak44

    Hello

    Is there a particular reason that you must keep the RDM devices? Personally, I would keep away using the RDM disks because they can cause massive headaches.

    If you go with again in RDM as described already sure to go virtual in order to have the added capacity for RDM

    Gregg

  • How to move a virtual machine in the warehouses of data on ESXi 4.1.0

    All,

    I need to move a virtual machine from a data store to another on the same host.  I have two drive bays where each array disk is its data store on.  However, one of them has problems if I want to move two of the virtual machine to a data to another store.

    Is it possible through vsphere and if so, how?

    My host is a:

    Dell PowerEdge 2950

    vSphere Client Version 4.1.0

    VMware ESXi 4.1.0

    Hello

    1. turn off the virtual machine to be moved

    2. right click on the virtual machine, and then select Remove in the inventory (the fleeting VM on the data store)

    3. browse the data store, in the left pane, right-click on the folder of the virtual machine and select move to...

    4 browse the new data store, open the VM folder

    5. save the .vmx file

    6. start the virtual machine in the new location and make sure that it works.

  • How to create custom payment terms ID with * TWO * fixed monthly payment dates - PS SCM 9.1 TR 8.51.08

    Hi all

    This is just about everything said. We have a new payable seller with a very strange terms setup: payments are due the 10th or 25th of each month according to the date of invoice - bills date to the 15e or be carried out before the 25th of the current month; Bills as of 16 or later are expected the 10th of the following month. Is there a way to PeopleSoft PT calendar codes to achieve (without personalization)? We currently use SCM 9.1 with 8.51.08 tools

    Thank you very much!

    Hi again

    You can ignore this investigation that I answered my own question (just using multiple synchronization codes in a single ID terms!)!

  • create a new virtual machine with the default settings?

    I was wondering if there was a way to create a new virtual machine with the default settings.

    For example, let's say I want all new Lion VM to have 2 CPU cores. Is there a way to set this automatically? There are other parameters I want a new machine to inherit automatically, I was wondering if there is an automatic way to do this, or is it a feature request...

    Thanks in advance

    lerker wrote:

    Just for my clarification, when you say a vm model, basically I would execute a finder copy then drag back to the VM library, right?

    Yes.

    On the orders of spcirpting, it would be unix commands or are there specific vmware controls that make your job easier (in Applications/VMware\ Fusion/content or elsewhere)...

    IIRC, VMware Fusion 3 and later versions has an AppleScript dictionary, but it is not yet officially supported and may not be able to do what you want so, basically, only Unix Shell scripts, that's what I was referring to.  For an example, see my script attached to the following response: Re: vmware - script of the creation of the vm and the operating system installation process

  • How to create a virtual machine with apps to play in VMware player?

    I know that this question was probably asked several times before. I searched for the answer and just shot to the top of threads that have a few years. I know a few things have changed since then and I didn't know how that would influence the answers. I want to create a virtual machine with specific applications that will play on VMware player. What is the best way to do it and it is possible for the weak or no cost? If someone knows a tutorial or blog etc I can follow that would be great.  Thank you

    See the article by Alessandro on that... http://www.virtualization.info/2005/12/Guide-to-create-VMX-files-for-VMware.html

  • Create the virtual machine with the ISO mounted CDROM

    Community of hell!

    Working on the vmcreate.pl script to add the creation of CD-ROM with iso data store, I got stuck on the error

    ' Invalid device configuration: ' VirtualSCSIControllerOption.numSCSICdroms '.

    I'm sure I'm missing something obvious, or this option but may not understand how to deliver this.

    I created a cdrom as follows (below test I create any CDROM, no iso file to reduce the number of layers):

    my $ BPPRR m_backing_info = VirtualCdromRemotePassthroughBackingInfo->new)

    deviceName = > ' '.

    exclusive = > 0,

    );

    my $description = description->new(label = > 'CDROM', summary = > 'cdddrom');

    my $connectable = VirtualDeviceConnectInfo->new(allowGuestControl = > 1,)

    connected = > 0,

    startConnected = > 1,

    ( State = > inmates ' / ' );

    my $ BPPRR m = VirtualCdrom->new(backup = > $BPPRRm_backing_info,

    connectable = > $connectable,

    controllerKey = > 0,

    deviceInfo = > $description,

    key => 1,

    ( unitNumber = > 1 );

    VirtualDeviceConfigSpec->new(device = > $BPPRRm,

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

    Did anyone have working example to create the virtual machine with CDRom?

    Andrey

    If someone will find this useful I followed this route Re: vmreconfig.pl add the device CD/DVD fails if the virtual machine created with vmcreate.pl

    and also I found good examples of what I need to in VMUtil.pm in cmd vmsphere libraries.

    Andrey

  • Create the virtual machine with the type of controller SCSI LSI logic SAS with PowerCLi

    Hey guys,.

    IM the difficulty to create a virtual machine with the type of controller SCSI to "LSI Logic SAS". The cmdlet New - VM im struggling to find where to create the type of controller?

    If you create a virtual machine without specifying a disk it will create a 4 GB SCSI type thick (0:0) hard drive 1 with 0 Parrall default BusLogic SCSI controller.

    What im wanting to do is to create a disk hard which is thin Prov. and create SCSI LSI logic SAS controller is set to.

    New-VM -name VMSTORE23 -$vmhost $esxhost MemoryMB- 4096 NumCpu- 2 -NetworkName "Vlan 6 Machine Virtual Network" | Get-NetworkAdapter | Set-NetworkAdapter -Type Vmxnet3 -MacAddress '00:50:56:00:00:21' -confirm:$false

    I have recived of aid by some LucD who helped direct the value of the network card in the New - VM cmdlet as follows. But I'm not able to add a hose for hard disk also like:

    | Get-hard drive | Together-hard drive - Datastore $datastore - slim StorageFormat

    And I have no idea how change the type of SCSI conroller or create it with the correct configuration?

    Any help would be great,

    Thanks in advance

    Eddie

    Greetings, steddyeddie-

    You should be able to use Set - hard drive and SCSI controller Set cmdlets to set the storage format of your hard drive and the SCSI controller type, respectively.  You were close to on the part of game - hard drive .  Try something like:

    ## get the VM object $vmVMSTORE23 = Get-VM VMSTORE23 ## set the harddisk storageformat to thin$vmVMSTORE23 | Get-HardDisk | Set-HardDisk -StorageFormat Thin ## set the SCSI controller type$vmVMSTORE23 | Get-ScsiController | Set-ScsiController -Type VirtualLsiLogicSAS
    

    It could pack in to your existing order to keep it as a good word, but for readability.

    Enjoy

  • Virtual machine with Redhat - how to extend the file system

    I have a virtual machine with redhat.  the machine was created with 20 GB of space.  I changed the settings and gave him 30GB.

    / Dev/sda watch now 30 GB

    But/dev/map/VolGroup00/LogVol00 shows that the 20 GB.

    How can I get the file system to extend with the other 10 GB of space?

    Thank you!

    Mackman wrote:

    How can I get the file system to extend with the other 10 GB of space?

    With a lot of attention.    I just went through something similar myself.  This web site has been very useful: http://www.linuxnetadmin.com/2008/01/how-to-add-disk-space-with-lvm-on-linux.html

    The website above describe the steps when adding an additional drive, but the steps for extending on a new partition on the same disk should be similar.

    Take a snapshot first in case things go very wrong.

  • Cannot create a virtual machine with a vmdk file copied from another location, please find the attached error

    Hi all

    I copied a file from one place vmdk and try to make a new virtual machine with this vmdk file. But when I turn on after the creation of vm error is coming. Error in the text and the image below

    Power on the virtual machine: cannot open scsi0:0 disc: disc not supported or not valid type 7. Ensure that the disk has been imported.

    See the error of the stack for more details on the cause of this problem.

    Time: 31/03/2015-14:40:05

    Target: DBServer

    vCenter Server: vcsa

    Error stack

    An error was received from the ESX host turning on DBServer VM.

    Unable to start the virtual machine.

    Power DevicePowerOn module has failed.

    Unable to create the virtual SCSI device for scsi0:0, ' / vmfs/volumes/543d140b-feb33d52-7640-90b11c9796c3/vmdk/kapuatdb.vmdk'

    Could not open scsi0:0 disc: disc not supported or not valid type 7. Ensure that the disk has been imported.

    This error message generally if the hard files have been copied hosted as VMware Workstation product, which uses a format of sparse file that is not supported on an ESXi host. Instead of the hard copy, you can use VMware Converter, or - if you prefer - you can convert the hard using vmware-vdiskmanager (before transfer) or vmkfstools (after downloading). I deal to use vmkfstools you will need to load the mutliextent module (see for example "Clone or migration operations involving virtual discs non-VMFS on ESXi fail with an error" vSphere 5.1 Release Notes)

    André

  • URGENT! After installing 6 Fusion and creation of new virtual machine with Windows 7, I get a message "VMware Fusion cannot enter the unit". WHAT SHOULD DO?

    After purchase, installation and activation Fusion 6 with the license key, I had a library of VMS showing 2 Boot Camp partitions. It's strange that I only have 1.
    I tried to activate them but received a message that it is out of date in 2 cases. (see annex 1)

    I started a new virtual machine with a Windows 7 installation disc directly on my HD. I have provided a way to do this and followed the instructions of Fusion to the screen.

    Apparently, everything went well and after several restarts, the installation appears to be over (see annex 2) I tried to open and run the installed Windows 7. I had however a window with the following message:

    "Pending the unit.

    "VMware Fusion cannot enter the unit. Please wait until the unit starts automatically, or interact with the virtual machine below. ' (see annex 3)

    Here Windows 7 seems to start but after a while with the home screen and of the Øresund finishing this window closed and open a new window called library Virtual Machine on the left showing the partitions of Bootcamp and the Virtual Machine Windows 7 x 64 and in the middle gray a representation of what is supposed to be the Windows 7 desktop. (see Exhibit 4). When I opened the settings button a window with different setting options pops up. This mark means to me that Windows is installed but the final opening isn't the case

    When you quit Vmware Fusion indeed Windows seems to be close (see part 5)

    What is going on? What has gone wrong? What should I do? I don't know how to solve the problem.

    I should f.i. remove the virtual machine from Windows 7 and is free automatically made partition on my HD as the reboot with the Windows installation disc? or y at - it another way to enter the UNIT?

    Help, please!

    Thanks in advance

    Your virtual machine is running. It is in the unit - which each windows gets its own window of Mac - and you have no application Windows running, there is no visible windows. You can start a Windows application in the start of Fusion menu in the menu bar at the top right, or turn on the Windows task bar on the view menu and start applications from there. Or use the view menu to switch to the Single mode or full-screen, which puts all of your Windows desktop in a window separate from Mac.

    You do not have two partitions to Boot Camp on your Mac, you have two virtual machines named "Boot Camp partition".

    The message about it being unable to enter the unit arrives while the merger is pending for the tools begin to run, because the tool is necessary for the unit.

Maybe you are looking for

  • Qosmio F60 - starting with Windows 7 and Dynadock U problems

    I recently acquired a new Qosmio F60 and a new port replicator Dynadock U. problem, but it will not start upward unless I disconnect the Dynadock by unplugging the USB cable from the laptop. I downloaded the latest drivers for the F60 and the Dynadoc

  • Can satellite L350D - I use Windows XP x 64?

    Can someone tell me if the L350D will work with XP x 64? I installed it ok but some drivers are going a bit funny and I don't know why, but not all of them are available for download from the download site. Things like the camera software only seem t

  • Can not post on the discussion forum

    Hello I tried to fill in information for the best of the knowledge to start a new discussion. Get a strange error when posting, there is no error message or of the text id. What Miss me? Thank you

  • REFERENCE DELL 2335 MFP SCAN "NOT AVAILABLE".

    I have a Dell 2335 MFP printer that is connected to a network with 3 2 pc from work of the pc quite well and we can however scan other pc which is configured in the same way is not when to choose the pc that you want to scan to it says connection aft

  • ORA-38760: this database instance could not turn on the flashback database

    Hi guysWithout knowing it, I deleted all the files in the directory "fra" where "flashback" folder was there because of space issues. Now am facing the error.It's my practical database.SQL > startupORACLE instance started.Total System Global Area 608