windows icon indicating copy to clipboard operation
windows copied to clipboard

You can use the qcow2 format for the disk image file?

Open ggdd2008 opened this issue 1 year ago • 21 comments

hi kroese: You can use the qcow2 format for the disk image file. If it is possible, how can the parameters be adjusted?

ggdd2008 avatar Feb 23 '24 06:02 ggdd2008

You can do it like this:

environment:
  DISK_FMT: "qcow2"

kroese avatar Feb 23 '24 11:02 kroese

hi,kroese What environment variables do I need to set in order to run a Windows qcow2 disk image file that I have already created? Please provide a detailed example.

ggdd2008 avatar Feb 26 '24 02:02 ggdd2008

See this question https://github.com/dockur/windows/issues/185 about the same.

kroese avatar Feb 26 '24 03:02 kroese

image image The progress bar keeps loading. After waiting for a long time, a blue screen appears. I don’t know how to solve it.

ggdd2008 avatar Feb 27 '24 03:02 ggdd2008

Do you also have this problem when using the automatic installation? Because now you set MANUAL=Y and Im not sure why.

kroese avatar Feb 28 '24 04:02 kroese

image After setting MANUAL to N, my computer won't proceed past "setup is starting," leaving me unsure of how to resolve the issue.

ggdd2008 avatar Feb 28 '24 07:02 ggdd2008

I have no idea to be honest.. It shows this DRIVER PNP WATCHDOG error on the blue screen, but when Googling for that error it can be caused by lots of different things it seems.

  • Do you only have this with Win10 or also when you select Win11 or Win7 for example?
  • Do you also have this when you dont use the qcow2 format?
  • Do you also when you set HV: "N" environment variable in the compose file?

kroese avatar Feb 28 '24 08:02 kroese

Regardless of whether I use the qcow2 format or not, I encounter the same installation problem with Windows 7, Windows 10, and Windows 2008.

ggdd2008 avatar Feb 28 '24 09:02 ggdd2008

Once I eliminated the qcow2 disk format and set the environment variable KVM to N, the installation succeeded. But upon accessing the system, I encountered some information—can this be altered to reflect the host machine's details? image

ggdd2008 avatar Feb 29 '24 09:02 ggdd2008

@ggdd2008 If you use KVM it will reflect the host machines CPU there. Without KVM like you did now, the machine runs at maybe 10 percent of the normal speed, so it will not be usable for any real purpose. At least we know now that the problem has something to do with KVM on CentOS, but we still dont have the solution.

kroese avatar Feb 29 '24 11:02 kroese

image Is it possible to customize or alter the yellow highlighted section in the image to match the host machine's CPU information?

ggdd2008 avatar Feb 29 '24 15:02 ggdd2008

Only if you enable KVM..

kroese avatar Feb 29 '24 15:02 kroese

thanks

ggdd2008 avatar Feb 29 '24 15:02 ggdd2008

I really think that if you upgrade to a newer kernel or newer CentOS the problem with KVM may disappear. So I dont know if thats an option for you?

kroese avatar Feb 29 '24 15:02 kroese

I'm considering testing with Ubuntu 22.04; which operating system do you typically use for your tests?

ggdd2008 avatar Feb 29 '24 15:02 ggdd2008

I use Ubuntu for it, but it should also work on other distros as long as its not CentOS.

kroese avatar Feb 29 '24 15:02 kroese

I'll run some additional tests here and will provide you with feedback once I have the outcomes.

ggdd2008 avatar Feb 29 '24 16:02 ggdd2008

hi kroese : I've encountered a new issue where I replaced the data.qcow2 file with my own qcow2 file and renamed it to data.qcow2. However, the system within my qcow2 file does not have the virtio drivers installed (neither for the hard disk nor the network card). This led to a system crash with a blue screen when I tried to start it using the docker-compose file. Could you tell me how to alter the disk and network card drivers in the qemu command to use the compatible ide and e1000 drivers instead? I would appreciate any solution you might suggest, thank you.

ggdd2008 avatar Mar 04 '24 06:03 ggdd2008

Its possible to add extra arguments for IDE and E1000 hardware, but that will not override the existing disk/network so it will still bluescreen because the SCSI devices will stay present also.

It will be a lot easier to just install the VirtIO drivers while its running with the previous environment (the one with which you created the qcow2 file), and then move the qcow2 to this container after it has the drivers included already. Ofcourse this requires you are still able to boot the qcow2 on the old machine (I do not know how you acquired this file).

The other option is to just generate a clean Win2008 install using the automatic install option. And then just copy your files/programs to this new installation instead of using your existing image.

If you really cannot do one of these 2 options, you can also fork this project (and the qemu-docker project) and modify the disk.sh and network.sh code to use the IDE/E1000 devices if you have some programming skills.

kroese avatar Mar 04 '24 10:03 kroese

My current qcow2 file contains programs that have been running for many years (and are no longer maintained) along with a large amount of data. I'm hesitant to install virtio drivers for fear of encountering issues. Now, my only option is to modify the disk.sh and network.sh scripts within the qemu-docker project, but I still encounter a blue screen after making modifications. I think the problem still lies in how I modified the disk.sh script.Here is the content of the modified scripts. [root@localhost ~]# vim /root/qemu-docker-master/src/network.sh image Could you advise which function's content within the disk.sh] script needs to be modified? I would appreciate your guidance, thank you.

ggdd2008 avatar Mar 04 '24 10:03 ggdd2008

Looks like you did it correctly. Are you sure the container you build is using the modified files and not just pulling the stock container?

In any case, if you are worried of getting issues by installing the VirtIO drivers why not just make a backup of the qcow2 file before installing the drivers? Then you can never loose anything if it produces a problem.

kroese avatar Mar 04 '24 10:03 kroese