Using Cisco Vlans and Trunks on VMWare ESXi 3.5/4

Hello there,

are you one of these ppl using ESXi on a small server/pc under your desk to evaluate / develop software?
Are you one of these fitting the whole ESXi World into one machine, one one IDE / SATA drive and without any other VMWare Administrative Instances as your Vi\Vsphere Client? Are you one of these ppl that does not have one real 10 Gig Interface for each VM Machine into its server - but do desperatly need to connect an real pc to just one VM? No problem! Here we go! All we need is an Switch with vlan Trunking. I used an Cisco c3560-poe8 for this, as it is my main work switch.

So you just need these snipets on the switch side:

This is going to activate ip dhcp snooping globaly on the switch
(which means only marked ports are allowed to answer an dhcp request, thats important!)

ip dhcp snooping vlan 1-4094
no ip dhcp snooping information option
ip dhcp snooping

these are the vlans, one main, one "test" for the vm

vlan 1
name main
vlan 999
name test

normal client port

interface FastEthernet0/1
switchport access vlan 1
spanning-tree portfast

vm client port which does access vlan 999

interface FastEthernet0/3
switchport access vlan 999
spanning-tree portfast

vm server port, which does access normal vlan 1, and does trunk the rest
" ip dhcp snooping trust" means, that this port is allowed to answer dhcp requests

interface FastEthernet0/7
switchport trunk encapsulation dot1q
switchport trunk native vlan 1
switchport trunk allowed vlan 1,999
switchport mode trunk
ip dhcp snooping trust
end

Thats it!
Its that easy!
Only thing you need to do on the vm machine is to start vi\vsphere client, go to configuration, network, create an new port group and insert the nic of the vmware machine you want to use on the switch port (here 3 on the c3560) - and set the port groups vlan id to 999.

And then, you can do pxe, dhcp, sunray, and allll you want!

Cheers,

Nico

PXE Boot Bart PE

As I have been using PXE now for the last days, I wanted to build myself up some nice PXE Images to load from the Network. And the one thing I wanted for sure, was an Bart PE PXE Boot. So I searched the Net, found two really good guides ( Guide 1, Guide 2 ) and I am going to rewrite these Guides now here to set you up with an 100% working tutorial on "How to PXE Boot Bart PE".

What you need:
- tftpd32
- BartPE / PE Builder
- Windows Server 2003 CD with SP1 (IMPORTANT! WITHOUT SP1 IT WON'T WORK!)
- Syslinux (optional)

We do start with the file preparations:

- Creating the BartPE CD
Copy your Windows Server 2003 SP1 Cd onto your PC (lets say C:\win2003),
install PE Builder and start it. Enter C:\win2003 as source,
tell him to create an Iso Image called BartPE.iso and hit start.
Congrats, you just created yourself an BartPE Boot CD with an Live Windows XP!

- Preparing Boot Files
You now need to grap the needed Files like Bootloader and Stuff.
So create an new folder and go get these Files from C:\win2003\i386:
NTDETECT.COM, SETUPLDR.EX_, STARTROM.CO_, STARTROM.N1_, RAMDISK.SY_ und RAMDISK.IN_
After you copied them, you need to extract them.
Open up an cmd Shell, cd to the folder with the copied Files and extract them all with the usage of
"Expand -r Filename" (or Expand -r * should work as well)
You now need to rename some files.
- setupldr.exe should be renamed to NTLDR
- startrom.n12 should be renamed to startrom.0
Next thing is you need to create a textfile with the name winnt.sif with the following content:

[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=BartPE.iso"

And thats it with file preparation.
You can delete the files SETUPLDR.EX_, STARTROM.CO_, STARTROM.N1_, RAMDISK.SY_ und RAMDISK.IN_.
All the others are going into the tftboot Folder of the next step.

- Setup up the tftpd32
Easy as hell. Download, unzip.
For example C:\tftpd32
Create the folder tftpboot within that.
And now to the config. There are actually two working configurations:
One with the usage of the pxelinux.0, and one without it.
Which flavor to use is your choice.
Difference: With pxelinux.0, you can build up an boot menu, without it you just only boot BartPE.

But first basics tftp config:
- start tftpd32.exe in C:\tftpd32
- Server interfaces chose your NIC
- Press Settings

Settings:
Base Directory: C:\tftpd32\tftpboot

Global Settings:
TFTP Server [X]
TFTP Client [ ]
SNTP Server [ ]
Syslog Server [ ]
DHCP Server [X]
Syslog Server: [ ] Save syslog message

TFTPD Security: None

TFTPD configuration:
Timeout (seconds) 3
Max Retransmit 6
Tftp port 69
Local ports pool (nothing in here)

Advanced TFTPD Options:
[X] Option negotiation
[ ] PXE Compatibility
[X] Show Progress bar
[X] Translate Unix file names
[ ] Use TFTPD32 only on this interface
[ ] Use anticipation window of 0 Bytes
[X] Allow ´\´ As virtual root
[ ] Hide Window at startup
[ ] Create “dir.txt” files
[ ] Create md5 files
[ ] Beep for long transfer

Press Ok.

Go to the DHCP Server tab and enter following Details depending on your Network configuration:

IP Pool starting adress: Should be +1 of your NIC IP if you got no other PC in your network
Size of Pool: Choose yourself how many clients you want to get in there. I picked 20, get no problems with leases...
Boot File: Depends on wheter you install with or without pxelinux.0. If with, you enter there pxelinux.0, if without the right thing is startrom.0
Rest: Set it appopriate to your network - and Press the big long "SAVE" Button!

Copy the files from - Creating the BartPE CD and - Preparing Boot Files Step into the tftpboot Folder.
You should have there by now:

NTLDR, startrom.0, startrom.com, ntdetect.com, winnt.sif, ramdisk.sys, ramdisk.inf, BartPE.iso

Now lets start with the real thing, only do ONE of these both things:

- without pxelinux.0
Really Easy: Just be sure that you set DHCP Boot file to startrom.0. And thats it!

- with pxelinux.0
A little bit more challenging, but still easy:
Extract the Syslinux-3.11.zip
Get the file menu.c32 from com32/modules, copy to the tftpboot
Get the file memdisk from root Folder, copy to the tftpboot
Get the file pxelinux.0, copy to the tftpboot
Create an folder in the tftpboot with the name pxelinux.cfg
Create an file in the folder pxelinux.cfg with the name default (no File ending and such) with following content:

DEFAULT menu.c32
TIMEOUT 300
ALLOWOPTIONS 0
PROMPT 0
MENU TITLE PXE Boot System
label pebuilder
MENU LABEL ^1: BartPE starten
KERNEL startrom.0
label BootNormal
MENU LABEL ^Boot Normal
LOCALBOOT 0

Be sure that you set DHCP Boot file to pxelinux.0

And thats it.

Note that you can integrate many programs into BartPE! Check out their website.
And do also note: It takes RAM on your client PC!
Normally you should be Ok if your RAM is not smaller than the BartPE.iso + 64 MB.
So don't over do it 😉

Have fun, and thanks for the both guidelines, without them I would have never figured that all out!

Notes:
- You should be able to build BartPE also with an normal Windows XP CD (if it should be higher than SP1), but you still need the Bootfiles to come from Win XP Server SP1 Package (you can download that for free from Microsoft) (Never tested that way!)
- One did set "Anticipation window of 50000 bytes" in the Advanced Tftpd Settings and said that I would speed up tftp transfer. Well, for me, it did just kill the whole process. So I DO NOT recommend that - but maybe its only a flaw in the current tftpd version, so I keep that still in here as note.
- If you use Windows Server as DHCP, these settings has to be set for your scoop: -003 Router (gateway IP), -066 Boot Server Host name (tftp server ip) -067 Bootfile Name (pxelinux.0 or startrom.0)
- Keep an eye out for filenames upper and lowecases if you use Linux / Unix as server! (everything writen lowercase execept NTLDR and BARTPE.ISO)

MozBackup and RocketDock

Two really useful pieces of programming code:

MozBackup does Backup your Thunderbird, Firefox, etc Installations (even with commandline parameters (use it with rsync!!!)) under windows.
http://mozbackup.jasnapaka.com/

Rocketdock is one of these new stylish docking bars as known from MacOS X. Together with the addon "Stack Docklet", this thing is REALLY useful to get your shortcuts organized and handy under windows (2000, xp, vista, 7)! ^.^
http://rocketdock.com/

Enjoy and have a great day,

Nico

PC doesn't boot (Black Screen of Death)

Normal things that go wrong and you should check up on a "total black" screen:
- Try to reset via reseting power
- Are the fans running?
- Is the power supply working (exchange)?
- Is the ram connected (replug, exchange)?
- Is the cpu ok (exchange)?
- Is the graphics card working (replug, exchange)?
- Is the mainboard directly screwed to the frame (shortcircuted)?
- Is the mainboard screwed with too much pressure (cracks)?
- Unplug LEDs, Front USB etc. (maybe shortcircuted)
- CMOS Reset
- Try to plug out and remove everything not needed to show your some bios messages (even Harddrive and Cdrom)
- What about the internal speaker? Got some nice post beeps? (Check out manual of the vendor!)

PXE Boot Acronis True Image Home 11

Files needed:
- smartdrv.exe
- TFTPD Server
- pxelinux.0
- memdisk

- Download and unzip TFTD Server, create Folder “root”.
- Start TFTP Server
Settings:
- Server Interface: Choose the right NIC
- DHCP Server:
Start Pool: 192.168.2.40
Size of pool: 4
Boot File: pxelinux.0
WINS/DNS Server: 192.168.2.1
Default Router: 192.168.2.1
Mask: 255.255.255.0
->> Press Save
- Under "Seetings"

Base Directory to the created "root" Folder
TFTP Security "None"
PXE Compatibility
->> Press OK
- Copy memdisk, pxelinux.0 and smartdrv.exe to the root Folder
- Also copy kernel.dat and ramdisk.dat from the Acronis Resuce Disc into the root Folder
- create pxelinux.cfg Folder within root
- create File with Name “default” (no .txt or such!) with following stuff inside:
LABEL acronis
KERNEL kernel.dat
APPEND initrd=ramdisk.dat vga=791 ramdisk_size=32768 acpi=off quiet noapic

- Connect the Laptop to the Network, choose PXE / NIC as Bootmedia in the BIOS.
- Let that thing boot to PXE and enter acronis at the boot: prompt
- Have fun!

Orginal taken from: http://www.networkcomputing.de/aus-dem-testlabor-linux-pxe-server-fuer-restore-mit-true-image-bereitstellen/seite/2/?no_cache=1

The DHCP Settings are important as well!
Also set firewall to off!

Remove Files on Windows that "just doesn't want to be removed"

If you can't remove a file on Windows, its mostly because of the usage of a too long filename, invalid characters and such.
To solve that there are many tools like unlockers and such which doesn't solve the problem because they doesn't solve the sympthoms:
The filenames.

So if you step into that kind of problem, open up and commandline and cd to the folder with the "bad" file or file.

And then, do an quick dir /X

That will show up the normal Filename as well as the old "Dos-Style" 8 character name.
By using that short name, you can delete a file with a simple del filename or an folder with an rmdir foldername

Easy, ain't it?