Proxmox 管理虛擬機器 使用「qm」指令 

在Proxmox虛擬平台方案上是用「qm」指令來進行管理,而在Linux上的virt-manager(kvm)是用「virsh」來操作管理。但我常常忘記前者,因為不常操作的關係吧!!

qm <command> <vmid> [OPTIONS]
qm [create|set] <vmid>
	--memory  <MBYTES>    memory in MB (64 - 8192)
	--sockets <N>         set number of CPU sockets <N>
	--cores <N>           set cores per socket to <N>
	--ostype NAME         specify OS type
	--onboot [yes|no]     start at boot
	--keyboard XX         set vnc keyboard layout
	--cpuunits <num>      CPU weight for a VM
	--name <text>         set a name for the VM
	--description <text>  set VM description
	--boot [a|c|d|n]      specify boot order
	--bootdisk <disk>     enable booting from <disk>
	--acpi (yes|no)       enable/disable ACPI
	--kvm (yes|no)        enable/disable KVM
	--tdf (yes|no)        enable/disable time drift fix
	--localtime (yes|no)  set the RTC to local time
	--vga (gd5446|vesa)   specify VGA type

	--vlan[0-9u]          MODEL=XX:XX:XX:XX:XX:XX[,MODEL=YY:YY:YY:YY:YY:YY]

	--ide<N>              [volume=]volume,[,media=cdrom|disk]
	                      [,cyls=c,heads=h,secs=s[,trans=t]]
	                      [,cache=none|writethrough|writeback]
	                      [,snapshot=on|off][,cache=on|off][,format=f]
	                      [,werror=enospc|ignore|report|stop]
	                      [,rerror=ignore|report|stop]
	                      [,backup=no|yes]
	--ide<N> <GBYTES>     create new disk
	--ide<N> delete       remove drive - destroy image
	--ide<N> undef        remove drive - keep image
	--cdrom <file>        is an alias for --ide2 <file>,media=cdrom

	--scsi<N>             [volume=]volume,[,media=cdrom|disk]
	                      [,cyls=c,heads=h,secs=s[,trans=t]]
	                      [,snapshot=on|off][,format=f]
	                      [,cache=none|writethrough|writeback]
	                      [,werror=enospc|ignore|report|stop]
	                      [,backup=no|yes]
	--scsi<N> <GBYTES>    create new disk
	--scsi<N> delete      remove drive - destroy image
	--scsi<N> undef       remove drive - keep image

	--virtio<N>           [volume=]volume,[,media=cdrom|disk]
	                      [,cyls=c,heads=h,secs=s[,trans=t]]
	                      [,snapshot=on|off][,format=f]
	                      [,cache=none|writethrough|writeback]
	                      [,werror=enospc|ignore|report|stop]
	                      [,rerror=ignore|report|stop]
	                      [,backup=no|yes]
	--virtio<N> <GBYTES>  create new disk
	--virtio<N> delete    remove drive - destroy image
	--virtio<N> undef     remove drive - keep image

qm monitor <vmid>       connect to vm control monitor
qm start <vmid>         start vm
qm shutdown <vmid>      gracefully stop vm (send poweroff)
qm wait <vmid> [time]   wait until vm is stopped
qm stop <vmid>          kill vm (immediate stop)
qm reset <vmid>         reset vm (stop, start)
qm suspend <vmid>       suspend vm
qm resume <vmid>        resume vm
qm cad <vmid>           sendkey ctrl-alt-delete
qm destroy <vmid>       destroy vm (delete all used/owned volumes)
qm unlock <vmid>        clear migrate/backup lock
qm status <vmid>        shows the container status

qm cdrom <vmid> [<device>] <path>  set cdrom path. <device is ide2 by default>
qm cdrom <vmid> [<device>] eject   eject cdrom

qm unlink <vmid> <volume>  delete unused disk images
qm vncproxy <vmid> <ticket>  open vnc proxy
qm vnc <vmid>           start (X11) vncviewer (experimental)
qm showcmd <vmid>       show command line (debug info)
qm list                 list all virtual machines

qm startall             start all virtual machines (when onboot=1)
qm stopall [timeout]    stop all virtual machines (default timeout is 3 minutes)

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s