Following up

Too long a gap there from my last post so let me try to catch up. It struck me that I was looking at the datastore problem the wrong way (the problem being I could not delete a datastore), and even an ESXi reset did not help. The state must be on the disk itself which are scanned at start-up (I have yet to prove this theory). So instead of re-installing ESXi, which probably would not help, I re-partitioned the hard drive. At first ESXi is a bit confused, it pauses for a long time at boot but does succeed and doesn’t seem to suffer any ill effects. I had no VMs of course. I created another datastore, rebooted and ESXi just seems to forget about the old one.

Since then I have been playing with building some VMs, finding new blogs (Simon Long) and reading Ruben Spruijt’s excellent Application Virtualisation smackdown.

Plenty more projects in the pipeline!

Obscenities

My brain is screaming obscenities because I have spend the last 2 hours trying to delete a datastore from ESXi4. It’s a small 16G one (the one I was using to try and copy to a USB stick) which resides on a 500G internal SATA drive. I have been trying from the vSphere client and from the command line with more and more severe methods culminating in “Reset System Configuration” from the console. Even that didn’t work which only leaves me the option of re-burning my ESXi on USB stick.

The error is as follows:

Error from Delete Datastore

Don’t bother to ask me to try something. I’ve tried it all.

LOSUG September

I attended the Oracle LOSUG meeting on September 15th to hear a talk from Phil Kirk on Zones and Crossbow.

I also took the opportunity to meet Alasdair Lumsden (who has set up openindiana).

I scribbled down a few notes to help jog my memory.

HISTORY

  • Zones were never meant to be like VMs. They were designed as a process container.
  • Zones have a shared I/P stack and routing.
  • There is (typically) a separate I/P alias per zone.
  • IPMP works.
  • Config is done from the global zone.
  • IPfilter works (v4).
  • DHCP, IPsec, raw sockets don’t work.

Some problems with zones:

  • Non-global routing is affected by global routing table. (Some examples).
  • Using a null route is often used to add a gateway entry but this is where global routing table changes can break zones.
  • Default routes are selected round-robin.
  • defrouter option in the zone config just does a route add (nothing clever in the kernel).
  • inter-zone traffic can be forced to go over the wire. Normally it would go via loopback for efficiency but some sites require audit/logging of traffic.

NOW

  • Each zone gets its own I/P stack.
  • Config is done in the zone.
  • Lots of zones need lots of NICs.
  • Can mix shared and exclusive stacks.

CROSSBOW:

  • Virtualisation at the data (mac addr) level. vNICs.
  • vNIC gives b/w resource management (dladm).
  • vlans are supported in Crossbow.
  • P.S. What happened to my complimentary UKOUG membership?

Poking about in ESXi4.1

Just looking about, waiting for inspiration, slightly guided by the impossible aim of making a USB stick into a datastore. Here’s one snippet from the log file:

Sep  9 17:24:40 vmkernel: 0:00:00:09.737 cpu0:4497)FSS: 3924: No FS driver claimed device
 'mpx.vmhba32:C0:T0:L0:1': Not supported

And here’s another useful command I ran across which lists useful information about all your storage:

/var/log # esxcli corestorage device list
t10.ATA_____ST3500418AS_________________________________________5VM89S46
Display Name: Local ATA Disk (t10.ATA_____ST3500418AS_________________________________________5VM89S46)
Size: 476940
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/t10.ATA_____ST3500418AS_________________________________________5VM89S46
Vendor: ATA
Model: ST3500418AS
Revision: CC38
SCSI Level: 5
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: false
Attached Filters:
VAAI Status: unknown
Other UIDs: vml.010000000020202020202020202020202035564d3839533436535433353030

mpx.vmhba33:C0:T0:L0
Display Name: Local USB Direct-Access (mpx.vmhba33:C0:T0:L0)
Size: 1896
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/mpx.vmhba33:C0:T0:L0
Vendor: Generic
Model: USB Flash Disk
Revision: 8.07
SCSI Level: 2
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: true
Attached Filters:
VAAI Status: unknown
Other UIDs: vml.0000000000766d68626133333a303a30

mpx.vmhba32:C0:T0:L0
Display Name: Local USB Direct-Access (mpx.vmhba32:C0:T0:L0)
Size: 15318
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0
Vendor: Single
Model: Flash Reader
Revision: 1.00
SCSI Level: 2
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: true
Attached Filters:
VAAI Status: unknown
Other UIDs: vml.0000000000766d68626133323a303a30

t10.ATA_____Hitachi_HDS721010CLA332_______________________JP2911HQ0MK9TA
Display Name: Local ATA Disk (t10.ATA_____Hitachi_HDS721010CLA332_______________________JP2911HQ0MK9TA)
Size: 953869
Device Type: Direct-Access
Multipath Plugin: NMP
Devfs Path: /vmfs/devices/disks/t10.ATA_____Hitachi_HDS721010CLA332_______________________JP2911HQ0MK9TA
Vendor: ATA
Model: Hitachi HDS72101
Revision: JP4O
SCSI Level: 5
Is Pseudo: false
Status: on
Is RDM Capable: false
Is Local: true
Is Removable: false
Attached Filters:
VAAI Status: unknown
Other UIDs: vml.01000000002020202020204a50323931314851304d4b395441486974616368

Actually, that looks like

esxcfg-scsidevs -l

in another format.

I did try again to create a filesystem on my USB device with the usual result:

/sbin # vmkfstools -C vmfs3 /dev/disks/mpx.vmhba32:C0:T0:L0
Checking if remote hosts are using this device as a valid file system. This may take a few seconds...
Creating vmfs3 file system on "mpx.vmhba32:C0:T0:L0" with blockSize 1048576 and volume label "none".
/dev/disks/mpx.vmhba32:C0:T0:L0: Permission denied.  (Have you set the partition type to 0xfb?)
Error: Permission denied
/sbin # 

There doesn’t seem to be a way to make other filesystem types from the command line, but then, why would there be?

Moving swiftly on, there are plenty of other commands to play with, e.g.

 /sbin # esxcfg-info

prints hundreds of lines of config.

By my count there are 157 commands to explore in /bin and /sbin. I got that number by the following command:

/bin # find /bin /sbin -type f -perm +100 -exec ls -l {} \; | wc -l

Disabled ESXi 4.1 USB passthrough

I figured out a way to see both my USB sticks in the ESXi busybox shell. If you read my previous post you will know that the system enables passthrough of the non-boot USB devices for use by guests by default.

Whether or not there is a “right” way to do this I don’t know (vmware kb or google don’t turn up much of use).

So, going back to that mine of information, the messages file, I notice that /sbin/chkconfig is run immediately before it states that usb passthrough is enabled. Running /sbin/chkconfig –list shows:

~ # /sbin/chkconfig --list
DCUI on
TSM-SSH on
TSM on
usbarbitrator on
lbtd on
storageRM on
sensord on
vprobed on
vobd on
wsman on
slpd on
sfcbd-watchdog on
sfcbd off
ntpd on
hostd on
iked off
lwiod off
netlogond off
lsassd off
~ #

So as a guess I changed usbarbitrator to off with the following command:

~ # /sbin/chkconfig usbarbitrator off

Rebooting the system and looking again, I can now see both the devices: mpx.vmhba33 (the boot USB) and mpx.vmhba32 (my target datastore). The later appears as a FAT partition, despite my trying to dd my vmfs3 filesystem over the top of it.

I will try more dd experiments at the next free slot.

At least I made some progress!