简体   繁体   English

OpenStack-基于qcow2文件的Windows映像是否已启动80%? 调整大小不起作用?

[英]Openstack - Windows images based on qcow2 file starts 80% full? Resizing is not working?

I am trying to set up a Windows 7 instance on Openstack. 我正在尝试在Openstack上设置Windows 7实例。 This instance requires at least 50 GB of free disk space to run an application. 该实例至少需要50 GB的可用磁盘空间才能运行应用程序。 When I create my windows 7 image and upload it everything works fine, except for one problem - The disk space is already 80% used when I start. 当我创建Windows 7映像并将其上传时,一切正常,除了一个问题-启动时磁盘空间已使用80%。

For example a windows 7 instance with a 100GB hard drive has only 18.3GB of free space. 例如,具有100GB硬盘驱动器的Windows 7实例仅具有18.3GB的可用空间。

What I tried: 我试过的

I have been trying to create a windows 7 image with a 100GB hard drive. 我一直试图用100GB硬盘创建Windows 7映像。 I created a QCOW2 file with a windows 7 ISO and the Virt-IO drivers ISO using the below commands: 我使用以下命令使用Windows 7 ISO和Virt-IO驱动程序ISO创建了QCOW2文件:

create the empty qcow2 file: 创建一个空的qcow2文件:

qemu-img create -f qcow2 win_64bit_SP1_100GB.qcow2 100G qemu-img创建-f qcow2 win_64bit_SP1_100GB.qcow2 100G

Combine the two ISOs: 结合两个ISO:

sudo virt-install --connect qemu:///system --name PS4Agent_win7_64bit_SP1_100GB --ram 2048 --vcpus 2 --network network=default,model=virtio --disk path=win_64bit_SP1_100GB.qcow2,format=qcow2,device=disk,bus=virtio sudo virt-install --connect qemu:/// system --name PS4Agent_win7_64bit_SP1_100GB --ram 2048 --vcpus 2 --network network = default,model = virtio --disk path = win_64bit_SP1_100GB.qcow2,format = qcow2,device =磁盘,总线=虚拟
--cdrom /home/khennessy/win7_win8_iso_creation/SW_DVD5_Win_Pro_7w_SP1_64BIT_English_-2_MLF_X17-59279.ISO --disk path=/home/khennessy/win7_win8_iso_creation/virtio-win-0.1-100.iso,device=cdrom --vnc --os-type windows --os-variant win2k8 --force --cdrom /home/khennessy/win7_win8_iso_creation/SW_DVD5_Win_Pro_7w_SP1_64BIT_English_-2_MLF_X17-59279.ISO --disk path = / home / khennessy / win7_win8_iso_creation / virtio-win-0.1-100.iso,device = cdrom --vnc --os Windows --os-variant win2k8 --force

I then uploaded these to Openstack using a 'minimum disk space' of 90GB, making the minimum flavor xl. 然后,我使用90GB的“最小磁盘空间”将这些文件上传到Openstack,从而使xl最小。 (Currently trying a lower value, the images are so large it takes a long time to test anything.) (当前尝试使用较低的值,图像太大,测试任何东西都需要很长时间。)

I then create an instance using this image and log into it using the 'console' view. 然后,我使用此图像创建一个实例,并使用“控制台”视图登录到该实例。 It all works fine but when I go into 'my computer' it tells me I have only 18GB free space? 一切正常,但是当我进入“我的电脑”时,它告诉我我只有18GB的可用空间? I have tried 'resizing' the images but it just seems to bring them into an error state? 我尝试过“调整”图像的大小,但似乎只是使它们进入错误状态?

Can anyone help me? 谁能帮我? Thanks very much. 非常感谢。

Before you upload your windows 7 image onto glance, you need to download CloudbaseInitSetup_x64.msi or CloudbaseInitSetup_x86.msi] and install it on your windows7 image first. 在将Windows 7映像上传到浏览器之前,您需要下载CloudbaseInitSetup_x64.msi或CloudbaseInitSetup_x86.msi]并首先将其安装在Windows7映像上。 Also, don't forget to add "plugins=cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin" to the configuration file of Cloudbase-init. 另外,不要忘记将“ plugins = cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin”添加到Cloudbase-init的配置文件中。
You can visit and http://cloud-ninja.org/2014/05/14/running-windows-7-guests-on-openstack-icehouse/ for more information. 您可以访问和http://cloud-ninja.org/2014/05/14/running-windows-7-guests-on-openstack-icehouse/了解更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM