Virt install error unrecognized arguments

Been trying to create my first VM with KVM but getting a cryptic error from virt-install. It's saying I have a 'unrecognized arguments' but does not say which argument: $ sudo virt-install >...

Been trying to create my first VM with KVM but getting a cryptic error from virt-install. It’s saying I have a ‘unrecognized arguments’ but does not say which argument:

$ sudo virt-install 
>             --name centos7_vm1 
>             --memory 1024 
>             --disk /data/kvm_images/centos7-vm1.qcow2,device=disk 
>             --disk /data/kvm_images/centos7-vm1.iso,device=cdrom 
>             --os-type linux 
>             --os-variant centos7.0 
>             --virt-type kvm 
>             --graphics none 
>             --network default 
>             --import
usage: virt-install --name NAME --memory MB STORAGE INSTALL [options]
virt-install: error: unrecognized arguments:                                                                                                                        
$

Looking at docs and general googling cant work out what is wrong. Ime running CentOS 7, virt-install 1.5.0.

$ ls -l /data/kvm_images
total 70584
-rw------- 1 qemu qemu 26847870976 May 11 00:06 centos7-docker.qcow2
-rw-r--r-- 1 root root      374784 May 11 14:35 centos7-vm1.iso
-rw-r--r-- 1 root root    68026368 May 11 14:02 centos7-vm1.qcow2
-rw-r--r-- 1 root root         104 May 11 14:33 centos7-vm1.setup.yaml
$

Here are what I did to get this far

The first thing I did was download the image

$ wget wget https://cloud.centos.org/centos/7/images/CentOS-7-ppc64le-GenericCloud-2003.qcow2

Then checked it seemed OK

$ qemu-img info CentOS-7-ppc64le-GenericCloud-2003.qcow2

image: CentOS-7-ppc64le-GenericCloud-2003.qcow2c
file format: qcow2
virtual size: 8.0G (8589934592 bytes)
disk size: 395M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false

Then I resized it to twenty-five GB

$ qemu-img resize CentOS-7-ppc64le-GenericCloud-2003.qcow2 25G

And used qemu-img convert

$ sudo qemu-img convert -f qcow2 -O qcow2 CentOS-7-ppc64le-GenericCloud-2003.qcow2 /data/kvm_images/centos7-vm1.qcow2

I then created a file centos7-vm1.setup.yaml

#cloud-config
password: xxxxxxxxxx
chpasswd: { expire: False }
ssh_pwauth: True
hostname: centos7-vm1

and run

$ sudo cloud-localds centos7-vm1.iso centos7-vm1.setup.yaml

Been trying to create my first VM with KVM but getting a cryptic error from virt-install. It’s saying I have a ‘unrecognized arguments’ but does not say which argument:

$ sudo virt-install 
>             --name centos7_vm1 
>             --memory 1024 
>             --disk /data/kvm_images/centos7-vm1.qcow2,device=disk 
>             --disk /data/kvm_images/centos7-vm1.iso,device=cdrom 
>             --os-type linux 
>             --os-variant centos7.0 
>             --virt-type kvm 
>             --graphics none 
>             --network default 
>             --import
usage: virt-install --name NAME --memory MB STORAGE INSTALL [options]
virt-install: error: unrecognized arguments:                                                                                                                        
$

Looking at docs and general googling cant work out what is wrong. Ime running CentOS 7, virt-install 1.5.0.

$ ls -l /data/kvm_images
total 70584
-rw------- 1 qemu qemu 26847870976 May 11 00:06 centos7-docker.qcow2
-rw-r--r-- 1 root root      374784 May 11 14:35 centos7-vm1.iso
-rw-r--r-- 1 root root    68026368 May 11 14:02 centos7-vm1.qcow2
-rw-r--r-- 1 root root         104 May 11 14:33 centos7-vm1.setup.yaml
$

Here are what I did to get this far

The first thing I did was download the image

$ wget wget https://cloud.centos.org/centos/7/images/CentOS-7-ppc64le-GenericCloud-2003.qcow2

Then checked it seemed OK

$ qemu-img info CentOS-7-ppc64le-GenericCloud-2003.qcow2

image: CentOS-7-ppc64le-GenericCloud-2003.qcow2c
file format: qcow2
virtual size: 8.0G (8589934592 bytes)
disk size: 395M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false

Then I resized it to twenty-five GB

$ qemu-img resize CentOS-7-ppc64le-GenericCloud-2003.qcow2 25G

And used qemu-img convert

$ sudo qemu-img convert -f qcow2 -O qcow2 CentOS-7-ppc64le-GenericCloud-2003.qcow2 /data/kvm_images/centos7-vm1.qcow2

I then created a file centos7-vm1.setup.yaml

#cloud-config
password: xxxxxxxxxx
chpasswd: { expire: False }
ssh_pwauth: True
hostname: centos7-vm1

and run

$ sudo cloud-localds centos7-vm1.iso centos7-vm1.setup.yaml


Description


Sandro Bonazzola



2021-09-16 15:23:46 UTC

I couldn't find any documentation about these parameter being deprecated or dropped, assuming this is a bug.

Testing oVirt Node in automation we use a call:


  virt-install -d 
        --name "$name" 
        --boot menu=off 
        --memory $MAX_VM_MEM 
        --vcpus $MAX_VM_CPUS 
        --cpu host 
        --location "${CENTOS_INSTALLATION_SOURCE}" 
        --extra-args "inst.ks=file:///node-install.ks console=ttyS0 inst.sshd=1" 
        --initrd-inject $ksfile 
        --check disk_size=off,path_in_use=off 
        --graphics none 
        --noreboot 
        --wait -1 
        --os-variant rhel8.5 
        --noautoconsole 
        --rng /dev/urandom 
        --network network:${LIBVIRT_NETWORK},model=virtio  
        --disk path=$diskimg,bus=virtio,cache=unsafe,discard=unmap,format=qcow2 
        --disk path=$squashfs,readonly=on,device=disk,bus=virtio,serial=livesrc 
        > $logfile 2>&1 || die "virt-install failed"

which worked fine on CentOS Stream 8 but is now failing on CentOS Stream 9 with:


virt-install: error: unrecognized arguments: inst.sshd=1 console=ttyS0


Comment 1


Pavel Hrdina



2021-09-17 08:11:43 UTC

Hi, can you please provide the debug log as well? I've noticed that you already run the command with `-d`.


Comment 4


Jaroslav Suchanek



2021-10-05 11:08:24 UTC

Sandro, QE did not reproduce it. Could it be a params quoting problem?

If you still hit the problem, please provide versions of packages you used and debug log from the installation. Thanks.


Comment 5


Sandro Bonazzola



2022-02-24 07:39:31 UTC

It was indeed a quoting problem, sorry for the noise

Понравилась статья? Поделить с друзьями:
  • Veuillez executer le programme de lancement du jeu dirt2 exe как исправить
  • Vestel стиральная машина коды ошибок e01
  • Vesta error httpd restart failed
  • Verifyerror error 1014
  • Verify that you have access to that directory как исправить