Forskel mellem versioner af "VMware"

Fra NørderiWiki
Skift til: Navigation, Søgning
m
(Set datastore as SSD)
Linje 5: Linje 5:
 
esxcli --server 192.168.x.x --username root --password root
 
esxcli --server 192.168.x.x --username root --password root
  
 +
= Set datastore as SSD =
 +
 +
'''Husk at ændre device ID!'''
 +
 +
<pre style="white-space: pre-wrap;
 +
white-space: -moz-pre-wrap;
 +
white-space: -pre-wrap;
 +
white-space: -o-pre-wrap;
 +
word-wrap: break-word">
 +
esxcli --server 192.168.1.129 --username root --password root storage nmp satp rule add --satp VMW_SATP_LOCAL --device naa.6005076040971c801a5859d4284d3b4e --option "enable_ssd"
 +
esxcli --server 192.168.1.129 --username root --password root storage nmp satp rule add --satp VMW_SATP_LOCAL --device naa.6005076040971c801a5859d4284d322d --option "enable_ssd"
 +
 +
esxcli --server 192.168.1.129 --username root --password root storage core claiming unclaim --type device --device naa.6005076040971c801a5859d4284d3b4e
 +
esxcli --server 192.168.1.129 --username root --password root storage core claiming unclaim --type device --device naa.6005076040971c801a5859d4284d322d
 +
 +
esxcli --server 192.168.1.129 --username root --password root storage core claimrule load
 +
esxcli --server 192.168.1.129 --username root --password root storage core claiming reclaim -d naa.6005076040971c801a5859d4284d3b4e
 +
esxcli --server 192.168.1.129 --username root --password root storage core claiming reclaim -d naa.6005076040971c801a5859d4284d322d
 +
esxcli --server 192.168.1.129 --username root --password root storage core claimrule run
 +
 +
esxcli --server 192.168.1.129 --username root --password root storage core device list -d naa.6005076040971c801a5859d4284d3b4e
 +
esxcli --server 192.168.1.129 --username root --password root storage core device list -d naa.6005076040971c801a5859d4284d322d
 +
</pre>
  
 
= Windows Server 2008 R2 Sysprep template =
 
= Windows Server 2008 R2 Sysprep template =

Versionen fra 3. mar 2014, 10:53

Det er meningen er der skal komme gode fif her til VMware.

esxcli

esxcli --server 192.168.x.x --username root --password root

Set datastore as SSD

Husk at ændre device ID!

esxcli --server 192.168.1.129 --username root --password root storage nmp satp rule add --satp VMW_SATP_LOCAL --device naa.6005076040971c801a5859d4284d3b4e --option "enable_ssd"
esxcli --server 192.168.1.129 --username root --password root storage nmp satp rule add --satp VMW_SATP_LOCAL --device naa.6005076040971c801a5859d4284d322d --option "enable_ssd"

esxcli --server 192.168.1.129 --username root --password root storage core claiming unclaim --type device --device naa.6005076040971c801a5859d4284d3b4e
esxcli --server 192.168.1.129 --username root --password root storage core claiming unclaim --type device --device naa.6005076040971c801a5859d4284d322d

esxcli --server 192.168.1.129 --username root --password root storage core claimrule load
esxcli --server 192.168.1.129 --username root --password root storage core claiming reclaim -d naa.6005076040971c801a5859d4284d3b4e
esxcli --server 192.168.1.129 --username root --password root storage core claiming reclaim -d naa.6005076040971c801a5859d4284d322d
esxcli --server 192.168.1.129 --username root --password root storage core claimrule run

esxcli --server 192.168.1.129 --username root --password root storage core device list -d naa.6005076040971c801a5859d4284d3b4e
esxcli --server 192.168.1.129 --username root --password root storage core device list -d naa.6005076040971c801a5859d4284d322d

Windows Server 2008 R2 Sysprep template

Hvis du har problemer med at musen er langsom efter du har deployet en VM fra en sysprep Windows Server 2008 R2 template, så prøv med denne unattend.xml fil:

<CopyProfile>true</CopyProfile> Ikke nødvendig?

<?xml version="1.0" encoding="utf-8"?> 
<unattend xmlns="urn:schemas-microsoft-com:unattend">

<settings pass="generalize">
	<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
		<DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
		<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
    </component>
</settings>

<settings pass="specialize"> 
	<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
		<RegisteredOrganization>Organization</RegisteredOrganization> 
		<RegisteredOwner>Owner</RegisteredOwner> 
		<CopyProfile>true</CopyProfile> 
	</component>
</settings> 

<cpi:offlineImage cpi:source="wim:f:/sources/install.wim#Windows Server 2008 R2 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> 
</unattend>

Redning

Her følger en hel masse kommandoer der kan hjælpe en, hvis man er kommet til at lave lort i GUI.

Genstarte først reboot

Fjerne netkort (vswif) fra vswitch1

og

esxcfg-vswif -i <new ip address> vswifX

Changes the service console’s IP address.

esxcfg-vswif -n <new netmask> vswifX

Changes the service console’s netmask.

esxcfg-vswitch -U <old vmnic> <service console vswitch>

Removes the NIC for the service console


Hvis ikke noget af det virker, så kig længere nede.


Sætte begge netkort til. 1 til console 1 til maskiner.



http://vmzare.wordpress.com/2007/03/21/networking-vmware/

esxcfg-vswif -l

Provides a list of the service console’s current network interfaces.

Check that vswif0 is present and that the current IP address and Netmask are

correct.

esxcfg-vswitch -l

Provides a list of current virtual switch configurations.

Check that the uplink adapter configured for the service console is connected to the

appropriate physical network.

exscfg-nics -l

Provides a list of current network adapters along with their names

Check that the uplink adapter configured for the service console is up and that the

speed and duplex are both correct.

esxcfg-nics -s <speed> <nic>

Changes the speed of a network adapter.

esxcfg-nics -d <duplex> <nic>

Changes the duplex of a network adapter.

esxcfg-vswif -i <new ip address> vswifX

Changes the service console’s IP address.

esxcfg-vswif -n <new netmask> vswifX

Changes the service console’s netmask.

esxcfg-vswitch -U <old vmnic> <service console vswitch>

Removes the NIC for the service console

esxcfg-vswitch -L <new vmnic> <service console vswitch>

Changes the uplink for the service console.

If you encounter long waits when using esxcfg-* commands, it is possible that DNS is misconfigured.

Connection from Virtual network adapters to port group is made by name, any change in the name would cause loss of connection when VMs are rebooted. It won’t affect already running VMs. Best practise is to avoid renaming networks after they are in use.




1. determine which NICs are seen by the vmkernel:

esxcfg-nics

2. check the current vswitch configuration:

esxcfg-vswitch -l

3. You should see one or more vSwitches listed. If there are no vswitches listed create one using the command:

esxcfg-vswitch -a vSwitch0

4. One of the vswitches should have a portgroup called "Service Console", if not create it with the command:

esxcfg-vswitch -A "Service Console" vSwitch0

5. Make sure that the physical NIC(s) which are connected to the network you want the COS to have access to (and *only* those NICs) are listed in the "Uplinks" column for the vSwitch and "Service Console" portgroup. To add uplinks use the command:

esxcfg-vswitch -L <vmnicN> vSwitch0

To remove unwanted uplinks from a vSwitch use the command:

esxcfg-vswitch -U <vmnicN> <vSwitchN>

6. check the virtual network device in the COS:

esxcfg-vswif -l

7. You should have at least one virtual adapter called vswif0. Check that the IP and other info is correct for that adapter. To add a virtual adapter use the command:

esxcfg-vswif -a -p "Service Console" -i <ip_addr> -n <netmask> -b <broadcast_addr> vswif0

8. If you have other vswifs with misconfigured or overlapping subnets with vswif0 you probably will have to remove them. to remove a vswif use the command:

esxcfg-vswif -d vswifN

9. Most standard linux commands such as ifconfig will work on vswif0. If you want to make your any changes to the paramters and have them stick, you should use esxcfg-vswif.

10. calling any of the esxcfg-* programs with -h will show the available options and a breif description of what they do.










CLI WAY

Create a vSwitch

esxcfg-vswitch -a vSwitch(SWITCH NO)

Create the Service Console portgroup

esxcfg-vswitch -p "Service Console" vSwitch(SWITCH NO)

Add a NIC to the vSwitch

esxcfg-vswitch –L vmnic vSwitch(SWITCH NO)

Add a vswif interface and configure

esxcfg-vswif –a vswif0 -p "Service Console" i (IPADDR)–n (MASK)


http://communities.vmware.com/message/370673