Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Mon Jan 21, 2019 5:00 pm


Username:
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
Font size:
 
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation code
Confirmation code:
In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.
     

Topic review - Vmware ESXi: vmkfstools: Extra arguments at the end of the command line.
Author Message
Post subject: Vmware ESXi: vmkfstools: Extra arguments at the end of the command line.  |  Post Posted: Tue Jan 16, 2018 6:11 am
Code:
# vmkfstools -c 5G –diskformat thin testdisk2.vmdk
Extra arguments at the end of the command line.

OPTIONS FOR FILE SYSTEMS:


Above command would contain hidden characters as shown below:
Code:
$ echo -n 'vmkfstools -c 5G –diskformat thin testdisk2.vmdk' | wc -c
      50
$ echo -n 'vmkfstools -c 5G –diskformat thin testdisk2.vmdk' | xxd
00000000: 766d 6b66 7374 6f6f 6c73 202d 6320 3547  vmkfstools -c 5G
00000010: 20e2 8093 6469 736b 666f 726d 6174 2074   ...diskformat t
00000020: 6869 6e20 7465 7374 6469 736b 322e 766d  hin testdisk2.vm
00000030: 646b                                     dk

Above copy-pasted command contains two extra illegal bytes.

As seen at offset 0x10, bytes 0x11, 0x12,0x13 ( e2 8093) contain non-ascii characters (definitely not "-"). This is what breaks the vmkfstools command if it was copy-pasted from a webpage or from notepad.

It needs to be rewriten to below (looks the same, but actually it's not):
Code:
$ echo -n 'vmkfstools -c 5G -diskformat thin testdisk2.vmdk' | wc -c
      48
$ echo -n 'vmkfstools -c 5G -diskformat thin testdisk2.vmdk' | xxd
00000000: 766d 6b66 7374 6f6f 6c73 202d 6320 3547  vmkfstools -c 5G
00000010: 202d 6469 736b 666f 726d 6174 2074 6869   -diskformat thi
00000020: 6e20 7465 7374 6469 736b 322e 766d 646b  n testdisk2.vmdk


Now, bytes 0x11 and 0x12 represent ascii "-d", so this command will work.
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO