Script for disconnecting the network adapter

This post was originally published on this site

I was able to figure out the command to disconnect the network adapter for “connected” and “connect at power on” for a single vm using :

get-vm xyz | get-networkadpater | set-networkadapter -connected:$false -startconnected:$false

 

But i need to run this in a script from a csv for about 200 VMs. I’m only concerned with disconnecting at this point and time.

 

I tried modifying a previous script that I had but I’m still new to building scripts. I have attached the script I’m trying to reuse. If anyone could help, I would greatly appreciate it. When running the script it throws an error saying Get-NetworkAdapter is not a proper cmdlet etc..

 

# Import VMs from csv

$VMS = Import-Csv $csvfile

Out-Log “VMs to be created: $totalVMs” “Yellow”

 

# Check to ensure csv is populated

If ($totalVMs -lt 1) {

    Out-Log “`nError: No entries found in VMs.csv” “Red”

    Out-Log “Exiting…`n” “Red”

    Exit

}

 

# Show input and ask for confirmation, unless -auto was used

If (!$auto) {

    $newVMs | Out-GridView -Title “VMs to be Updated”

    $continue = Read-Host “`nContinue (y/n)?”

    If ($continue -notmatch “y”) {

        Out-Log “Exiting…” “Red”

        Exit

    }

}

 

# Connect to vCenter server

If ($vcenter -eq “”) {$vcenter = Read-Host “`nEnter vCenter server FQDN or IP”}

 

Try {

    Out-Log “`nConnecting to vCenter – $vcenter`n`n” “Yellow”

    Connect-VIServer $vcenter -EA Stop | Out-Null

} Catch {

    Out-Log “`r`n`r`nUnable to connect to $vcenter” “Red”

    Out-Log “Exiting…`r`n`r`n” “Red”

    Exit

}

 

 

# VMs to be updated

foreach ($vm in $VMS){

 

 

      #$VM = $vm.vm

 

  Get-VM $vm.vm | Get-NetworkAdpater | Set-NetworkAdpater -connected:$false startconnected:$false

 

 

}

NVIDIA Tesla K80 – Pass Through

This post was originally published on this site

Hello.

I have a problem using a GPU hardware (NVIDIA Tesla K80) in an HP blade.

Since vGPU drivers are not available for this NVIDIA we tried the pass through configuration reported in this blog: https://cto.vmware.com/gpgpu-computing-with-the-nvidia-k80-on-vmware-vsphere-6/ however the full config is not working in our installation, when applied to a Windows 10 Pro, the VM no longer boots. When using just pciPassthru.use64bitMMIO=”TRUE” config line, I can detect the new hardware in Win10 VM, but NVIDIA instalation of drivers “356.54-tesla-desktop-win10-64bit-international-whql.exe” never completes.

I also tried to install NVIDIA drivers in an ubuntu-16.04.1-server-amd64, but the VM was destroyed in this process (was unbootable after the installation).

 

I had also previous problems that can be related:

Our blade also has an “HP P440ar RAID controller” problem, https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2110557 and we opted to install ESXi software VMware-ESXi-6.0.0-2494585-HP-600.9.3.30.2-Jun2015.iso

since we don’t have much experience in building custom images.

 

Tried also to file a VMWare support ticket, but the SnS is assigned to the institution that I work for. In My VMware account can’t file the ticket because I don’t have any product registrations.

I have all the SnS information (email info of Service Activation), but don’t know how to use this info for my account.

 

Any help?

network configuration and access rights

This post was originally published on this site

Hello,

 

I have a question that I thought was very simple but I probably am missing something.

 

I would like to create some kind of self-service test environment in my VCenter. Of course, I would like to isolate this environment from the rest of my network. The simplest and safest way would be to dedicate a host for that and physically limit its access to the network via firewall, however this is not possible in my case. 

This means that I will have to allow people to fully control the VM creation/modification in a resource pool, including adding/removing/editing network cards. However I want to restrict them to some specific network cards (which are attributed to specific VSwitches).

 

For example, let’s say I have sveral network configurations for : LAN, INTERNET, DMZ, HOST-ONLY.

How can I give full access rights on a resource pool without allowing access to LAN and DMZ when editing VM settings ?

 

It’s probably very simple but I cannot figure it out by myself.

CPU disable on booting Ubuntu 16.10

This post was originally published on this site

After installation of Ubuntu 16.10 x64, I get the “CPU has been disabled by the guest OS” during the boot sequence.  Happened with the beta, too.  Same guest OS works just fine with Hyper-V.  16.04 installs and boots correctly.  Using Workstation 12.5.  There’s some kind of kernel panic happening, but I can’t capture it.  syslog and kern.log are empty in the /var/log/ path when I drop to a terminal from recovery mode.

 

Anyone else having this problem?

 

2016-10-13T23:04:05.116-05:00| svga| I125: SWBScreen: Screen 0 Destroyed: xywh(0, 0, 720, 400) flags=0x3

2016-10-13T23:04:05.116-05:00| svga| I125: SWBScreen: Screen 1 Defined: xywh(0, 0, 640, 480) flags=0x2

2016-10-13T23:04:05.129-05:00| vcpu-1| I125: DISKUTIL: scsi0:0 : capacity=41943040 logical sector size=512

2016-10-13T23:04:05.130-05:00| vcpu-0| I125: SCSI DEVICE (scsi0:0): MODE SENSE(6) for unsupported page 0x8

2016-10-13T23:04:05.130-05:00| vcpu-1| I125: DISKUTIL: scsi0:0 : capacity=41943040 logical sector size=512

2016-10-13T23:04:05.130-05:00| vcpu-1| I125: SCSI DEVICE (scsi0:0): MODE SENSE(6) for unsupported page 0x8

2016-10-13T23:04:05.132-05:00| vcpu-0| I125: DISKUTIL: scsi0:0 : capacity=41943040 logical sector size=512

2016-10-13T23:04:05.132-05:00| vcpu-0| I125: SCSI DEVICE (scsi0:0): MODE SENSE(6) for unsupported page 0x8

2016-10-13T23:04:05.402-05:00| svga| I125: SWBScreen: Screen 1 Destroyed: xywh(0, 0, 640, 480) flags=0x2

2016-10-13T23:04:05.404-05:00| svga| I125: SVGA-ScreenMgr: Screen type changed to ScreenTarget

2016-10-13T23:04:05.404-05:00| svga| I125: SWBScreen: Screen 1 Defined: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:05.405-05:00| svga| I125: SWBScreen: Screen 1 Destroyed: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:05.405-05:00| svga| I125: SWBScreen: Screen 1 Defined: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:09.308-05:00| vcpu-0| I125: SCSI scsi0:0: Unsupported command *UNKNOWN (0x85)* issued. –ok

2016-10-13T23:04:09.308-05:00| vcpu-0| I125: SCSI scsi0:0: Unsupported command *UNKNOWN (0x85)* issued. –ok

2016-10-13T23:04:09.349-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x606] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.502-05:00| svga| I125: SWBScreen: Screen 1 Destroyed: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:09.517-05:00| svga| I125: SWBScreen: Screen 1 Defined: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:09.518-05:00| svga| I125: SWBScreen: Screen 1 Destroyed: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:09.518-05:00| svga| I125: SWBScreen: Screen 1 Defined: xywh(0, 0, 800, 600) flags=0x2

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1b1] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x17] (read as zero): rip=0xffffffffa9464712 count=4

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0xee] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=2

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x19c] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=3

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x17] (read as zero): rip=0xffffffffa9464712 count=5

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0xee] (read as zero): rip=0xffffffffa9464712 count=2

2016-10-13T23:04:09.520-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=4

2016-10-13T23:04:09.520-05:00| vcpu-1| I125: GetMSR: unknown MSR[0x19c] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-1| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-1| I125: GetMSR: unknown MSR[0x17] (read as zero): rip=0xffffffffa9464712 count=3

2016-10-13T23:04:09.520-05:00| vcpu-1| I125: GetMSR: unknown MSR[0xee] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.520-05:00| vcpu-1| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=2

2016-10-13T23:04:09.583-05:00| vcpu-1| I125: GetMSR: unknown MSR[0x60d] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.587-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1a2] (read as zero): rip=0xffffffffa9464712 count=5

2016-10-13T23:04:09.671-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x611] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.671-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x639] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.671-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x641] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.671-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x619] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x1b1] (read as zero): rip=0xffffffffa9464752 count=2

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x60d] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x3f8] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x3f9] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x3fa] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x630] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x631] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:09.946-05:00| vcpu-0| I125: GetMSR: unknown MSR[0x632] (read as zero): rip=0xffffffffa9464712 count=1

2016-10-13T23:04:10.332-05:00| vcpu-0| I125: APIC THERMLVT write: 0x10000

2016-10-13T23:04:10.332-05:00| vcpu-1| I125: APIC THERMLVT write: 0x10000

2016-10-13T23:04:10.332-05:00| vcpu-0| I125: Vix: [2760 vmxCommands.c:7301]: VMAutomation_HandleCLIHLTEvent. Do nothing.

2016-10-13T23:04:10.332-05:00| vcpu-0| I125: MsgHint: msg.monitorevent.halt

2016-10-13T23:04:10.332-05:00| vcpu-0| I125+ The CPU has been disabled by the guest operating system. Power off or reset the virtual machine.

2016-10-13T23:04:10.332-05:00| vcpu-0| I125+ —————————————