In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
How to use the virtual machine management tool virt, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
1. Install the virtualization management tool virt
[root@e3 ~] # yum install libguesfs-tools virt-top# View the tools provided by the installation software [root@e3 ~] # rpm-ql virt-top/usr/bin/processcsv.py/usr/bin/virt-top [root@e3 ~] # rpm-ql libguestfs-tools-c/etc/libguestfs-tools.conf/usr/bin/guestfish/usr/bin/guestmount/usr/bin/guestunmount/usr/bin/virt-alignment-scan/usr/bin/virt-cat/usr/bin / virt-copy-in/usr/bin/virt-copy-out/usr/bin/virt-df/usr/bin/virt-edit/usr/bin/virt-filesystems/usr/bin/virt-format/usr/bin/virt-inspector/usr/bin/virt-ls/usr/bin/virt-rescue/usr/bin/virt-resize/usr/bin/virt-sparsify/usr/bin/virt-sysprep/usr/bin/virt-tar-in/usr/bin/virt-tar-out# introduction often The specific method used is to add the parameter-help man [root@e3 ~] # virt-cat-d centos6.5 / etc/passwd # to view the password file root:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nologinadm:x:3:4:adm:/var/adm:/sbin/nologinlp:x of the virtual machine centos6.5 : 4:7:lp:/var/spool/lpd:/sbin/nologinsync:x:5:0:sync:/sbin:/bin/syncshutdown:x:6:0:shutdown:/sbin:/sbin/shutdownhalt:x:7:0:halt:/sbin:/sbin/haltmail:x:8:12:mail:/var/spool/mail:/sbin/nologinuucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologinoperator:x:11:0:operator:/root:/sbin / nologingames:x:12:100:games:/usr/games:/sbin/nologingopher:x:13:30:gopher:/var/gopher:/sbin/nologinftp:x:14:50:FTP User:/var/ftp:/sbin/nologinnobody:x:99:99:Nobody:/:/sbin/nologinvcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologinsaslauth:x:499:76:Saslauthd user:/var/empty/saslauth:/sbin/nologinpostfix:x:89:89:: / var/spool/postfix:/sbin/nologinsshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin# [root@e3 ~] # virt-ls-l centos6.5 / root # View the directory -l indicates that the total 52drMurxrmurxmuri is displayed in a long format. 2 root root 4096 Jan 20 10:31. Dr-xr-xr-x. 22 root root 4096 Jan 20 10:30.-rw-. 1 root root 14 Jan 20 10:31 .bash _ history-rw-r--r--. 1 root root 18 May 20 2009 .bash _ logout-rw-r--r--. 1 root root 176 May 20 2009 .bash _ profile-rw-r--r--. 1 root root 176 Sep 23 2004. Bashrc-rw-r--r--. 1 root root 100 Sep 23 2004 .cshrc-rw-r--r--. 1 root root 129 Dec 4 2004. Tcshrc-rw-. 1 root root 1230 Jan 20 10:30 anaconda-ks.cfg-rw-r--r--. 1 root root 8823 Jan 20 10:29 install.log-rw-r--r--. 1 root root 3314 Jan 20 10:29 install.log.syslog# [root@e3 ~] # virt-edit-d centos6.5 / etc/fstab # Editing File Only if the virtual machine shuts down # # / etc/fstab# Created by anaconda on Mon Jan 19 22:27:57 2015 Accessible filesystems, by reference, are maintained under'/ dev/disk'# See man pages fstab (5), findfs (8) Mount (8) and/or blkid (8) for more info#/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1UUID=48247fd2-39c3-46fa-b05a-43645c43b7d5 / boot ext4 defaults 1 2/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0tmpfs / dev/shm Tmpfs defaults 0 0devpts / dev/pts devpts gid=5 Mode=620 0 0sysfs / sys sysfs defaults 0 0proc / proc proc defaults 0 0 ~ ~ # [root@e3 ~] # virt-df-d centos6.6 # View virtual machine mount Filesystem 1K -blocks Used Available Use%centos6.6:/dev/sda1 487652 25433 432523 6%centos6.6:/dev/VolGroup/lv_root 19003260 651816 17363080 4% # [root@e3 ~] # guestmount-d centos6.6-I / media/# [root@e3 ~] # ll / media/# Mount the virtual machine hard disk to the local / media total amount of 106dr-xr-xr-x. 2 root root 4096 January 20 02:57 bindr-xr-xr-x. 5 root root 1024 January 20 02:58 bootdrwxr-xr-x. 2 root root 4096 January 20 02:56 devdrwxr-xr-x. 61 root root 4096 January 20 02:59 etcdrwxr-xr-x. 2 root root 4096 September 23 2011 homedr-xr-xr-x. 8 root root 4096 January 20 02:57 libdr-xr-xr-x. 9 root root 12288 January 20 02:57 lib64drwx-. 2 root root 16384 January 20 02:56 lost+founddrwxr-xr-x. 2 root root 4096 September 23 2011 mediadrwxr-xr-x. 2 root root 4096 September 23 2011 mntdrwxr-xr-x. 2 root root 4096 September 23 2011 optdrwxr-xr-x. 2 root root 4096 January 20 02:56 procdr-xr-x---. 2 root root 4096 January 20 02:58 rootdr-xr-xr-x. 2 root root 12288 January 20 02:57 sbindrwxr-xr-x. 2 root root 4096 January 20 02:56 selinuxdrwxr-xr-x. 2 root root 4096 September 23 2011 srvdrwxr-xr-x. 2 root root 4096 January 20 02:56 sysdrwxrwxrwt. 3 root root 4096 January 20 04:09 tmpdrwxr-xr-x. 13 root root 4096 January 20 02:56 usrdrwxr-xr-x. 17 root root 4096 January 20 02:56 var# [root@e3 ~] # virt-top # shows virtual machine status virt-top 17:22:56-x86room64 8/8CPU 3687MHz 7891MB2 domains, 2 active, 2 running, 0 sleeping, 0 paused 0 inactive Mem 0 X:0CPU: 0.5% Mem: 1024 MB (client 1024 MB) ID S RDRQ WRRQ RXBY TXBY% CPU% MEM TIME NAME 23 R 0 1147 0 0.2 6 00 centos6.5 26 R 0 0 1147 0 0 2 0 0 6 00 centos6.6 is it helpful for you to read the above contents? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.