Salt vcpus bug in 4.0rc1

55 views
Skip to first unread message

Sean Hunter

unread,
Sep 24, 2017, 7:23:13 AM9/24/17
to qubes...@googlegroups.com

Hi there,

I think changes to remove vcpu option etc from qvm-create in 4.0 haven't been synced into the saltstack modules yet.

If I create an x.top file like this

base:
  dom0:
  - x   

...and an x.sls file like this

x:
  qvm.present:
   - name: x
   - template: fedora-25
   - label: blue
   - mem: 4096
   - vcpus: 4
  

...and then try to create the vm by doing

$ sudo qubesctl top.enable x
$ sudo qubesctl state.highstate

...I get this error output, saying that it doesn't understand the vcpus option.

[ERROR   ] /usr/bin/qvm-check x 
====== stderr ======
/usr/bin/qvm-create --template fedora-25 --label blue --vcpus 4 x 
usage: qvm-create [-h] [--verbose] [--quiet] [--class CLS]
                  [--property NAME=VALUE] [--pool VOLUME_NAME=POOL_NAME]
                  [-P POOL_NAME] [--template VALUE] [--label VALUE]
                  [--help-classes]
                  [--root-copy-from FILENAME | --root-move-from FILENAME]
                  [VMNAME]
qvm-create: error: unrecognized arguments: --vcpus x
====== stderr ======
/usr/bin/qvm-check x 
usage: qvm-check [-h] [--verbose] [--quiet] [--all] [--exclude EXCLUDE]
                 [--running] [--paused] [--template]
                 [VMNAME [VMNAME ...]]
qvm-check: error: no such domain: 'x'
 [0;31mlocal: [0;0m
 [0;31m---------- [0;0m
     [0;31m      ID: x [0;0m
     [0;31mFunction: qvm.present [0;0m
     [0;31m  Result: False [0;0m
     [0;31m Comment: /usr/bin/qvm-check x 
              ====== stderr ======
              /usr/bin/qvm-create --template fedora-25 --label blue --vcpus 4 x 
              usage: qvm-create [-h] [--verbose] [--quiet] [--class CLS]
                                [--property NAME=VALUE] [--pool VOLUME_NAME=POOL_NAME]
                                [-P POOL_NAME] [--template VALUE] [--label VALUE]
                                [--help-classes]
                                [--root-copy-from FILENAME | --root-move-from FILENAME]
                                [VMNAME]
              qvm-create: error: unrecognized arguments: --vcpus x
              ====== stderr ======
              /usr/bin/qvm-check x 
              usage: qvm-check [-h] [--verbose] [--quiet] [--all] [--exclude EXCLUDE]
                               [--running] [--paused] [--template]
                               [VMNAME [VMNAME ...]]
              qvm-check: error: no such domain: 'x' None [0;0m
     [0;31m Started: 11:28:23.389119 [0;0m
     [0;31mDuration: 1446.122 ms [0;0m
 [0;31m     Changes:    [0;0m

...

Summary for local
------------ [0;0m
 [0;32mSucceeded: 7 [0;0m
 [0;31mFailed:    1 [0;0m
 [0;36m------------
Total states run:     8 [0;0m
 [0;36mTotal run time:   3.415 s [0;0m
DOM0 configuration failed, not continuing

Removing that line makes it work. I searched on github and the qubes-devel list but didn't find anything. Should I just go ahead and make a new bug on github? I may have a dig through the code to see if I can fix it myself, although I'm new to both qubes and salt, so not making any promises. :)

Cheers,

Sean

bug.md
signature.asc

Marek Marczykowski-Górecki

unread,
Sep 24, 2017, 10:34:31 AM9/24/17
to Sean Hunter, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Yes, please.

Also, take a look at qvm.vm wrapper:
https://github.com/QubesOS/qubes-mgmt-salt-dom0-qvm/blob/master/README.rst#qvm-vm

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJZx8JvAAoJENuP0xzK19csSEoH/0z9WtFexf25VIn6D0hgnugF
/ukc0sZx29apeU90Tl3gRyffNvEKv2PUL7viarYiThGLWXfhalAkNcJvcaJtZfa6
ybwZK9WtxlErrN9oOg1KLOSEjyHZYrIt3LyJcCcPstUSjNy+OF74duLA2x3YU0gU
cuWS/gCklry3Rg6CZUZ7AzNvRnuvc7IscAInEsWfHcv0ngmO6tBcab41QOkqff6G
ThSHfgpKrSWpyouiSSdElFDKZ/UPerj3dfaOq98BQxdsSm9lGsKBfoFP0/M83Vle
LykLXlWTcd2CmeaZUug2uJRzF+AEIjweG0x8VlcPvAKZ2/SKb35asMZtDVadGOI=
=QT++
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages