Увеличение размера жесткого диска Windows для XEN

В этой заметке я расскажу как очень просто увеличить размер жесткого диска Windows, если виртуальная машина гостевая. На самом деле процесс не такой сложный, как может показаться на первый взгляд.

Для начала выключите гостевую машину с Windows. После этого сделаем копию img образа, с которым будете работать. Даже если объем диска большой – копию все равно необходимо сделать. Т.к. всегда есть риск потери данных.

После этого в конец оригинального img-образа добавим необходимый объем командой dd. В моем примере я добавляю 80 Гигабайт.

dd if=/dev/zero bs=1024 count=80000000 >> ./disk.img

Далее вам необходимо любой live ISO образ которым мы будем расширять размер раздела. Я использовал gparted.

Следующим шагом мы подключим к нашей виртуальной машине этот ISO образ и загрузимся с него. Для этого вам, возможно, придется изменить порядок загрузки в конфигурационном файле. Ниже я приведу пример своей виртуальной машины.

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'

kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 4086
shadow_memory = 8
name = "win"
vif = [ 'ip=192.168.1.100' ]
acpi = 1
apic = 1
pae = 1
disk = [ 'file:/mnt/xen/win/disk.img,hda,w','file:/mnt/bigboy2/gparted.iso,hdc:cdrom,r' ]
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
vcpus=8
boot="dc"
sdl=0
vnc=1
vncdisplay=10
vncpasswd='vncpasswd'
vnclisten='192.168.1.1'

Обратите внимание на параметры boot,vnc, vncdisplay, vncpassword и vnclisten. Они определяют порядок загрузки, возможность подключиться по VNC, дисплей VNC(это порт,в моем примере подключение по VNC будет происходить по порту 5910) пароль на VNC и IP-адрес на котором будет висеть VPN соответственно.

После успешного запуска можно подключиться по VNC по порту 5910 и увидеть работу gparted. В нем выбираем раздел, расширяем его и применяем изменения.

Далее, возвращаем конфигурационный файл XEN к первоначальному виду и запускаем нашу виртуальную машину

xm create windows.cfg

95 комментариев к “Увеличение размера жесткого диска Windows для XEN

  1. Howdy! This blog post couldn’t be written much better! Looking through this post reminds me of my previous roommate! He constantly kept preaching about this. I am going to send this post to him. Fairly certain he will have a good read. Thank you for sharing!

  2. Aw, this was a really great post. In suggestion I would love to put in composing similar to this additionally? taking some time and actual initiative to make a great post? but what can I state? I hesitate alot as well as never appear to get something done.

  3. Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!

  4. I do accept as true with all of the concepts you have introduced on your post.
    They’re very convincing and can certainly work. Nonetheless,
    the posts are too short for starters. May just you please lengthen them a little from next time?
    Thank you for the post. cheap flights 3aN8IMa

  5. Hello just wanted to give you a quick heads
    up. The text in your content seem to be running off the screen in Internet explorer.
    I’m not sure if this is a formatting issue or something to do with internet
    browser compatibility but I thought I’d post to let you know.

    The design look great though! Hope you get the problem resolved soon. Cheers

  6. There are some intriguing times in this post yet I don?t understand if I see all of them facility to heart. There is some credibility however I will certainly hold opinion until I look into it even more. Great post, many thanks and also we want much more! Contributed to FeedBurner too

  7. I’m really inspired together with your writing skills as well as with the structure to your weblog.
    Is that this a paid subject matter or did you modify it your self?
    Anyway keep up the nice quality writing, it is uncommon to look a great weblog like this one today..

  8. This is the right blog site for anyone who intends to find out about this subject. You realize so much its almost hard to suggest with you (not that I in fact would want?HaHa). You most definitely placed a brand-new spin on a subject thats been discussed for several years. Terrific stuff, just terrific!

  9. There are some fascinating moments in this article however I don?t recognize if I see every one of them center to heart. There is some validity however I will certainly hold point of view up until I check into it additionally. Great short article, thanks and also we desire much more! Contributed to FeedBurner also

  10. I’m really enjoying the design and layout of your site.
    It’s a very easy on the eyes which makes it much more
    pleasant for me to come here and visit more often. Did you hire out a developer to create your theme?
    Exceptional work!

  11. Have you ever thought about including a little bit more than just your articles? I mean, what you say is important and everything. However imagine if you added some great images or videos to give your posts more, “pop”! Your content is excellent but with pics and video clips, this blog could certainly be one of the most beneficial in its niche. Excellent blog!

  12. Hey there just wanted to give you a quick heads up. The text in your article seem to be running off the screen in Internet explorer. I’m not sure if this is a format issue or something to do with internet browser compatibility but I thought I’d post to let you know. The design look great though! Hope you get the issue resolved soon. Many thanks

  13. Howdy just wanted to give you a quick heads up. The text in your content seem to be running off the screen in Opera. I’m not sure if this is a formatting issue or something to do with browser compatibility but I thought I’d post to let you know. The style and design look great though! Hope you get the issue solved soon. Thanks

  14. I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet smart so I’m not 100 sure. Any suggestions or advice would be greatly appreciated. Appreciate it

  15. Hi there I am so glad I found your website, I really found you by error, while I was researching on Aol for something else, Anyhow I am here now and would just like to say thank you for a incredible post and a all round exciting blog (I also love the theme/design), I don’t have time to look over it all at the moment but I have book-marked it and also added your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the excellent work.

  16. Hi there! I know this is kinda off topic but I’d figured I’d ask. Would you be interested in trading links or maybe guest writing a blog article or vice-versa? My site discusses a lot of the same subjects as yours and I believe we could greatly benefit from each other. If you are interested feel free to send me an email. I look forward to hearing from you! Terrific blog by the way!

  17. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Many thanks!

  18. Hiya! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My site looks weird when viewing from my apple iphone. I’m trying to find a template or plugin that might be able to fix this problem. If you have any suggestions, please share. Appreciate it!

  19. This design is wicked! You definitely know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Great job. I really loved what you had to say, and more than that, how you presented it. Too cool!

  20. Definitely believe that which you said. Your favorite justification seemed to be on the net
    the easiest 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-effects , people could take a signal.
    Will probably be back to get more. Thanks

  21. you are in point of fact a excellent webmaster. The web site loading velocity is incredible.

    It kind of feels that you are doing any unique trick. Also, The contents are masterwork.
    you have done a fantastic process on this subject!

  22. An impressive share! I have just forwarded this onto a colleague
    who was doing a little research on this. And he actually bought me lunch
    simply because I stumbled upon it for him… lol.
    So let me reword this…. Thank YOU for the meal!!
    But yeah, thanx for spending time to discuss this issue here on your blog.

  23. Thanks for a marvelous posting! I genuinely enjoyed reading
    it, you may be a great author. I will make sure to bookmark
    your blog and may come back later in life.

    I want to encourage you to continue your great job, have a
    nice weekend!

  24. I am really loving the theme/design of your web site.
    Do you ever run into any internet browser compatibility problems?
    A small number of my blog readers have complained about my website not working
    correctly in Explorer but looks great in Firefox.
    Do you have any suggestions to help fix this issue?

  25. I am not sure where you are getting your information, but good topic.
    I needs to spend some time learning more or understanding more.

    Thanks for magnificent info I was looking for this information for
    my mission.

  26. It’s appropriate time to make some plans for the future and it’s time to be happy.
    I’ve read this post and if I could I want to suggest you
    few interesting things or suggestions. Perhaps you can write next articles referring to this article.
    I desire to read more things about it!

  27. I’m truly enjoying the design and layout of your site.
    It’s a very easy on the eyes which makes
    it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme?

    Exceptional work!

  28. May I simply just say what a comfort to discover a person that actually understands what they’re talking
    about over the internet. You certainly know how to bring a problem to light
    and make it important. More people have to read this and understand this side of the
    story. I was surprised that you’re not more popular since you
    definitely have the gift.

  29. Hi there are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do you require any html coding expertise to make your own blog?
    Any help would be really appreciated!

  30. Pretty nice post. I simply stumbled upon your blog and wished to say that I have truly enjoyed browsing your
    blog posts. After all I will be subscribing for your feed and I’m hoping you write
    once more very soon!

  31. Hmm it looks like your blog ate my first comment (it was extremely long)
    so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog writer but I’m still new to the whole
    thing. Do you have any tips and hints for newbie blog writers?
    I’d genuinely appreciate it.

  32. Hi there! I know this is kinda off topic however , I’d figured
    I’d ask. Would you be interested in trading links
    or maybe guest writing a blog post or vice-versa? My blog covers
    a lot of the same topics as yours and I believe we could greatly benefit from
    each other. If you might be interested feel free to shoot me an email.

    I look forward to hearing from you! Great blog by the way!

  33. Does your website have a contact page? I’m having trouble locating
    it but, I’d like to send you an email. I’ve got some suggestions for your blog you might be interested in hearing.
    Either way, great blog and I look forward to seeing it grow over time.

  34. I am extremely inspired together with your writing skills as smartly
    as with the structure to your blog. Is this a paid topic
    or did you modify it your self? Either way keep up the nice high quality writing, it’s rare
    to see a nice weblog like this one today..

Оставить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *