CentOS 5
Sponsored Link

コンソールの切り替え
2009/04/20
[1] ゲストOSからホストOSへのコンソールの切り替えは Ctrl + ] (かっこ)キーでできます。 または、「xm console (移動したいドメインの名前)または(移動したいドメインのID)」とコマンドをうちます。
[root@www ~]#    
# ゲストOSのコンソール

[root@www ~]# [root ~]#    
# Ctrl + ] キーで切り替え

[root@ns ~]#
xm list
   
# 稼動中のドメインを表示

Name     ID     Mem(MiB)     VCPUs     State     Time(s)
Domain-0     0     512     2     r-----     35.1
www     1     512     2     -b----     24.8

[root@ns ~]#
xm console www
   
# ゲストOSのコンソールに切り替え

     
# 空行が入るのでもう1回Enter

[root@www ~]#    
# 切り替え完了

[root@www ~]#
xm console 0
   
# ホストOSのコンソールに切り替え

     
# 空行が入るのでもう1回Enter

[root@ns ~]#    
# 切り替え完了
その他の操作
[2] その他の操作です。たくさんあるのでいろいろ試してみてください。
[root@ns ~]#
xm help

Usage: xm <subcommand> [args]

Control, list, and manipulate Xen guest instances.

xm full list of subcommands:

  console
Attach to <Domain>'s console.

  create
Create a domain based on <ConfigFile>.

  destroy
Terminate a domain immediately.

  domid
Convert a domain name to domain id.

  domname
Convert a domain id to domain name.

  dump-core
Dump core for a specific domain.

  list
List information about all/some domains.

  mem-max
Set the maximum amount reservation for a domain.

  mem-set
Set the current memory usage for a domain.

  migrate
Migrate a domain to another machine.

  pause
Pause execution of a domain.

  reboot
Reboot a domain.

  rename
Rename a domain.

  restore
Restore a domain from a saved state.

  save
Save a domain state to restore later.

  shutdown
Shutdown a domain.

  sysrq
Send a sysrq to a domain.

  top
Monitor a host and the domains in real time.

  unpause
Unpause a paused domain.

  uptime
Print uptime for a domain.

  vcpu-list
List the VCPUs for a domain or all domains.

  vcpu-pin
Set which CPUs a VCPU can use.

  vcpu-set
Set the number of active VCPUs for allowed for the domain.

  dmesg
Read and/or clear Xend's message buffer.

  info
Get information about Xen host.

  log
Print Xend log

  serve
Proxy Xend XMLRPC over stdio.

  sched-credit
Get/set credit scheduler parameters.

  sched-sedf
Get/set EDF parameters.

  block-attach
Create a new virtual block device.

  block-detach
Destroy a domain's virtual block device.

  block-list
List virtual block devices for a domain.

  block-configure
Change block device configuration

  network-attach
Create a new virtual network device.

  network-detach
Destroy a domain's virtual network device.

  network-list
List virtual network interfaces for a domain.

  vtpm-list
List virtual TPM devices.

  vnet-list
List Vnets.

  vnet-create
Create a vnet from ConfigFile.

  vnet-delete
Delete a Vnet.

  labels
List <type> labels for (active) policy.

  addlabel
Add security label to domain.

  rmlabel
Remove a security label from domain.

  getlabel
Show security label for domain or resource.

  dry-run
Test if a domain can access its resources.

  resources
Show info for each labeled resource.

  makepolicy
Build policy and create .bin/.map files.

  loadpolicy
Load binary policy into hypervisor.

  cfgbootpolicy
Add policy to boot configuration.

  dumppolicy
Print hypervisor ACM state information.


<Domain> can either be the Domain Name or Id.
For more help on 'xm' see the xm(1) man page.
For more help on 'xm create' see the xmdomain.cfg(5) man page.

[root@ns ~]#
xm list

Name     ID     Mem(MiB)     VCPUs     State     Time(s)
Domain-0     0     512     2     r-----     35.1
www     1     512     2     -b----     24.8

[root@ns ~]#
xm rename 0 Host
   
# ホストOSの名前変更

[root@ns ~]#
xm list

Name     ID     Mem(MiB)     VCPUs     State     Time(s)
Host     0     512     2     r-----     35.1
www     1     512     2     -b----     24.8

[root@ns ~]#
xm vcpu-set 0 1
   
# ホストOSの仮想CPU数変更

[root@ns ~]#
xm list

Name     ID     Mem(MiB)     VCPUs     State     Time(s)
Host     0     512     1     r-----     35.1
www     1     512     2     -b----     24.8

[root@ns ~]#
xm reboot www
   
# www再起動


[root@ns ~]#
xm shutdown www
   
# wwwシャットダウン

[root@ns ~]#
xm list

Name     ID     Mem(MiB)     VCPUs     State     Time(s)
Host     0     512     1     r-----     35.1
関連コンテンツ
 
Tweet