首页 > 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. 2017年12月7日13:17 | #1

    Truly no matter if someone doesn’t know after that its up to other
    viewers that they will assist, so here it happens.

  2. 2017年12月7日13:21 | #2

    köpa apoteket, http://southernhillschristian.org/wordpress/apotek/zenegra , tabletter kostnad.

  3. 2017年12月7日13:24 | #3

    One may consider cholesterol being the primary building block for arterial plaque thus keedping cholesterol consumption under 200 milligrams or 30 % per day if thhe extremely important section of our plan. A polluted, malnourished stomach and colin iss the perfect environment for parasites and worms.
    There are othedr orms of light therapy including photochemotherapy, UVB phototherapy andd
    narrow-band UVB therapy.

  4. 2017年12月7日13:37 | #4

    like your topic

  5. 2017年12月7日13:44 | #5

    Enter the clicking-by hyperlink in the Web Handle (URL) discipline.

  6. 2017年12月7日13:50 | #6

    Undeniably imagine that that you said. Your favourite reason seemed to be on the net the simplest factor to
    be mindful of. I say to you, I definitely get annoyed
    while other folks think about worries that they plainly do not
    recognise about. You managed to hit the nail upon the top and outlined
    out the whole thing with no need side effect , folks can take a signal.

    Will likely be back to get more. Thank you

  7. 2017年12月7日13:54 | #7

    The simple daily rinse with bleach (yes, that
    inexpensivee brown bottle you pick up at the grocery or drug store) gets me on the white smile I want.

    Other than being functional,they have already been utilized
    in art and home design through various metzl sculptudes and waol
    arts for example a metal wal grille plus a wrought iron wwall plaque.
    Indeed, an antique inspired home is both remarkable and unique off these
    modern years.

  8. 2017年12月7日13:56 | #8

    Wow, incredible blog layout! How long have you
    been blogging for? you make blogging look easy.

    The overall look of your website is wonderful, let alone the content!

  9. 2017年12月7日14:03 | #9

    Unquestionably believe that which you stated. Your favorite justification appeared to be on the internet the simplest thing to be
    aware of. I say to you, I certainly get irked
    while people consider worries that they plainly don’t know about.
    You managed to hit the nail upon the top and defined out the whole thing without
    having side effect , people can take a signal. Will likely be
    back to get more. Thanks

  10. 2017年12月7日14:08 | #10

    Great post.

  11. 2017年12月7日14:14 | #11

    It is true, without proper decoration, a house’s interiors looks dull and pale. Utilizing monkeyquest add on, you can even lessen your time and energy with your quests the way it allows you to track quests which may save a great deal of your efforts likewise.Having used Windows for over 30 years, we are clearly witnessing a revolution in trading. You can save a lot of money when you know how to prevent problems. The particular timer will help you to adhere to your decisions and maintain good discipline as to how you are making use of your time. By putting on boots, you can increase your safety and also protection when you are working. You want people to be able to find and share your content without any issues, so review those settings before you go live.The city of London is a really cosmopolitan, [url=http://www.wholesale-cheapnfljerseys.us.com/]Wholesale NFL Jerseys[/url], vibrant city that provides a huge scope to homosexual individuals to fulfill up with other homosexual persons for courting and leisure, in an array of gay pleasant eating places, bars, sports clubs, night clubs,[url=http://www.wholesale-cheapnfljerseys.us.com/]Cheap Soccer Jerseys Wholesale[/url], accommodation, events and shopping that’s unparalleled. Once the customers install the app, they can stay engaged in all respects. Questioned why he offered the portray and, through implication the reprint legal rights, he insisted he experienced simply just offered the portray, not his highbrow copyright inside of the product or service.Slice the item into long slices however thick you want it.[url=http://www.wholesale-cheapnfljerseys.us.com/]Cheap Soccer Jerseys[/url]. At the end of the day, they will need to act as your defense in such issues.Visit my sitehttp://www.wholesale-cheapnfljerseys.us.com/

  12. 2017年12月7日14:16 | #12

    13 rescue video shot by WAFB-TV has millions of You –
    Tube views. It shows floodwaters swallowing Brouillette’s red convertible
    as Phung grabbed Brouillette by her arms as the car disappeared in the murky waters.

    Caleb Alexander, co-director of Johns Hopkins University’s Center for Drug Safety and
    Effectiveness.

  13. 2017年12月7日14:29 | #13

    I’m impressed, I must say. Seldom do I come across a blog
    that’s equally educative and amusing, and let me tell you, you’ve hit
    the nail on the head. The problem is something
    not enough people are speaking intelligently about. I’m very happy that I came across this during
    my search for something regarding this.

  14. 2017年12月7日14:35 | #14

    Hi this is kind of of off topic but I was wanting to know if blogs use
    WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding knowledge so I wanted
    to get advice from someone with experience. Any help
    would be greatly appreciated!

  15. 2017年12月7日14:40 | #15

    Hello there, just became aware of your blog through Google, and found that it’s really informative.
    I am gonna watch out for brussels. I’ll be grateful
    if you continue this in future. Lots of people will be benefited from your
    writing. Cheers!

  16. 2017年12月7日14:55 | #16

    Hello there, just became aware of your blog through
    Google, and found that it’s really informative.
    I’m gonna watch out for brussels. I will be grateful if you continue this in future.
    Many people will be benefited from your writing. Cheers!

  17. 2017年12月7日14:59 | #17

    Hello there! Do you use Twitter? I’d like to follow you if that would be ok.
    I’m absolutely enjoying your blog and look forward
    to new posts.

  18. 2017年12月7日15:10 | #18

    Very shortly this site will be famous among all blogging and site-building visitors, due to it’s fastidious posts

  19. 2017年12月7日15:12 | #19

    Hi there, always i used to check weblog posts here early in the daylight, since i enjoy to gain knowledge of
    more and more.

  20. 2017年12月7日15:21 | #20

    Hey there! This post couldn’t be written any better!

    Reading through this post reminds me of my good old room mate!
    He always kept talking about this. I will forward this page
    to him. Fairly certain he will have a good read. Many thanks for sharing!

  21. 2017年12月7日15:35 | #21

    Excellent weblog hеre! Also yoour web site loads up very fast!
    Ԝhat host are yoou the usage ߋf? Can I get ʏoᥙr associate link
    fߋr yоur host? I desire mʏ website loaded uup аs qսickly aѕ
    yours lol

  22. 2017年12月7日15:42 | #22

    Hola! I’ve been reading your blog for a long time now and
    finally got the bravery to go ahead and give you a shout out from
    Kingwood Texas! Just wanted to mention keep up
    the good work!

  23. 2017年12月7日15:42 | #23

    cialis discount canada
    no prescription cialis
    cheap cialis prices uk

  24. 2017年12月7日16:17 | #24

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

  25. 2017年12月7日16:20 | #25

    There is a very important update you can find
    in this game, different from our other Match 3 games.Large candy games for children and adults.
    It will provide you a very funny and challenging time.Also you can share your score with your friends.

    It will be a sweet game!

    Features,
    **All levels are Free,
    **Yummy Candies,
    **When you stuck, props can help you,
    **Easy but funny to play, a challenge to those who can open much more levels,
    **Suitable for all ages,
    **Cool particle,
    **Sound,
    **Special efficiency,
    **Share it with others.

  26. 2017年12月7日16:20 | #26

    I’m now not positive where you’re getting your info, however good topic.
    I needs to spend a while finding out much more or
    understanding more. Thanks for wonderful information I used to be looking for this
    information for my mission.

  27. 2017年12月7日16:43 | #27

    The visible content in the page is prioritized on the browser and the network.

  28. 2017年12月7日17:01 | #28

    Hi there, this weekend is good in support of me, since this occasion i am reading this great educational piece of writing here at my home.

  29. 2017年12月7日17:03 | #29

    Hey would you mind letting me know which hosting company you’re
    using? I’ve loaded your blog in 3 completely different internet browsers and
    I must say this blog loads a lot faster then most.
    Can you recommend a good internet hosting provider at a reasonable price?
    Thank you, I appreciate it!

  30. 2017年12月7日17:07 | #30

    Hey there! I’ve been following your site for some time now
    and finally got the courage to go ahead and give you a shout out from
    Humble Texas! Just wanted to tell you keep up the good work!

  31. 2017年12月7日17:11 | #31

    casino slots
    slot casino
    free online casino games
    best online casinos

  32. 2017年12月7日17:32 | #32

    I think that what you published was actually very
    logical. But, think on this, suppose you added a little information? I ain’t saying your
    information is not good., however what if you added a post title to maybe
    get people’s attention? I mean Eric's linux and nginx!
    » 使用xen-shell来管理xen vps is a little vanilla.
    You might peek at Yahoo’s front page and see how they create post titles to grab people to open the links.
    You might add a related video or a picture or two to
    grab readers interested about everything’ve got to say.

    In my opinion, it might bring your blog a little bit more interesting.

  33. 2017年12月7日17:34 | #33

    You really make it seem so easy with your presentation but
    I find this topic to be actually something which I think I would never understand.
    It seems too complex and very broad for me. I’m looking forward for your next post, I’ll try to get the hang of it!

  34. 2017年12月7日17:41 | #34

    Great delivery. Sound arguments. Keep up the good work.

  35. 2017年12月7日17:43 | #35

    双翼邮件群发无限制可听说?鼎鼎大名的。名气不是白得来的。你懂得,达到目的,是投资的回报。

    删除负面新闻

  36. 2017年12月7日17:46 | #36

    apoteket online, http://drewpallet.com/apotek/alaxa , generisk billigt köpa.

  37. 2017年12月7日18:15 | #37

    online casino real money
    free casino slot games no download no registration
    free casino games no download
    online casino

  38. 2017年12月7日18:21 | #38

    Remarkable things here. I’m very happy to peer your article.

    Thank you a lot and I am taking a look ahead to touch you.

    Will you kindly drop me a e-mail?

  39. 2017年12月7日18:49 | #39

    Hey there, You’ve done an incredible job. I will definitely digg it and
    personally recommend to my friends. I’m sure they’ll be benefited from this web site.

  40. 2017年12月7日18:54 | #40

    casino games for free
    free online casino games
    free casino games no download
    casino slot games

  41. 2017年12月7日18:55 | #41

    Thanks for ones marvelous posting! I definitely enjoyed reading
    it, you are a great author.I will be sure to bookmark your blog and definitely will come back from now on. I want to encourage you to definitely continue your great writing, have a nice evening!

  42. 2017年12月7日18:58 | #42

    Definitely consider that which you said. Your favorite justification appeared to be at the internet the
    simplest thing to understand of. I say to you, I certainly get
    annoyed at the same time as folks think about worries that they plainly
    do not know about. You controlled to hit the nail upon the highest as well as defined out the entire thing without having
    side-effects , folks could take a signal. Will likely be again to
    get more. Thanks

  43. 2017年12月7日19:10 | #43

    Hey very cool web site!! Man .. Beautiful .. Superb ..
    I’ll bookmark your blog and take the feeds additionally?
    I’m glad to search out so many useful information here in the publish, we need develop more strategies in this regard, thank you for sharing.
    . . . . .

  44. 2017年12月7日19:20 | #44

    We are a group of volunteers and starting a new scheme in our community.
    Your web site offered us with valuable information to work on. You’ve done a
    formidable job and our whole community will be thankful
    to you.

  45. 2017年12月7日19:21 | #45

    Magnificent goods from you, man. I’ve understand your stuff previous to and you’re just extremely
    wonderful. I actually like what you have acquired here, certainly like what you’re saying and the way
    in which you say it. You make it entertaining and you still care for to keep it
    wise. I can’t wait to read much more from you.

    This is really a wonderful site.

  46. 2017年12月7日19:25 | #46

    piller pris, http://www.hollyhockclothing.com/apotek/kloramfenikol , kjøpe i Norge Oslo.

  47. 2017年12月7日19:34 | #47

    If some one needs to be updated with latest technologies after that he must be go to see this
    site and be up to date daily.

  48. 2017年12月7日19:56 | #48

    My brother suggested I might like this web site. He was totally right.

    This post truly made my day. You can not imagine
    just how much time I had spent for this info!

    Thanks!

  49. 2017年12月7日20:06 | #49

    I couldn’t resist commenting. Well written!

  50. 2017年12月7日20:18 | #50

    I think the admin of this website is actually working hard in support of his site, because here every stuff is quality based stuff.

评论分页
订阅评论
3+9= (必填)