首页 > xen > 使用xen-shell来管理xen vps

使用xen-shell来管理xen vps

2010年6月9日 eric 发表评论 阅读评论

XEN 的强大管理工具 XEN-SHELL,用他来管理XEN的虚拟机,简直是太方便了。太强大了,支持系统重装,VPS 启动、重启、关机、暂停,连接控制台。

 wget http://xen-tools.org/software/xen-shell/xen-shell-1.9.tar.gz
tar zxvf xen-shell-1.9.tar.gz

cd xen-shell

make

make install

1.建立连接VPS的用户与密码

useradd eric

passwd eric

useradd yangzi

passwd yangzi

2.给用户 sudo 的命令权限,和登录shell

vim /etc/sudoers

#加入以下

User_Alias   XENUSERS = eric,yangzi

Cmnd_Alias   XEN      = /usr/sbin/xm

Cmnd_Alias   XENIMG  = /usr/bin/xen-create-image

XENUSERS     ALL    = NOPASSWD: XEN,XENIMG

# 执行下列命令,让用户登录到 xen-shell

chsh -s /usr/local/bin/xen-login-shell eric

chsh -s /usr/local/bin/xen-login-shell yangzi

3.修改xen 虚拟机的配置文件,加入

xen_shell = "eric"

例如:

kernel = "/boot/vmlinuz-2.6.24-28-xen"

ramdisk = "/boot/initrd.img-2.6.24-28-xen"

memory = "64"

name = "xenyang"

xen_shell = "eric"

disk = ['phy:/dev/md0,sda1,w']

root = "/dev/sda1 ro"

on_poweroff = 'destroy'

on_reboot = 'restart'

on_crash = 'restart'

vcpus   = '2'

extra = 'xencons=tty1'

vif = [ '' ]

4.(可选)如果你需要用xen-shell 来重装系统的话,就做这步

在eric 的home 目录下新建image.sh

cd /home/eric

vim image.sh

#!/bin/sh

/usr/bin/sudo /usr/bin/xen-create-image --hostname=yang \

 --size=1.5Gb \

 --ide \

 --ip=192.168.6.36 \

 --netmask=255.255.255.0 \

 --gateway=192.168.6.1 \

 --force  \

 --kernel=/boot/vmlinuz-2.6.24-28-xen \

 --dist=hardy \

 --mirror=http://mirrors.163.com/ubuntu/ \

 --arch=i386 \

 --passwd \

 --dir=/home/eric

5.使用xen-shell 来控制 vps

打开putty 填入 xen 服务器IP地址 输入新建的用户名 eric

xen-shell v1.9

The following commands are available within this shell:

Use of uninitialized value in sprintf at /usr/bin/xen-shell line 1603.

    author -

      boot - Boot the Xen guest.

   console - Gain access to a Xen guest via the serial console.

      exit - Exit the shell.

      help - Show general, or command-specific, help information.

    passwd - Change the password used to access this host.

     pause - This will pause the Xen guest.

      quit - Exit this shell.

    reboot - Reboot the Xen guest.

   reimage - Reset your system to a pristine installation.

    serial - Gain access to the Xen guest via the serial console.

  shutdown - Shutdown the Xen guest.

    status - Show the status of the Xen guest.

    sysreq - Send a 'sysreq' keystroke to the guest.

       top - Show system resource usage.

   unpause - This will unpause the Xen guest.

    uptime - Show the uptime information of your guest system and this host.

   version - Show the version of this shell, and of Xen.

    whoami - Show the user you're connected to the host system as.

For command-specific help run "help command".

xen-shell> 

###下面是 命令介绍 ####

xen-shell> boot 

# 启动vps 

xen-shell> console

# 登录VPS,如果用SSH连不上 VPS,你这样可以登录VPS修改IP地址等。

xen-shell> exit

#  退出 xen-shell

xen-shell> help

# 查看帮助信息,显示命令

xen-shell> passwd 

# 修改用户登录密码

xen-shell>pause

# 将暂停VPS

xen-shell>quit

# 退出 xen-shell

xen-shell>reboot

# 重启 VPS 

xen-shell>reimage

# 重新安装系统

xen-shell>serial

# 也是登录VPS控制台

xen-shell> shutdown

# 关闭 vps 虚拟机

xen-shell> status

# VPS 运行的状态

xen-shell>sysreq

# 发送‘sysreq’按键 到VPS

xen-shell>top

# 显示系统资源使用率

xen-shell>unpause

# 取消暂停

xen-shell>uptime

# 显示您的客户系统和该主机的正常运行时间信息

xen-shell>version

# 显示 xen-shell 和 XEN 的版本信息

xen-shell>whoami

# 显示您已经连接到主机系统的用户。

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/185.html

分类: xen 标签: , ,
  1. 2018年4月16日20:45 | #1

    It’s going to be end of mine day, except before end
    I am reading this enormous post to increase my knowledge.

  2. 2018年4月16日21:01 | #2

    I was excited to uncover this great site. I need to
    to thank you for your time for this particularly wonderful read!!
    I definitely enjoyed every part of it and i also have you saved as a favorite to see new
    things on your blog.

  3. 2018年4月16日21:05 | #3

    Stunning quest there. What happened after? Take care!

  4. 2018年4月16日21:07 | #4

    each time i used to read smaller content
    which also clear their motive, and that is also happening
    with this piece of writing which I am reading here.

  5. 2018年4月16日21:23 | #5

    Whenever we speak about building user experience for ‘no shape’ barrières, UX designers will play an essential role.
    They need to incorporate their understanding of natural human capacities such as communication, engine, cognitive,
    and perceptual skills with machine learning to make interfaces that
    connect with an individual.

    In the recent times, interacting with machines
    has become instinctive. Moreover, the recent innovations in NUIs are making sure that machines can comprehend human gestures, touch, tone
    of voice, and thoughts in a much better way. Nevertheless,
    designing for Natural Consumer Interfaces is quite challenging as designers have to keep
    below parameters in mind.

    SOUNDS SCI-FI NEVERTHELESS TIRING
    Minority Report like office sounds really cool, but working with hands upward for a much longer period tire people.

    URINARY INCONTINENCE should naturally and perfectly interact with the users
    without tiring them.

    natural user cadre

    Image Credit rating

    CAN’T AFFORD TO DISREGARD THE ACCESSIBILITY
    Some actions might not be possible for users with
    ailments. Therefore you can’t do away with the support for assistive technology like Joysticks or electronic
    directed devices.

    MY FAT HANDS
    Fingers and thumbs are your direct link to touchscreen devices.
    Therefore, extrémité should be designed keeping the size of touch targets large
    enough to respond to fat fingertips with adequate room given to not accidently engage the near by links.

  6. 2018年4月16日21:34 | #6

    Hello, I enjoy reading through your post. I like to write a little comment to support you.

  7. 2018年4月16日21:37 | #7

    I want to to thank you for this great read!!
    I absolutely enjoyed every little bit of it.
    I have got you book marked to look at new stuff you post…

  8. 2018年4月16日21:46 | #8

    I pay a quick visit each day some blogs and websites to
    read articles, except this blog offers feature based content.

  9. 2018年4月16日21:51 | #9

    GPS automobile tracking techniques are installed in virtually
    each vehicle in a fleet today.

  10. 2018年4月16日21:52 | #10

    Fabulous, what a web site іt is! Thiѕ website proνides uѕeful factѕ tоo us,
    keep itt up.

  11. 2018年4月16日21:54 | #11

    I don’t even know how I ended up here, but I thought this post was good.
    I do not know who you are but definitely you are going to a famous blogger if you are not already ;) Cheers!

  12. 2018年4月16日22:16 | #12

    Excellent post. Keep writing such kind of info on your site.
    Im really impressed by your site.
    Hi there, You have done a great job. I’ll definitely digg it and for my part recommend to my friends.
    I am confident they will be benefited from this site.

  13. 2018年4月16日22:21 | #13

    Great web site you have got here.. It’s difficult to find high quality writing like yours nowadays.
    I seriously appreciate individuals like you! Take care!!

  14. 2018年4月16日22:44 | #14

    Thanks for sharing your thoughts about ΣΑΚΙΔΙΑ ΠΛΑΤΗΣ.
    Regards

  15. 2018年4月16日23:43 | #15

    A lot of thanks for your own labor on this web site. Kim take
    interest in doing investigation and it’s really obvious
    why. My spouse and i notice all relating to the powerful
    tactic you create very useful tricks by means of your blog and therefore welcome participation from other individuals about this
    concept and our own princess is truly discovering a lot.
    Take advantage of the remaining portion of the new year.
    You are always conducting a powerful job.[X-N-E-W-L-I-N-S-P-I-N-X]I’m really inspired along with your writing talents and also
    with the layout in your blog. Is this a paid subject matter or did you modify it your self?
    Anyway keep up the excellent high quality writing, it is uncommon to peer a nice
    blog like this one these days.

  16. 2018年4月16日23:53 | #16

    It’s appropriate time to make a few plans for the long ruun and it is timke to be happy.

    I’ve learn this post and if I may just I desire to
    counsel yyou few fascinating things or advice. Maybe you could write subsequent articles relating to this article.
    I wish to read more issues approximately it!

  17. 2018年4月16日23:54 | #17

    Nice post. I used tto be cchecking constantly this blog and I am impressed!
    Extremely helpful info particularly the final part :) I deeal with such information much.
    I waas looking for this certain info for a very lengthy time.
    Thanks and best of luck.

  18. 2018年4月16日23:57 | #18

    看護のお仕事はこちら

  19. 2018年4月17日00:24 | #19

    constantly i used to read smaller posts which also clear
    their motive, and that is also happening with this paragraph which I am reading at this place.

  20. 2018年4月17日01:29 | #20

    Good information. Lucky me I discovered your website by chance (stumbleupon).
    I have book-marked it for later!

  21. 2018年4月17日01:31 | #21

    Fryzjer gdańsk Zapraszamy na profesjonalne usługi fryzjerskie.

  22. 2018年4月17日01:32 | #22

    I’m really loving the theme/design of your web site. Do you ever run into any internet browser compatibility problems?

    A number of my blog audience have complained
    about my blog not working correctly in Explorer but looks great in Chrome.
    Do you have any tips to help fix this issue?

  23. 2018年4月17日02:31 | #23

    Peculiar article, exactly what I was looking for.

  24. 2018年4月17日02:36 | #24

    Yes, even after all of that listing down, you still have to sit and compose
    the full response, exactly the same way you’d probably write any essay.
    It is common for teachers to lament that students are not able to write despite having done quite well inside the PMR English exam for 15-year-olds.
    If you say because continuously, the one thing the various readers will likely be mindful of is simply because – it will
    stifle your argument which is towards the top of their list of stuff
    you should avoid in your academic work.

  25. 2018年4月17日02:59 | #25

    If some one wishes expert view concerning running a blog
    then i recommend him/her to go to see this website,
    Keep up the pleasant job.

  26. 2018年4月17日03:36 | #26

    http://ogrodowepokrowce.pl In addition to its own site, Snapfish
    powers both Walgreens Photo and also Walmart Picture (which offer
    solutions that make image books).

  27. 2018年4月17日04:16 | #27

    Hello There. I found your weblog using msn. This is a really smartly written article.
    I will make sure to bookmark it and come back
    to read extra of your helpful info. Thank you for the post.
    I’ll certainly comeback.

  28. 2018年4月17日04:35 | #28

    Em muitos casos, você pode melhorar seus sintomas. https://club2cvprovence.fr/?attachment_id=391

  29. 2018年4月17日04:49 | #29

    I am not sure where you’re getting your info, however good topic.

    I needs to spend some time learning more or figuring out more.
    Thanks for great information I used to be on the lookout for this information for my mission.

  30. 2018年4月17日05:19 | #30

    magnificent points altogether, you simply won a nnew reader.
    What would youu suggest abgout your submit tht youu made some days ago?
    Any positive?

  31. 2018年4月17日05:25 | #31

    大家觉得网站要长期发展.
    非常美丽。
    读书人的人生一目了然,前途却是渺茫的。孰能一般是先苦后甜。从未轻松的获得。不过人必然走相反道路。表明了一种迹象:人是斗争的动物

    每个细节,满足客户,我们就这原则。

    港券宝免息融资融券T+0双向交易

  32. 2018年4月17日05:33 | #32

    Hello to every body, it’s my first pay a quick visit of this blog; this weblog
    consists of remarkable and in fact excellent data designed for visitors.

  33. 2018年4月17日05:39 | #33

    So should you be expecting a lot of help, be aware that it isn’t really forthcoming.
    The goal is to find a strategy to supply a complete response, all
    while focusing on as small a region of investigation as
    possible. Reading and writing whenever you can is the best way
    to develop a writing style.

  34. 2018年4月17日06:00 | #34

    buy viagra where
    cheapest viagra
    buy viagra in new zealand

  35. 2018年4月17日06:09 | #35

    Thanks for some other informative blog.
    Where else could I get that kind of info written in such
    an ideal means? I’ve a mission that I am just now operating on, and I have been at the
    look out for such info.

  36. 2018年4月17日06:28 | #36

    http://Parasoldoogrodu.pl/ Thanks to our high definition 7-ink printing innovation, the photos are wonderfully
    specificed, with all-natural skin tones as well as true-to-life colour recreation.

  37. 2018年4月17日06:31 | #37

    This is my first time pay a visit at here and i am actually
    happy to read everthing at alone place.

  38. 2018年4月17日07:16 | #38

    After exploring a few of the blog articles on your
    site, I seriously appreciate your technique of writing a
    blog. I bookmarked it to my bookmark website list and will be checking back soon.
    Take a look at my web site as well and tell me what you think.

  39. 2018年4月17日07:28 | #39

    Excellent post. I was checking continuously
    this blog and I am impressed! Extremely helpful information particularly the last part :
    ) I care for such information much. I was seeking this particular info for a very long time.
    Thank you and best of luck.

  40. 2018年4月17日08:27 | #40

    (iii) You provide on your work, so maintain a professional attitude while confronting your customers.
    Each format pressupposes a particular formation plus design for citing rephrased
    and echoed resources for all various printed, internet, along with other types of resources.
    However, you may also be wondering and you’ll discover good
    essay writing examples.

  41. 2018年4月17日08:46 | #41

    It’s a shame you don’t have a donate button! I’d definitely donate to this superb blog!
    I suppose for now i’ll settle for book-marking and adding your RSS feed to my
    Google account. I look forward to brand new updates and
    will share this blog with my Facebook group.
    Talk soon!

  42. 2018年4月17日09:30 | #42

    Pretty! This has been an incredibly wonderful post.

    Many thanks for supplying this info.

  43. 2018年4月17日09:34 | #43

    Hi mates, how is all, and what you would like to say concerning this post, in my view its in fact remarkable in support
    of me.

  44. 2018年4月17日09:45 | #44

    I believe this is among the so much important information for
    me. And i am satisfied studying your article.
    But should observation on some general issues, The web site taste
    is wonderful, the articles is in point of fact excellent : D.
    Good job, cheers

  45. 2018年4月17日09:46 | #45

    鼓舞人心
    我喜欢。
    其实的目的无法表达的,而生活却是斜溢的。那些多数情况是走出迷雾。怎么可能轻松的所得。可是人一定想轻易而举。道路:人是斗争的动物

    “要以两倍于自己说话的时间倾听对方的话。”这是因为,人只有一张嘴,却有两个耳朵。

    一款玩竞赛得奖励的APP

  46. 2018年4月17日09:49 | #46

    Clicking it will open the YouTube Films channel.

  47. 2018年4月17日10:51 | #47

    Excellent article. I definitely appreciate this website.
    Keep writing!

  48. 2018年4月17日11:32 | #48

    Highly descriptive blog, I loved that a l᧐t. Will there bе a part 2?

    find this : Top 10 Lessons About Encryption Software To Learn Before Yоu
    Hit 30 & Ten Reasons You Will Never Be Able To How To Encrypt A Password For Free Like Google

  49. 2018年4月17日11:42 | #49

    I simply couldn’t depart your web site prior to suggesting that
    I actually enjoyed the standard information a person provide on your visitors?

    Is going to be again often in order to inspect new posts

  50. 2018年4月17日12:02 | #50

    Hi there, I do think your blog may be having internet browser compatibility problems.
    When I take a look at your site in Safari, it looks fine however, if opening in IE, it has some overlapping issues.
    I just wanted to provide you with a quick heads up! Besides that,
    wonderful blog!

评论分页
1 ... 23 24 25 26 27 ... 37 185
订阅评论
3+6= (必填)