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

FAQ
It is currently Thu Dec 07, 2023 8:38 am


Software and Hardware virtualization, Linux Kernel Virtualization Module, FreeBSD jails, Vmware, Virtualbox, Xen

Author Message
mandrei99
Post  Post subject: Vmware ESXi: vmkfstools: Extra arguments at the end of the command line.  |  Posted: Tue Jan 16, 2018 6:11 am

Joined: Tue Aug 04, 2009 9:16 am
Posts: 250

Offline
 

Vmware ESXi: vmkfstools: Extra arguments at the end of the command line.

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.





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Vmware ESXi: vmkfstools: Extra arguments at the end of the command line."
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. How to retrieve Vmware ESXi license from ssh shell command line

admin

0

10047

Wed May 03, 2017 8:51 am

admin View the latest post

There are no new unread posts for this topic. SSH Login to Vmware ESXi with ssh keys

admin

0

2237

Wed May 24, 2017 7:28 am

admin View the latest post

There are no new unread posts for this topic. How to add BIOS boot delay for particular VM in VMWare ESXi 5.x

mandrei99

0

2528

Wed Feb 19, 2014 4:05 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Vmware ESXi - esxtop output is not readable

mandrei99

0

3692

Mon Jan 26, 2015 6:53 am

mandrei99 View the latest post

There are no new unread posts for this topic. Vmware ESXi: create custom named vmdk virtual disk [cli]

mandrei99

0

2841

Tue Jan 16, 2018 6:23 am

mandrei99 View the latest post

There are no new unread posts for this topic. KVM Nested in Vmware ESXi 5.5 - enable guest hypervisor vmx/svm flags without vsphere web client

admin

0

26889

Sat Feb 21, 2015 8:21 pm

admin View the latest post

There are no new unread posts for this topic. ESXi: How to see network statistics for vSwitch port using esxcli

mandrei99

0

11233

Mon Jan 26, 2015 7:07 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cronNews 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