Увеличение размера жесткого диска 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
Рекомендуем почитать
Server 2008 R2 xenpci.sys BSOD

Based on customer feedback, we have come across an error that can occur when restoring your VM onto the new Читать дальше...

Конвертируем XEN IMG в формат VirtualBOX VDI

vboxmanage convertfromraw --format VDI elastix.img elastix.vdi

Перенос образа из VirtualBox в XEN

Для того, чтобы перенести ваш образ, созданный в VirtualBox в XEN необходимо сконвертировать VDI-диск в IMG формат. Для этого воспользуемся Читать дальше...

Паравиртуализация XEN или решаем проблемы с производительностью

Паравиртуальные драйверы Xen — специальный вид драйверов устройств, которые используются в гостевой системе в домене Xen (в общем случае паравиртуальным Читать дальше...

Быстрое создание жесткого диска в XEN

Практически моментально можно создать виртуальный жесткий диск для XEN выполнив команду: dd if=/dev/zero of=/home/xen/virt1/disk1.img bs=1024 seek=100000000 count=0 Данный пример создаст Читать дальше...

Поделиться

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

  1. I simply want to say I am new to blogs and honestly liked you’re blog. Almost certainly I’m likely to bookmark your blog . You certainly come with good article content. Many thanks for sharing your web-site.

  2. Wonderful message. I discover something extra tough on various blog sites daily. It will certainly always be promoting to read content from various other authors and exercise a something from their shop. I?d favor to make use of some with the web content on my blog site whether you don?t mind. Natually I?ll offer you a link on your web blog. Thanks for sharing.

  3. I know this if off topic but I’m looking into starting my own weblog and was wondering what all is needed to get setup? 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 recommendations or advice would be greatly appreciated. Kudos

  4. Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and visual appeal. I must say you’ve done a great job with this. Additionally, the blog loads extremely quick for me on Firefox. Outstanding Blog!

  5. Good post. I find out something a lot more tough on various blog sites day-to-day. It will certainly constantly be promoting to read web content from other writers and also practice a something from their shop. I?d choose to make use of some with the material on my blog site whether you don?t mind. Natually I?ll offer you a link on your internet blog site. Thanks for sharing.

  6. There are certainly a lot of details like that to take into account. That is a terrific point to raise. I offer the thoughts above as general inspiration however plainly there are concerns like the one you raise where one of the most crucial thing will certainly be operating in honest good faith. I don?t know if finest practices have emerged around things like that, but I make certain that your work is plainly identified as a level playing field. Both young boys and girls feel the influence of just a moment?s pleasure, for the rest of their lives.

  7. Can I simply state what an alleviation to discover somebody who in fact recognizes what theyre speaking about on the web. You most definitely know how to bring a problem to light and also make it vital. More individuals need to read this as well as recognize this side of the story. I cant think youre not extra preferred due to the fact that you most definitely have the present.

  8. An outstanding share, I simply given this onto a coworker that was doing a little analysis on this. As well as he as a matter of fact acquired me morning meal because I found it for him. smile. So let me rephrase that: Thnx for the reward! Yet yeah Thnkx for investing the time to review this, I really feel highly about it and love reading more on this topic. When possible, as you come to be experience, would you mind updating your blog with even more details? It is very useful for me. Big thumb up for this blog post!

  9. After study a few of the post on your site currently, as well as I really like your method of blog writing. I bookmarked it to my bookmark website checklist as well as will be inspecting back soon. Pls check out my internet site as well and also let me know what you think.

  10. After study a few of the article on your internet site currently, and I genuinely like your way of blogging. I bookmarked it to my book mark website list and will certainly be examining back soon. Pls look into my website as well and also let me recognize what you think.

  11. I uncovered your blog website on google and also check a few of your very early articles. Continue to maintain the very good run. I just additional up your RSS feed to my MSN News Reader. Looking for onward to reading more from you later on!?

  12. Nice article. I find out something extra challenging on various blog sites day-to-day. It will certainly constantly be promoting to read material from various other authors and exercise a something from their store. I?d prefer to utilize some with the material on my blog whether you don?t mind. Natually I?ll give you a link on your web blog site. Many thanks for sharing.

  13. I?m impressed, I must say. Really rarely do I encounter a blog site that?s both educative as well as amusing, and let me inform you, you have struck the nail on the head. Your suggestion is superior; the issue is something that inadequate people are speaking wisely about. I am extremely delighted that I stumbled across this in my look for something relating to this.

  14. After research a few of the article on your internet site now, and I really like your means of blogging. I bookmarked it to my book mark internet site listing and also will be checking back quickly. Pls take a look at my website as well and also let me recognize what you assume.

  15. Good blog post. I learn something extra challenging on various blog sites day-to-day. It will always be boosting to read content from various other authors and also exercise a something from their shop. I?d like to use some with the web content on my blog whether you don?t mind. Natually I?ll offer you a link on your internet blog site. Many thanks for sharing.

  16. I am commonly to blog writing as well as i truly appreciate your material. The write-up has really peaks my passion. I am going to bookmark your website and keep checking for new information.

  17. There are some interesting moments in this post yet I don?t recognize if I see every one of them center to heart. There is some validity yet I will take hold opinion till I check into it better. Great short article, many thanks as well as we want a lot more! Included in FeedBurner as well

  18. Hi, Neat post. There’s an issue together with your website in web explorer, would check this? IE nonetheless is the marketplace chief and a good part of people will omit your excellent writing due to this problem.

  19. There are definitely a lot of information like that to take into consideration. That is a terrific point to raise. I supply the thoughts above as general inspiration however plainly there are concerns like the one you bring up where one of the most vital point will certainly be working in sincere good faith. I don?t know if finest techniques have actually arised around points like that, yet I make certain that your task is plainly determined as a fair game. Both children and women really feel the impact of simply a moment?s enjoyment, for the remainder of their lives.

  20. Oh my goodness! an incredible short article guy. Thanks Nonetheless I am experiencing problem with ur rss. Don?t recognize why Unable to register for it. Exists any person obtaining identical rss problem? Anybody who knows kindly respond. Thnkx

  21. Hello, I think your blog might be having browser compatibility issues. When I look at your website in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, awesome blog!

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

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