مدیریت آسان ماشین مجازی با ابزار libguestfs – قسمت دوم

مدیریت آسان ماشین مجازی با ابزار libguestfs

گروه آموزشی مجموعه تدبیر

virt-copy-out: فایل و دایرکتوری‌های داخل ماشین مجازی را به بیرون از ماشین کپی می‌کند.

1
2
#virt-copy-out -d name /home/  /home/back_up
#virt-copy-out -a image.vm /home/  /home/back_up

virt-df: فضای خالی ماشین مجازی را نشان می‌دهد.

1
2
3
#virt-df domname
#virt-df [–options] -d domname
#virt-df [–options] -a disk.img

مثالی از عملکرد برنامه:

1
2
3
4
5
6
7
#virt-df -a vm
Filesystem                           1K-blocks       Used  Available  Use%
vm:/dev/sda1                            330215     119878     193288   37%
vm:/dev/sda5                           2879612     361160    2372176   13%
vm:/dev/sda6                           1412048      93520    1246800    7%
vm:/dev/sda8                            238986       6175     220472    3%
vm:/dev/sda9                           2913876      69964    2695896    3%

virt-v2v: ماشین‌های مجازی Xen و یا VMware را به KVM تبدیل می‌کند.

virt-p2v: اطلاعات یک سیستم فیزیکی را برای اجرا بروی KVM تبدیل می‌کند.

guestmount: فایل سیستم ماشین مجازی مهمان را در سیستم میزبان مونت می‌کند. با توجه به اینکه یک ایمیج ممکن است شامل چند پارتیشن باشد با پارامتر ‎-m پارتیشنی که می‌خواهیم مونت کنیم را مشخص می‌کنیم. همچنین با استفاده از پارامتر ‎-i به صورت خودکار پارتیشن‌ها شناسایی شده و مونت می‌شوند.

1
2
3
#guestmount [–options] -a disk.img -m device [–ro] mountpoint
#guestmount [–options] -a disk.img -i [–ro] mountpoint
#guestmount [–options] -d name -i [–ro] mountpoint

چند مثال:

پارتیشن روت را از مسیر ‎/dev/VG/LV و پارتیشن ‎/boot را از مسیر ‎/dev/sda1 در دایرکتوری ‎/mnt مونت می‌کنیم.

1
#guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot –ro /mnt

همه پارتیشن‌های ایمیج guest به صورت خودکار شناسایی و در ‎/mnt مونت می‌شوند.

1
#guestmount -a guest.img -i –ro /mnt

برای از حالت مونت خارج کردن پارتیشن‌ها از دستور guestunmount به صورت زیر استفاده می‌کنیم.

1
#guestunmount /mnt

نکته: نوشتن در ماشین مجازی که روشن است ممکن است باعث خراب شدن و از دست رفتن اطلاعات شود. بنابراین بهتر است در هنگام مونت کردن ماشین مجازی که روشن است فایل سیستم را با پارامتر –ro بصورت فقط خواندنی مونت کنیم.

virt-filesystems: فایل سیستم‌ها و پارتینش‌های موجود در یک ماشین مجازی را لیست می‌کند.

1
2
#virt-filesystems [–options] -d domname
#virt-filesystems [–options] -a disk.img

مثال:

1
2
3
4
5
6
#virt-filesystems -a vm.img
/dev/sda1
/dev/sda5
/dev/sda6
/dev/sda8
/dev/sda9

virt-resize: با این ابزار می‌توانیم یک ایمیج و یا دیسک ماشین مجازی را کوچک و یا بزرگ کنیم.

1
#virt-resize [–resize /dev/sdaN=[+/-]<size>[%]] [–expand /dev/sdaN] [–shrink /dev/sdaN] [–ignore /dev/sdaN] [–delete /dev/sdaN] […] indisk outdisk

virt-win-reg: با استفاده از این دستور می‌توانیم رجیستری ویندوز در ماشین مجازی را ویرایش کنیم.

1
2
3
4
5
#virt-win-reg domname ‘HKLMPathToSubkey’
#virt-win-reg domname ‘HKLMPathToSubkey’ name
#virt-win-reg domname ‘HKLMPathToSubkey’ @
#virt-win-reg –merge domname [input.reg …]
#virt-win-reg [–options] disk.img … # instead of domname

guestfish:

یک ابزار خط فرمانی و شل است که با استفاده از توابع کتاب‌خانه‌ای و API های libguestfs فایل‌سیستم ماشین‌مجازی را بررسی و ویرایش می‌کند.

 

1
#guestfish

 

برای استفاده از guestfish کافی است دستور را در ماشین مهمان وارد کنیم و دستورات با به صورت ویزارد وارد کنیم.

1
2
3
4
5
6
7
#guestfish
Welcome toguestfish,the libguestfs filesystem interactive shell for
editing virtual machine filesystems.
Type:’help’forhelp on commands
      ‘man’toread the manual
      ‘quit’toquit the shell
><fs>

بعد از ورود به شل guestfish می‌توانیم دستورات را وارد کنیم. بع عنوان مثال با add-ro disk.img یک ایمیج را به صورت فقط خواندنی اضافه می‌کنیم.

1
2
3
4
5
6
7
8
><fs>add-ro vm.img
><fs>run
><fs>mount/dev/vda1/
><fs>ls/root
.aptitude
.bashrc
.profile
><fs>exit

در حال حاظر guestfish ۵۰۲ دستور متفاوت را پشتیبانی می‌کند. لیست این دستورات را در لینک زیر مشاهده می‌کنید.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
    Command              Description
help                 displayalist of commands orhelp onacommand
quit                 quit guestfish
acl-delete-def-file  delete the defaultPOSIX ACL ofadirectory
acl-get-file         get the POSIX ACL attached toafile
acl-set-file         set the POSIX ACL attached toafile
add-cdrom            addaCD-ROM disc image toexamine
add-domain           add the disc(s)fromanamed libvirt domain
add-drive            add an image toexamine ormodify
add-drive-ro         addadrive insnapshot mode(read-only)
add-drive-ro-with-ifaddadrive read-only specifying the QEMU block emulation touse
add-drive-with-if    addadrive specifying the QEMU block emulation touse
alloc                allocate andaddadisc file
aug-clear            clear Augeas path
aug-close            close the current Augeas handle
aug-defnode          define an Augeas node
aug-defvar           define an Augeas variable
aug-get              look up the value of an Augeas path
aug-init             createanewAugeas handle
aug-insert           insertasibling Augeas node
aug-load             load files into the tree
aug-ls               list Augeas nodes under augpath
aug-match            returnAugeas nodes which match augpath
aug-mv               move Augeas node
aug-rm               remove an Augeas path
aug-save             write all pending Augeas changes todisk
aug-set              set Augeas path tovalue
available            test availability of some parts of the API
available-all-groups returnalist of all optional groups
base64-in            upload base64-encoded data tofile
base64-out           download file andencode asbase64
blkid                print block device attributes
blockdev-flushbufs   flush device buffers
blockdev-getbsz      get blocksize of block device
blockdev-getro       isblock device set toread-only
blockdev-getsize64   get total size of device inbytes
blockdev-getss       get sectorsize of block device
blockdev-getsz       get total size of device in512-bytesectors
blockdev-rereadpt    reread partition table
blockdev-setbsz      set blocksize of block device
blockdev-setro       set block device toread-only
blockdev-setrw       set block device toread-write
btrfs-device-add     add devices toabtrfs filesystem
btrfs-device-delete  remove devices fromabtrfs filesystem
btrfs-filesystem-balance balanceabtrfs filesystem
btrfs-filesystem-resize resizeabtrfs filesystem
btrfs-filesystem-sync syncabtrfs filesystem
btrfs-fsck           checkabtrfs filesystem
btrfs-set-seeding    enable ordisable the seeding feature of device
btrfs-subvolume-create createabtrfs snapshot
btrfs-subvolume-delete deleteabtrfs snapshot
btrfs-subvolume-list list btrfs snapshots andsubvolumes
btrfs-subvolume-set-defaultset defaultbtrfs subvolume
btrfs-subvolume-snapshot createawritable btrfs snapshot
canonical-device-name returncanonical device name
cap-get-file         get the Linux capabilities attached toafile
cap-set-file         set the Linux capabilities attached toafile
case-sensitive-path  returntruepath on case-insensitive filesystem
cat                  list the contents ofafile
checksum             compute MD5,SHAx orCRC checksum of file
checksum-device      compute MD5,SHAx orCRC checksum of the contents ofadevice
checksums-out        compute MD5,SHAx orCRC checksum of files inadirectory
chmod                change file mode
chown                change file owner andgroup
command              runacommand from the guest filesystem
command-lines        runacommand,returning lines
compress-device-out  output compressed device
compress-out         output compressed file
config               add qemu parameters
copy-device-to-device copy from source device todestination device
copy-device-to-file  copy from source device todestination file
copy-file-to-device  copy from source file todestination device
copy-file-to-file    copy from source file todestination file
copy-in              copy local files ordirectories into an image
copy-out             copy remote files ordirectories out of an image
copy-size            copy size bytes from source todestination using dd
cp                   copyafile
cp-a                 copyafile ordirectory recursively
dd                   copy from source todestination using dd
debug                debugging andinternals
debug-drives         debug the drives(internal useonly)
debug-upload         uploadafile tothe appliance(internal useonly)
delete-event         deleteapreviously registered event handler
device-index         convert device toindex
df                   report file system disk space usage
df-h                 report file system disk space usage(human readable)
disk-format          detect the disk format ofadisk image
disk-has-backing-file returnwhether disk hasabacking file
disk-virtual-size    returnvirtual size ofadisk
display              display an image
dmesg                returnkernel messages
download             downloadafile tothe local machine
download-offset      downloadafile tothe local machine with offset andsize
drop-caches          drop kernel page cache,dentries andinodes
du                   estimate file space usage
e2fsck               check an ext2/ext3 filesystem
e2fsck-f             check an ext2/ext3 filesystem
echo                 displayaline of text
echo-daemon          echo arguments back tothe client
edit                 editafile
egrep                returnlines matchingapattern
egrepi               returnlines matchingapattern
equal                test iftwo files have equal contents
event                registerahandler foran event orevents
exists               test iffile ordirectory exists
fallocate            preallocateafile inthe guest filesystem
fallocate64          preallocateafile inthe guest filesystem
fgrep                returnlines matchingapattern
fgrepi               returnlines matchingapattern
file                 determine file type
file-architecture    detect the architecture ofabinary file
filesize             returnthe size of the file inbytes
filesystem-available check iffilesystem isavailable
fill                 fillafile with octets
fill-dir             filladirectory with empty files
fill-pattern         fillafile witharepeating pattern of bytes
find                 find all files anddirectories
find0                find all files anddirectories,returning NUL-separated list
findfs-label         findafilesystem by label
findfs-uuid          findafilesystem by UUID
fsck                 run the filesystem checker
fstrim               trim free space inafilesystem
get-append           get the additional kernel options
get-attach-method    get the attach method
get-autosync         get autosync mode
get-cachedir         get the appliance cache directory
get-direct           get direct appliance mode flag
get-e2attrs          get ext2 file attributes ofafile
get-e2generation     get ext2 file generation ofafile
get-e2label          get the ext2/3/4filesystem label
get-e2uuid           get the ext2/3/4filesystem UUID
get-libvirt-requested-credential-challenge challenge ofi’th requested credential
get-libvirt-requested-credential-defresult default result of i’th requested credential
get-libvirt-requested-credential-prompt prompt ofi’th requested credential
get-libvirt-requested-credentials get list of credentials requested by libvirt
get-memsize          get memory allocated tothe qemu subprocess
get-network          get enable network flag
get-path             get the search path
get-pgroup           get process group flag
get-pid              get PID of qemu subprocess
get-qemu             get the qemu binary
get-recovery-proc    get recovery process enabled flag
get-selinux          get SELinux enabled flag
get-smp              get number of virtual CPUs inappliance
get-tmpdir           get the temporary directory
get-trace            get command trace enabled flag
get-umask            get the current umask
get-verbose          get verbose mode
getcon               get SELinux security context
getxattr             getasingle extended attribute
getxattrs            list extended attributes ofafile ordirectory
glob                 expand wildcards incommand
glob-expand          expandawildcard path
grep                 returnlines matchingapattern
grepi                returnlines matchingapattern
grub-install         install GRUB1
head                 returnfirst10lines ofafile
head-n               returnfirstNlines ofafile
hexdump              dumpafile inhexadecimal
hexedit              edit withahex editor
hivex-close          close the current hivex handle
hivex-commit         commit(write)changes back tothe hive
hivex-node-add-childaddachildnode
hivex-node-children  returnlist of nodes which are subkeys of node
hivex-node-delete-childdeleteanode(recursively)
hivex-node-get-childreturnthe named childof node
hivex-node-get-value returnthe named value
hivex-node-name      returnthe name of the node
hivex-node-parent    returnthe parentof node
hivex-node-set-value set orreplaceasingle value inanode
hivex-node-values    returnlist of values attached tonode
hivex-open           openaWindows Registry hive file
hivex-root           returnthe root node of the hive
hivex-value-key      returnthe key field from the(key,datatype,data)tuple
hivex-value-type     returnthe data type from the(key,datatype,data)tuple
hivex-value-utf8     returnthe data field from the(key,datatype,data)tuple
hivex-value-value    returnthe data field from the(key,datatype,data)tuple
initrd-cat           list the contents ofasingle file inan initrd
initrd-list          list files inan initrd
inotify-add-watch    add an inotify watch
inotify-close        close the inotify handle
inotify-files        returnlist of watched files that had events
inotify-init         create an inotify handle
inotify-read         returnlist of inotify events
inotify-rm-watch     remove an inotify watch
inspect-get-arch     get architecture of inspected operating system
inspect-get-distro   get distro of inspected operating system
inspect-get-drive-mappings get drive letter mappings
inspect-get-filesystems get filesystems associated with inspected operating system
inspect-get-format   get format of inspected operating system
inspect-get-hostname get hostname of the operating system
inspect-get-icon     get the icon corresponding tothisoperating system
inspect-get-major-version get major version of inspected operating system
inspect-get-minor-version get minor version of inspected operating system
inspect-get-mountpoints get mountpoints of inspected operating system
inspect-get-package-format get packageformat used by the operating system
inspect-get-package-management get packagemanagement tool used by the operating system
inspect-get-product-name get product name of inspected operating system
inspect-get-product-variant get product variant of inspected operating system
inspect-get-roots    returnlist of operating systems found by last inspection
inspect-get-type     get type of inspected operating system
inspect-get-windows-current-control-set get Windows CurrentControlSet of inspected operating system
inspect-get-windows-systemroot get Windows systemroot of inspected operating system
inspect-is-live      get live flag forinstall disk
inspect-is-multipart get multipart flag forinstall disk
inspect-is-netinst   get netinst(network installer)flag forinstall disk
inspect-list-applications get list of applications installed inthe operating system
inspect-list-applications2 get list of applications installed inthe operating system
inspect-os           inspect disk andreturnlist of operating systems found
is-blockdev          test ifblock device
is-chardev           test ifcharacter device
is-config            isinconfiguration state
is-dir               test ifadirectory
is-fifo              test ifFIFO(named pipe)
is-file              test ifaregular file
is-lv                test ifdevice isalogical volume
is-socket            test ifsocket
is-symlink           test ifsymbolic link
is-whole-device      test ifadevice isawhole device
is-zero              test ifafile contains all zero bytes
is-zero-device       test ifadevice contains all zero bytes
isoinfo              get ISO information from primary volume descriptor of ISO file
isoinfo-device       get ISO information from primary volume descriptor of device
kill-subprocess      kill the qemu subprocess
launch               launch the qemu subprocess
lcd                  change working directory
lchown               change file owner andgroup
ldmtool-create-all   scan andcreate Windows dynamic disk volumes
ldmtool-diskgroup-disks returnthe disks inaWindows dynamic disk group
ldmtool-diskgroup-name returnthe name ofaWindows dynamic disk group
ldmtool-diskgroup-volumes returnthe volumes inaWindows dynamic disk group
ldmtool-remove-all   remove all Windows dynamic disk volumes
ldmtool-scan         scan forWindows dynamic disks
ldmtool-scan-devices scan forWindows dynamic disks
ldmtool-volume-hint  returnthe hint field ofaWindows dynamic disk volume
ldmtool-volume-partitions returnthe partitions inaWindows dynamic disk volume
ldmtool-volume-type  returnthe type ofaWindows dynamic disk volume
lgetxattr            getasingle extended attribute
lgetxattrs           list extended attributes ofafile ordirectory
list-9p              list9pfilesystems
list-devices         list the block devices
list-disk-labels     mapping of disk labels todevices
list-dm-devices      list device mapper devices
list-events          list event handlers
list-filesystems     list filesystems
list-ldm-partitions  list all Windows dynamic disk partitions
list-ldm-volumes     list all Windows dynamic disk volumes
list-md-devices      list Linux md(RAID)devices
list-partitions      list the partitions
ll                   list the files inadirectory(longformat)
llz                  list the files inadirectory(longformat with SELinux contexts)
ln                   createahard link
ln-f                 createahard link
ln-s                 createasymbolic link
ln-sf                createasymbolic link
lremovexattr         remove extended attribute ofafile ordirectory
ls                   list the files inadirectory
ls0                  get list of files inadirectory
lsetxattr            set extended attribute ofafile ordirectory
lstat                get file information forasymbolic link
lstatlist            lstat on multiple files
luks-add-key         addakey onaLUKS encrypted device
luks-close           closeaLUKS device
luks-format          formatablock device asaLUKS encrypted device
luks-format-cipher   formatablock device asaLUKS encrypted device
luks-kill-slot       removeakey fromaLUKS encrypted device
luks-open            openaLUKS-encrypted block device
luks-open-ro         openaLUKS-encrypted block device read-only
lvcreate             create an LVM logical volume
lvcreate-free        create an LVM logical volume in%remaining free space
lvm-canonical-lv-name get canonical name of an LV
lvm-clear-filter     clear LVM device filter
lvm-remove-all       remove all LVM LVs,VGs andPVs
lvm-set-filter       set LVM device filter
lvremove             remove an LVM logical volume
lvrename             rename an LVM logical volume
lvresize             resize an LVM logical volume
lvresize-free        expand an LV tofill free space
lvs                  list the LVM logical volumes(LVs)
lvs-full             list the LVM logical volumes(LVs)
lvuuid               get the UUID ofalogical volume
lxattrlist           lgetxattr on multiple files
man                  open the manual
max-disks            maximum number of disks that may be added
md-create            createaLinux md(RAID)device
md-detail            obtain metadata foran MD device
md-stat              get underlying devices from an MD device
md-stop              stopaLinux md(RAID)device
mkdir                createadirectory
mkdir-mode           createadirectory withaparticular mode
mkdir-p              createadirectory andparents
mkdtemp              createatemporary directory
mke2fs               create an ext2/ext3/ext4 filesystem on device
mke2fs-J             make ext2/3/4filesystem with external journal
mke2fs-JL            make ext2/3/4filesystem with external journal
mke2fs-JU            make ext2/3/4filesystem with external journal
mke2journal          make ext2/3/4external journal
mke2journal-L        make ext2/3/4external journal with label
mke2journal-U        make ext2/3/4external journal with UUID
mkfifo               make FIFO(named pipe)
mkfs                 makeafilesystem
mkfs-b               makeafilesystem with block size
mkfs-btrfs           createabtrfs filesystem
mklost-and-found     make lost+found directory on an ext2/3/4filesystem
mkmountpoint         createamountpoint
mknod                make block,character orFIFO devices
mknod-b              make block device node
mknod-c              make chardevice node
mkswap               createaswap partition
mkswap-L             createaswap partition withalabel
mkswap-U             createaswap partition with an explicit UUID
mkswap-file          createaswap file
mktemp               createatemporary file
modprobe             loadakernel module
more                 viewafile
mount                mountaguest disk ataposition inthe filesystem
mount-9p             mount9pfilesystem
mount-local          mount on the local filesystem
mount-local-run      run main loop of mount on the local filesystem
mount-loop           mountafile using the loop device
mount-options        mountaguest disk with mount options
mount-ro             mountaguest disk,read-only
mount-vfs            mountaguest disk with mount options andvfstype
mountpoints          show mountpoints
mounts               show mounted filesystems
mv                   moveafile
nr-devices           returnnumber of whole block devices(disks)added
ntfs-3g-probe        probe NTFS volume
ntfsclone-in         restore NTFS from backup file
ntfsclone-out        save NTFS tobackup file
ntfsfix              fix common errors andforce Windows tocheck NTFS
ntfsresize           resize an NTFS filesystem
ntfsresize-size      resize an NTFS filesystem(with size)
parse-environment    parse the environment andset handle flags accordingly
parse-environment-list parse the environment andset handle flags accordingly
part-add             addapartition tothe device
part-del             deleteapartition
part-disk            partition whole disk withasingle primary partition
part-get-bootable    returntrueifapartition isbootable
part-get-gpt-type    get the type GUID ofaGPT partition
part-get-mbr-id      get the MBR type byte(ID byte)fromapartition
part-get-parttype    get the partition table type
part-init            create an empty partition table
part-list            list partitions onadevice
part-set-bootable    makeapartition bootable
part-set-gpt-type    set the type GUID ofaGPT partition
part-set-mbr-id      set the MBR type byte(ID byte)ofapartition
part-set-name        set partition name
part-to-dev          convert partition name todevice name
part-to-partnum      convert partition name topartition number
ping-daemon          ping the guest daemon
pread                read part ofafile
pread-device         read part ofadevice
pvchange-uuid        generateanewrandom UUID foraphysical volume
pvchange-uuid-all    generate newrandom UUIDs forall physical volumes
pvcreate             create an LVM physical volume
pvremove             remove an LVM physical volume
pvresize             resize an LVM physical volume
pvresize-size        resize an LVM physical volume(with size)
pvs                  list the LVM physical volumes(PVs)
pvs-full             list the LVM physical volumes(PVs)
pvuuid               get the UUID ofaphysical volume
pwrite               write topart ofafile
pwrite-device        write topart ofadevice
read-file            readafile
read-lines           read file aslines
readdir              read directories entries
readlink             read the target ofasymbolic link
readlinklist         readlink on multiple files
realpath             canonicalized absolute pathname
remove-drive         removeadisk image
removexattr          remove extended attribute ofafile ordirectory
rename               renameafile on the same filesystem
reopen               close andreopen libguestfs handle
resize2fs            resize an ext2,ext3 orext4 filesystem
resize2fs-M          resize an ext2,ext3 orext4 filesystem tothe minimum size
resize2fs-size       resize an ext2,ext3 orext4 filesystem(with size)
rm                   removeafile
rm-f                 removeafile ignoring errors
rm-rf                removeafile ordirectory recursively
rmdir                removeadirectory
rmmountpoint         removeamountpoint
rsync                synchronize the contents of two directories
rsync-in             synchronize host orremote filesystem with filesystem
rsync-out            synchronize filesystem with host orremote filesystem
scrub-device         scrub(securely wipe)adevice
scrub-file           scrub(securely wipe)afile
scrub-freespace      scrub(securely wipe)free space
set-append           add options tokernel command line
set-attach-method    set the attach method
set-autosync         set autosync mode
set-cachedir         set the appliance cache directory
set-direct           enable ordisable direct appliance mode
set-e2attrs          set ext2 file attributes ofafile
set-e2generation     set ext2 file generation ofafile
set-e2label          set the ext2/3/4filesystem label
set-e2uuid           set the ext2/3/4filesystem UUID
set-label            set filesystem label
set-libvirt-requested-credential pass requested credential back tolibvirt
set-libvirt-supported-credentials set libvirt credentials supported by calling program
set-memsize          set memory allocated tothe qemu subprocess
set-network          set enable network flag
set-path             set the search path
set-pgroup           set process group flag
set-qemu             set the qemu binary
set-recovery-proc    enable ordisable the recovery process
set-selinux          set SELinux enabled ordisabled at appliance boot
set-smp              set number of virtual CPUs inappliance
set-tmpdir           set the temporary directory
set-trace            enable ordisable command traces
set-verbose          set verbose mode
setcon               set SELinux security context
setenv               set an environment variable
setxattr             set extended attribute ofafile ordirectory
sfdisk               create partitions onablock device
sfdiskM              create partitions onablock device
sfdisk-N             modifyasingle partition onablock device
sfdisk-disk-geometry display the disk geometry from the partition table
sfdisk-kernel-geometry display the kernel geometry
sfdisk-l             display the partition table
sh                   runacommand via the shell
sh-lines             runacommand via the shell returning lines
shutdown             shutdown the qemu subprocess
sleep                sleep forsome seconds
sparse               createasparse disk image andadd
stat                 get file information
statvfs              get file system statistics
strings              print the printable strings inafile
strings-e            print the printable strings inafile
supported            list supported groups of commands
swapoff-device       disable swap on device
swapoff-file         disable swap on file
swapoff-label        disable swap on labeled swap partition
swapoff-uuid         disable swap on swap partition by UUID
swapon-device        enable swap on device
swapon-file          enable swap on file
swapon-label         enable swap on labeled swap partition
swapon-uuid          enable swap on swap partition by UUID
sync                 sync disks,writes are flushed through tothe disk image
tail                 returnlast10lines ofafile
tail-n               returnlastNlines ofafile
tar-in               unpack tarfile todirectory
tar-out              pack directory into tarfile
tgz-in               unpack compressed tarball todirectory
tgz-out              pack directory into compressed tarball
time                 print elapsed time taken torunacommand
touch                update file timestamps orcreateanewfile
truncate             truncateafile tozero size
truncate-size        truncateafile toaparticular size
tune2fs              adjust ext2/ext3/ext4 filesystem parameters
tune2fs-l            get ext2/ext3/ext4 superblock details
txz-in               unpack compressed tarball todirectory
txz-out              pack directory into compressed tarball
umask                set file mode creation mask(umask)
umount               unmountafilesystem
umount-all           unmount all filesystems
umount-local         unmountalocally mounted filesystem
unsetenv             unset an environment variable
upload               uploadafile from the local machine
upload-offset        uploadafile from the local machine with offset
user-cancel          cancel the current upload ordownload operation
utimens              set timestamp ofafile with nanosecond precision
utsname              appliance kernel version
version              get the library version number
vfs-label            get the filesystem label
vfs-type             get the Linux VFS type corresponding toamounted device
vfs-uuid             get the filesystem UUID
vg-activate          activate ordeactivate some volume groups
vg-activate-all      activate ordeactivate all volume groups
vgchange-uuid        generateanewrandom UUID foravolume group
vgchange-uuid-all    generate newrandom UUIDs forall volume groups
vgcreate             create an LVM volume group
vglvuuids            get the LV UUIDs of all LVs inthe volume group
vgmeta               get volume group metadata
vgpvuuids            get the PV UUIDs containing the volume group
vgremove             remove an LVM volume group
vgrename             rename an LVM volume group
vgs                  list the LVM volume groups(VGs)
vgs-full             list the LVM volume groups(VGs)
vgscan               rescan forLVM physical volumes,volume groups andlogical volumes
vguuid               get the UUID ofavolume group
wc-c                 count characters inafile
wc-l                 count lines inafile
wc-w                 count words inafile
wipefs               wipeafilesystem signature fromadevice
write                createanewfile
write-append         append content toendof file
write-file           createafile
xfs-admin            change parameters of an XFS filesystem
xfs-growfs           expand an existing XFS filesystem
xfs-info             get geometry of XFS filesystem
xfs-repair           repair an XFS filesystem
zegrep               returnlines matchingapattern
zegrepi              returnlines matchingapattern
zero                 write zeroes tothe device
zero-device          write zeroes toan entire device
zero-free-space      zero free space inafilesystem
zerofree             zero unused inodes anddisk blocks on ext2/3filesystem
zfgrep               returnlines matchingapattern
zfgrepi              returnlines matchingapattern
zfile                determine file type insideacompressed file
zgrep                returnlines matchingapattern
zgrepi               returnlines matchingapattern
    Use-h  /help  toshow detailed help foracommand.