Purpose: Easily manage xen virtual machines with xm commands. Command list:
xm list: list of all known virtual machines xm create: start an unmanaged virtual machine xm top: provide a state overview of all virtual machines xm console: open console management virtual machine xm new : Add virtual machine to Xenbase hosting environment xm start: Start virtual machine xm destroy from Xenbase hosted environment: Shut down virtual machine like power off xm shutdown: Turn off virtual machine correctly xm reboot: Restart virtual machine xm pause: pause virtual The activity of the machine without releasing the memory resources used xm unpause: Activate the virtual machine xm saved with the xm pause command save: save the virtual machine state to a file xm restore: restart the virtual machine xm block-attach that has been saved in the file: Add a new hard disk xm block-detach: delete a hard disk.
The following explains some important commands (1), showing all running virtual machines
[root@localhost ~]#xm list Name ID Mem(MiB) VCPUs State Time(s ) Domain-0 0 32768 16 r----- 210.9 appdata_vm 1 6113 8 -b---- 202.3 mongo_vm 2 8191 8 -b---- 31.8 mysql_vm 3 6113 8 -b---- 31.3 queue_vm 4 6113 8 -b---- 31.5
(2), run a virtual machine
[root@localhost ~]#xm create /etc/xen/appdata_vm Using config file "/etc /xen/appdata_vm". Started domain appdata_vm
(3), enter a virtual machine for management
[root@localhost ~]#xm console appdata_vm
(4) Shut down the virtual machine
[root@localhost ~]#xm shutdown appdata_vm
(5), restart the virtual machine
[root@localhost ~]#xm reboot appdata_vm< Br>
(6), increase the hard disk space of the xen virtual machine
Use the dd command to make a 30GB hard disk device. [root@localhost ~]#dd if=/dev/zero bs=1024k count=30720 >> /data/appdata_vm.img Add to virtual machine [root@localhost ~]#xm block-attach appdata_vm tap:aio: /data/appdata_vm.img xvdb w Enter the virtual machine to format and mount the device [root@localhost ~]#xm console appdata_vm [root@localhost ~]#fdisk -l Disk /dev/xvdb: 32.2 GB, 32212254720 bytes 255 Heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb doesn't contain a valid partition table Found /dev/xvdb this is the hard drive I just added Settings. [root@localhost ~]#mkfs.ext3 /dev/xvdb Format [root@localhost ~]#mount /dev/xvdb /home Mount to /home directory. View [root@localhost ~]#df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda3 6.8G 1.9G 4.6G 30% //dev/xvda1 494M 18M 451M 4% /boot /dev/xvdb 30G 173M 28G 1% /home tmpfs 3.0G 0 3.0G 0% /dev/shm
My hard drive adds 30G of space.
1. /The root partition is a mandatory partition, partitioned according to your actual situation. 2.
The process is simply a process of executing a program, it is a dynamic concept. No matter what sys
1. Restart the server2. At the beginning of the boot, enter the boot interface (as shown below) and
If you are a Linux user, you may have heard that you dont need to defrag your Linux files system. Yo
Linux must learn 60 commands Daquan
How does Linux solve system problems with fsck?
Detailed TCP programming functions and steps
Linux dual network card dual gateway settings for different IP segments
Kdump and crash configuration methods and failure analysis methods
Linux ends with a keyword process (batch kill process method)
Low-key literary lizard: remember SUSE Linux 20th Anniversary
Daren Hall: teach you to easily restore Linux password
How Linux shrinks the lvm root partition
8 classic tips for Linux operating system
Considerations for using ssh to manage VPS under Linux
The meaning and difference between Linux chmod 755 and chmod 777
Delete "useless" thumbnail cache file
How to display the lunar calendar and weather in the Win7 taskbar time zone?
Ubuntu system apt command usage summary
Detailed IE10 browser features in Win8 Consumer Preview (2)
Win7 file can not be copied Paste keyboard and mouse are invalid solution
Using win7 wireless routing function to make mobile phone wireless Internet
Windows 7 Application Tutorial: Explorer Window
How does Win8.1 turn off hibernation?