Errors generated when creating a Virtual Machine and Disk using Red Hat Enterprise Virtualization CLI (rhev-cli) commands.
Environment
- Red Hat Enterprise Virtualization 3.5
Issue
- Errors are generated when creating a new virtual machine using 'add vm' and a new virtual hard disk using 'add disk' rhev-cli commands in the rhevm-shell subsystem.
# add vm --name TEST-VM --template-name Blank --cluster-name TEST-CLUSTER --memory 2000000000 --cpu-topology-cores 2 --cpu-topology-sockets 1 --description 'MY TEST' --placement_policy-host-name TEST-HOSTNAME --placement_policy-affinity 'user_migratable' --type server --os-boot-dev network
ERROR: "network" is invalid segment at option "--os-boot-dev"
# add disk --vm-identifier TEST-VM --provisioned_size 36000000000 --interface virtio --format raw --bootable true --storage_domains-storage_domain TEST-STORAGE-DOMAIN
ERROR = "TEST-STORAGE-DOMAIN" is invalid segment at option "--storage_domains-storage_domain".
Resolution
-
The correct syntax for --os-boot parameter is --os-boot boot.dev=cd rom, hd or network
In this case the syntax should be --os-boot boot.dev=network -
The correct syntax for --storage_domains-storage_domain parameter is --storage_domains-storage_domain storage_domain.name=DataStorage name
In this case the syntax should be --storage_domains-storage_domain storage_domain.name=TEST-STORAGE-DOMAIN -
Refer to Red Hat Enterprise Virtualization CLI Technical Guide for addtional information.
Root Cause
- Incorrect syntax parameters specified for --os-boot for the 'add vm' and --storage_domains-storage_domain for the 'add disk'.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments