5 Essential Tips for Maximizing Your Experience at Nutanix .NEXT for Bloggers
So I use the following script to create a VM. I actually have a small batch file that opens putty, logs into a CVM, prompts me for the $name and then runs the script below. The image is one I made, then sysprepped and uploaded as a disk image.Everything works great except that when I then open the console it goes through the Windows setup. I have an Unnattend file but I am unsure how to use it with my script. If I go through the GUI to create a VM I just point it to the unattened file in our file share.Is there a way to attach the sysprep file? I thought it might be a parameter vm.disk_create but I am not clever enough to figure that part out and thought maybe someone else smarter could help. First world problems I know but it could help save me 30 extra seconds of not having to type the admin password in and set the keyboard settings etc.#creates a vmacli vm.create $name memory=$mem num_cores_per_vcpu=$core num_vcpus=$vcpu uefi_boot=TRUE &&#Create C:acli vm.disk_create $name c
Hi. I am fairly new to scripting especially with Nutanix. I can do Powershell scripting just fine but making the conversion to shell scripts has my brain in a knot. I have some acli commands to create a new vm, create a new Disk and a new NIC but I was unsure how to run them as an executable from my Windows desktop. Our cluster is Nutanix AHV. So I run this from a command line to open putty and connect. It works fine without the script. putty.exe -ssh admin@xxx.xxx.xxx.xxx -pw ****** -m "C:\newVM.sh" The script is: acli; #creates a clone of Server2016 #vm.clone aTest clone_from_vm="Server2016RefImage" memory=8G num_cores_per_vcpu=2 num_vcpus=2; #creates a D drive # vm.disk_create aTest bus=scsi create_size=200G index=1 container="Container-1"; #Add a NIC #vm.nic_create aTest connected=true network="Vlan6"; Each line will run fine if I run it in putty but I am not sure if I am stringing the commands together correctly. If I try to execute the script it opens the putty session the
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.