Error when specifying image created with qemu-img create in virt-install

Asked 2 years ago, Updated 2 years ago, 136 views

Let me ask you a question.

As stated in the title, an error occurs when you specify an image created with qemu-img create in virt-install.

Specifically, after executing the following command

qemu-img create overcloud-ctrl.qcow241G

Executing the following command results in an error

/usr/bin/virt-install\
   --name overcloud-ctrl\
   --ram6144 --vcpus2\
   --os-variant centos 7.0\
   ./overcloud-ctrl.qcow2\
   --noautoconsole\
   --vnc\
   --network network:data1 --mac=52:54:00:c0:87:36\
   --network network:internals\
   --cpu SandyBridge, +vmx\
   --graphics vnc,listen=0.0.0\
   --dry-run --print-xml>overcloud-ctrl.xml

The error content is

virt-install:error:unrecognized arguments:./overcloud-ctrl.qcow2

will be

./overcloud-ctrl.qcow2 exists and can be seen in Qemu-img info.

qemu-img info overcloud-ctrl.qcow2
image —overcloud-ctrl.qcow2
file format:raw
virtual size:41G (44023414784 bytes)
disk size: 0

I was in the middle of creating a VM in KVM while reviewing the following article.
https://qiita.com/s1061123/items/c7f3e47d66e8cbea1a7c

Thank you for your cooperation.

qemu

2022-09-30 21:33

2 Answers

unrecognized arguments so the command line argument is not recognized and
This does not mean that the contents of the file are strange.

After a quick search,

./overcloud-ctrl.qcow2\

This is

--disk./overcloud-ctrl.qcow2\

Why not?

For additional questions about comments.

https://www.redhat.com/archives/virt-tools-list/2013-May/msg00093.html

↑If you look at this page, you can see

  • Why don't you remove the other options
  • In particular, why don't you remove the --noautoconsole

That's about it.

Also, I don't know anything about Virt-install.
I was able to answer the first answer within my common sense, but it is difficult for me to deal with it if it is a message exclusively for Virt-install.If this doesn't work (or if further problems are found), I think it's better to wait for someone else's answer or cut out the problematic parts and ask new questions.


2022-09-30 21:33

I am very sorry for the late reply.
Thank you.It was resolved successfully a while ago. It worked by removing the --vnc, --noautoconsole options.


2022-09-30 21:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.