Professional Documents
Culture Documents
The command-line environment Working with disks Working with virtual machines
bg command puts suspended job in background Caution! ctrl-S freezes the screen; use ctrl-Q to unfreeze
2
2
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
3
3
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
Enter t to change the partition type: FB for VMFS Enter w to save partition table to disk
Warning: Changing partition table of a disk with mounted Linux file systems may require reboot
5
5
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
vmkfstools Syntax
vmkfstools -? [ otherarg otherarg ] VMkernel-path
The last argument is always a path using the VMkernels device space
Either a VMFS name (physical or friendly)
vmhba0:1:0:5 myvmfs vmhba0:1:0:5:a.dsk myvmfs:a.dsk /vmfs/vmhba0:1:0:5 /vmfs/myvmfs /vmfs/vmhba0:1:0:5/a.dsk /vmfs/myvmfs/a.dsk
6
6
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
1. Use vmkfstools N to map from VMkernel disk to a Linux device file /dev/vsdn
# vmkfstools N vmhba0:8:0:0 /dev/vsd0
Whole disk
2. fdisk /dev/vsd0
Make a partition number 1 with type FB
7
7
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
8
8
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
9
9
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
# md5sum /vmfs/myvmfs/router-2.1.dsk
77dfc2ba10c75b6ad0a1812805887e28
11
11
router-2.1.dsk
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
Now the file system inside the virtual disk does not fill the medium Use Partition Magic or the equivalent inside the VM to extend the file system
12
12
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
{nothing}
To import:
vmkfstools i /vmimages/otherdisk.dsk VOL3:other.dsk
13
13
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
14
14
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
# mkdir /myntfs # vmware-mount.pl /vmfs/ted/w2k.dsk 1 -t ntfs -o ro /myntfs In another window: # ls /myntfs AUTOEXEC.BAT CONFIG.SYS IO.SYS boot.ini Documents and Settings MSDOS.SYS
Each other line is of the form attribute = value or class.attribute = value Class can be:
A family of related items A device controller A device on a device controller
16
16
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
17
17
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
18
18
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
19
19
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
20
20
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
21
21
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
22
22
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
To start a VM:
vmware-cmd /home/ted/vmware/a/a.vmx start mode
Run normal scripts in guest OS before shutdown or after resume; Try to run scripts in guest OS; use hard trysoft mechanism if VMware Tools is not accessible soft hard Abrupt power-off; resume without running normal scripts
23
23
For ESX Server 2.0.1 2003-11-17 Copyright 2003 VMware, Inc. All rights reserved.
Questions?