From b73fc3ee9de26c05e93d0dcccc4f622685f43672 Mon Sep 17 00:00:00 2001 From: karmab Date: Tue, 1 Oct 2024 18:10:09 +0200 Subject: [PATCH] kvm: remove kernel and initrd parameters --- docs/index.md | 2 - docs/index.rst | 2 - kvirt/baseconfig.py | 4 -- kvirt/config.py | 11 ++-- kvirt/defaults.py | 2 - kvirt/providers/aws/__init__.py | 2 +- kvirt/providers/azure/__init__.py | 7 ++- kvirt/providers/gcp/__init__.py | 6 +-- kvirt/providers/ibm/__init__.py | 6 +-- kvirt/providers/kubevirt/__init__.py | 6 +-- kvirt/providers/kvm/__init__.py | 78 +-------------------------- kvirt/providers/openstack/__init__.py | 7 ++- kvirt/providers/ovirt/__init__.py | 7 ++- kvirt/providers/packet/__init__.py | 6 +-- kvirt/providers/proxmox/__init__.py | 2 - kvirt/providers/sampleprovider.py | 4 +- kvirt/providers/vsphere/__init__.py | 4 +- kvirt/providers/web/__init__.py | 8 +-- 18 files changed, 35 insertions(+), 129 deletions(-) diff --git a/docs/index.md b/docs/index.md index fbdb209a6..d073433c2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1571,8 +1571,6 @@ parameters: |*sharedfolders*|[]|List of paths to share between hypervisor and vm. You will also need to make sure that the path is accessible as qemu user (typically with id 107) and use an hypervisor and a guest with 9p support (centos/rhel lack it for instance)| |*yamlinventory*|false|Ansible generated inventory for single vms or for plans containing ansible entries will be yaml based.| |*autostart*|false|Autostarts vm (Libvirt specific)| -|*kernel*|None|Kernel location to pass to the vm. Needs to be local to the hypervisor| -|*initrd*|None|Initrd location to pass to the vm. Needs to be local to the hypervisor| |*cmdline*|None|Cmdline to pass to the vm| |*pcidevices*|[]|array of pcidevices to passthrough to the first worker only. Check [here](https://github.com/karmab/kcli-plan-samples/blob/main/pcipassthrough/pci.yml) for an example| |*tpm*|false|Enables a TPM device in the vm, using emulator mode. Requires swtpm in the host| diff --git a/docs/index.rst b/docs/index.rst index 2c3d40493..d145a2ca4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1688,8 +1688,6 @@ Parameter Default Value Comments *sharedfolders* [] List of paths to share between hypervisor and vm. You will also need to make sure that the path is accessible as qemu user (typically with id 107) and use an hypervisor and a guest with 9p support (centos/rhel lack it for instance) *yamlinventory* false Ansible generated inventory for single vms or for plans containing ansible entries will be yaml based. *autostart* false Autostarts vm (Libvirt specific) -*kernel* None Kernel location to pass to the vm. Needs to be local to the hypervisor -*initrd* None Initrd location to pass to the vm. Needs to be local to the hypervisor *cmdline* None Cmdline to pass to the vm *pcidevices* [] array of pcidevices to passthrough to the first worker only. Check `here `__ for an example *tpm* false Enables a TPM device in the vm, using emulator mode. Requires swtpm in the host diff --git a/kvirt/baseconfig.py b/kvirt/baseconfig.py index 41791bec4..5a53a274d 100644 --- a/kvirt/baseconfig.py +++ b/kvirt/baseconfig.py @@ -188,8 +188,6 @@ def __init__(self, client=None, containerclient=None, debug=False, quiet=False, defaults['mailfrom'] = default.get('mailfrom', kdefaults.MAILFROM) defaults['mailto'] = default.get('mailto', kdefaults.MAILTO) defaults['sharedfolders'] = default.get('sharedfolders', kdefaults.SHAREDFOLDERS) - defaults['kernel'] = default.get('kernel', kdefaults.KERNEL) - defaults['initrd'] = default.get('initrd', kdefaults.INITRD) defaults['cmdline'] = default.get('cmdline', kdefaults.CMDLINE) defaults['placement'] = default.get('placement', kdefaults.PLACEMENT) defaults['cpuhotplug'] = bool(default.get('cpuhotplug', kdefaults.CPUHOTPLUG)) @@ -423,8 +421,6 @@ def __init__(self, client=None, containerclient=None, debug=False, quiet=False, self.mailserver = options.get('mailserver') self.mailfrom = options.get('mailfrom') self.mailto = options.get('mailto') - self.kernel = options.get('kernel') - self.initrd = options.get('initrd') self.cmdline = options.get('cmdline') self.placement = options.get('placement') self.cpuhotplug = options.get('cpuhotplug') diff --git a/kvirt/config.py b/kvirt/config.py index ea1ab7987..8632a1d53 100644 --- a/kvirt/config.py +++ b/kvirt/config.py @@ -587,8 +587,6 @@ def create_vm(self, name, profile=None, overrides={}, customprofile={}, k=None, default_pushbullettoken = father.get('pushbullettoken', self.pushbullettoken) default_slacktoken = father.get('slacktoken', self.slacktoken) default_sharedfolders = father.get('sharedfolders', self.sharedfolders) - default_kernel = father.get('kernel', self.kernel) - default_initrd = father.get('initrd', self.initrd) default_cmdline = father.get('cmdline', self.cmdline) default_placement = father.get('placement', self.placement) default_cpuhotplug = father.get('cpuhotplug', self.cpuhotplug) @@ -696,8 +694,6 @@ def create_vm(self, name, profile=None, overrides={}, customprofile={}, k=None, mailfrom = profile.get('mailfrom', default_mailfrom) mailto = profile.get('mailto', default_mailto) sharedfolders = profile.get('sharedfolders', default_sharedfolders) - kernel = profile.get('kernel', default_kernel) - initrd = profile.get('initrd', default_initrd) cmdline = profile.get('cmdline', default_cmdline) placement = profile.get('placement', default_placement) cpuhotplug = profile.get('cpuhotplug', default_cpuhotplug) @@ -981,10 +977,9 @@ def create_vm(self, name, profile=None, overrides={}, customprofile={}, k=None, start=bool(start), keys=keys, cmds=cmds, ips=ips, netmasks=netmasks, gateway=gateway, dns=dns, domain=domain, nested=bool(nested), tunnel=tunnel, files=files, enableroot=enableroot, overrides=overrides, tags=tags, storemetadata=storemetadata, - sharedfolders=sharedfolders, kernel=kernel, initrd=initrd, cmdline=cmdline, - placement=placement, autostart=autostart, cpuhotplug=cpuhotplug, memoryhotplug=memoryhotplug, - pcidevices=pcidevices, tpm=tpm, rng=rng, metadata=metadata, securitygroups=securitygroups, - vmuser=vmuser, guestagent=guestagent) + sharedfolders=sharedfolders, cmdline=cmdline, placement=placement, autostart=autostart, + cpuhotplug=cpuhotplug, memoryhotplug=memoryhotplug, pcidevices=pcidevices, tpm=tpm, rng=rng, + metadata=metadata, securitygroups=securitygroups, vmuser=vmuser, guestagent=guestagent) if result['result'] != 'success': return result if reservedns and dnsclient is not None and domain is not None: diff --git a/kvirt/defaults.py b/kvirt/defaults.py index 5ae2a35fd..610dfb862 100644 --- a/kvirt/defaults.py +++ b/kvirt/defaults.py @@ -133,8 +133,6 @@ SLACKCHANNEL = None NOTIFYMETHODS = ['pushbullet'] SHAREDFOLDERS = [] -KERNEL = None -INITRD = None CMDLINE = None PLACEMENT = [] YAMLINVENTORY = False diff --git a/kvirt/providers/aws/__init__.py b/kvirt/providers/aws/__init__.py index bfdddd33f..7b52b0d38 100644 --- a/kvirt/providers/aws/__init__.py +++ b/kvirt/providers/aws/__init__.py @@ -106,7 +106,7 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, tags=[], storemetadata=False, - sharedfolders=[], kernel=None, initrd=None, cmdline=None, placement=[], autostart=False, + sharedfolders=[], cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): conn = self.conn diff --git a/kvirt/providers/azure/__init__.py b/kvirt/providers/azure/__init__.py index d93290af1..95617251a 100644 --- a/kvirt/providers/azure/__init__.py +++ b/kvirt/providers/azure/__init__.py @@ -96,10 +96,9 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu disks=[{'size': 10}], disksize=10, diskthin=True, diskinterface='virtio', nets=['default'], iso=None, vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, - files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], kernel=None, - initrd=None, cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, - numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], - vmuser=None, guestagent=True): + files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], cmdline=None, + placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], + pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): if self.exists(name): return {'result': 'failure', 'reason': f"VM {name} already exists"} if flavor is None: diff --git a/kvirt/providers/gcp/__init__.py b/kvirt/providers/gcp/__init__.py index 87301e255..9e897cb3e 100644 --- a/kvirt/providers/gcp/__init__.py +++ b/kvirt/providers/gcp/__init__.py @@ -118,9 +118,9 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, tags=[], storemetadata=False, - sharedfolders=[], kernel=None, initrd=None, cmdline=None, placement=[], autostart=False, - cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, - metadata={}, securitygroups=[], vmuser=None, guestagent=True): + sharedfolders=[], cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, + numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], + vmuser=None, guestagent=True): conn = self.conn project = self.project region = self.region diff --git a/kvirt/providers/ibm/__init__.py b/kvirt/providers/ibm/__init__.py index 70dc02100..465307da8 100644 --- a/kvirt/providers/ibm/__init__.py +++ b/kvirt/providers/ibm/__init__.py @@ -112,9 +112,9 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, - tags=[], storemetadata=False, sharedfolders=[], kernel=None, initrd=None, cmdline=None, - cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, - placement=[], autostart=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): + tags=[], storemetadata=False, sharedfolders=[], cmdline=None, cpuhotplug=False, memoryhotplug=False, + numamode=None, numa=[], pcidevices=[], tpm=False, placement=[], autostart=False, rng=False, metadata={}, + securitygroups=[], vmuser=None, guestagent=True): try: vpcs = self.conn.list_vpcs().result['vpcs'] for vpc in vpcs: diff --git a/kvirt/providers/kubevirt/__init__.py b/kvirt/providers/kubevirt/__init__.py index e43d56354..e3ad804b9 100644 --- a/kvirt/providers/kubevirt/__init__.py +++ b/kvirt/providers/kubevirt/__init__.py @@ -105,9 +105,9 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, tags=[], storemetadata=False, - sharedfolders=[], kernel=None, initrd=None, cmdline=None, placement=[], autostart=False, - cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, - metadata={}, securitygroups=[], vmuser=None, guestagent=True): + sharedfolders=[], cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, + numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], + vmuser=None, guestagent=True): kubectl = self.kubectl owners = [] container_disk = overrides.get('container_disk', False) diff --git a/kvirt/providers/kvm/__init__.py b/kvirt/providers/kvm/__init__.py index 2ada32bf6..058ab6860 100644 --- a/kvirt/providers/kvm/__init__.py +++ b/kvirt/providers/kvm/__init__.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- from getpass import getuser -# from urllib.request import urlopen, urlretrieve -from urllib.request import urlopen from kvirt.defaults import IMAGES from kvirt.defaults import UBUNTUS, METADATA_FIELDS from kvirt import common @@ -216,7 +214,7 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt' vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], - kernel=None, initrd=None, cmdline=None, placement=[], autostart=False, cpuhotplug=False, + cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): bootdev = 1 @@ -1154,77 +1152,6 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt' foldercmd = 'ssh %s -p %s %s@%s "test -d %s || (%s)"' % (self.identitycommand, self.port, self.user, self.host, folder, foldercmd) code = os.system(foldercmd) - kernelxml = "" - if kernel is not None: - existing_kernel = os.path.basename(kernel) in [os.path.basename(v) for v in self.volumes()] - locationdir = os.path.basename(kernel) - locationdir = f"{default_poolpath}/{locationdir}" - if existing_kernel: - pass - elif self.host == 'localhost' or self.host == '127.0.0.1': - os.mkdir(locationdir) - elif self.protocol == 'ssh': - locationcmd = 'ssh %s -p %s %s@%s "mkdir %s"' % (self.identitycommand, self.port, self.user, - self.host, locationdir) - code = os.system(locationcmd) - else: - return {'result': 'failure', 'reason': "Couldn't create dir to hold kernel and initrd"} - if kernel.startswith('http') or kernel.startswith('ftp'): - if existing_kernel: - pass - elif 'rhcos' in kernel: - if self.host == 'localhost' or self.host == '127.0.0.1': - kernelcmd = f"curl -Lo {locationdir}/vmlinuz -f '{kernel}'" - initrdcmd = f"curl -Lo {locationdir}/initrd.img -f '{initrd}'" - elif self.protocol == 'ssh': - kernelcmd = 'ssh %s -p %s %s@%s "curl -Lo %s/vmlinuz -f \'%s\'"' % (self.identitycommand, - self.port, self.user, - self.host, locationdir, - kernel) - initrdcmd = 'ssh %s -p %s %s@%s "curl -Lo %s/initrd.img -f \'%s\'"' % (self.identitycommand, - self.port, self.user, - self.host, locationdir, - initrd) - code = os.system(kernelcmd) - code = os.system(initrdcmd) - else: - try: - location = urlopen(kernel).readlines() - except Exception as e: - return {'result': 'failure', 'reason': e} - for line in location: - if 'init' in str(line): - p = re.compile(r'.*\1.*') - m = p.match(str(line)) - if m is not None and initrd is None: - initrdfile = m.group(1) - initrdurl = f"{kernel}/{initrdfile}" - initrd = f"{locationdir}/initrd" - if self.host == 'localhost' or self.host == '127.0.0.1': - initrdcmd = f"curl -Lo {initrd} -f '{initrdurl}'" - elif self.protocol == 'ssh': - initrdcmd = 'ssh %s -p %s %s@%s "curl -Lo %s -f \'%s\'"' % (self.identitycommand, - self.port, self.user, - self.host, initrd, - initrdurl) - code = os.system(initrdcmd) - kernelurl = f'{kernel}/vmlinuz' - kernel = f"{locationdir}/vmlinuz" - if self.host == 'localhost' or self.host == '127.0.0.1': - kernelcmd = f"curl -Lo {kernel} -f '{kernelurl}'" - elif self.protocol == 'ssh': - kernelcmd = 'ssh %s -p %s %s@%s "curl -Lo %s -f \'%s\'"' % (self.identitycommand, - self.port, self.user, self.host, - kernel, kernelurl) - code = os.system(kernelcmd) - elif initrd is None: - return {'result': 'failure', 'reason': "Missing initrd"} - warning("kernel and initrd will only be available during first boot") - kernel = f"{locationdir}/vmlinuz" - initrd = f"{locationdir}/initrd.img" - kernelxml = f"{kernel}{initrd}" - if cmdline is not None: - kernelxml += f"{cmdline}" memoryhotplugxml = "1524288" if memoryhotplug else "" videoxml = "" firmwarexml = "" @@ -1340,7 +1267,6 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt' {ramxml} {firmwarexml} {bootxml} -{kernelxml} @@ -1379,7 +1305,7 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt' """.format(virttype=virttype, namespace=namespace, name=name, uuidxml=uuidxml, metadataxml=metadataxml, memoryhotplugxml=memoryhotplugxml, cpupinningxml=cpupinningxml, numatunexml=numatunexml, hugepagesxml=hugepagesxml, memory=memory, vcpuxml=vcpuxml, osfirmware=osfirmware, arch=arch, - machine=machine, ramxml=ramxml, firmwarexml=firmwarexml, bootxml=bootxml, kernelxml=kernelxml, + machine=machine, ramxml=ramxml, firmwarexml=firmwarexml, bootxml=bootxml, smmxml=smmxml, emulatorxml=emulatorxml, disksxml=disksxml, busxml=busxml, netxml=netxml, isoxml=isoxml, extraisoxml=extraisoxml, floppyxml=floppyxml, displayxml=displayxml, serialxml=serialxml, sharedxml=sharedxml, guestxml=guestxml, videoxml=videoxml, diff --git a/kvirt/providers/openstack/__init__.py b/kvirt/providers/openstack/__init__.py index a45e1b583..d1f925d90 100644 --- a/kvirt/providers/openstack/__init__.py +++ b/kvirt/providers/openstack/__init__.py @@ -80,10 +80,9 @@ def create(self, name, virttype=None, profile='', plan='kvirt', flavor=None, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, - tags=[], storemetadata=False, sharedfolders=[], kernel=None, initrd=None, - cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, - numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, - guestagent=True): + tags=[], storemetadata=False, sharedfolders=[], cmdline=None, placement=[], autostart=False, + cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, + metadata={}, securitygroups=[], vmuser=None, guestagent=True): default_diskinterface = diskinterface glance = self.glance nova = self.nova diff --git a/kvirt/providers/ovirt/__init__.py b/kvirt/providers/ovirt/__init__.py index 3d0472eaf..5c47308cf 100644 --- a/kvirt/providers/ovirt/__init__.py +++ b/kvirt/providers/ovirt/__init__.py @@ -105,10 +105,9 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, - tags=[], storemetadata=False, sharedfolders=[], kernel=None, initrd=None, - cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, - numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, - guestagent=True): + tags=[], storemetadata=False, sharedfolders=[], cmdline=None, placement=[], autostart=False, + cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, + metadata={}, securitygroups=[], vmuser=None, guestagent=True): ip = None initialization = None memory = memory * 1024 * 1024 diff --git a/kvirt/providers/packet/__init__.py b/kvirt/providers/packet/__init__.py index b51dda62b..a5c01d4ac 100644 --- a/kvirt/providers/packet/__init__.py +++ b/kvirt/providers/packet/__init__.py @@ -62,9 +62,9 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, files=[], enableroot=True, alias=[], overrides={}, - tags=[], storemetadata=False, sharedfolders=[], kernel=None, initrd=None, - cmdline=None, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, - placement=[], autostart=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): + tags=[], storemetadata=False, sharedfolders=[], cmdline=None, cpuhotplug=False, memoryhotplug=False, + numamode=None, numa=[], pcidevices=[], tpm=False, placement=[], autostart=False, rng=False, metadata={}, + securitygroups=[], vmuser=None, guestagent=True): reservation_id = overrides.get('hardware_reservation_id') if reservation_id is not None: reservations = self.conn.list_hardware_reservations(self.project) diff --git a/kvirt/providers/proxmox/__init__.py b/kvirt/providers/proxmox/__init__.py index f17d9bdad..5283ecd0f 100644 --- a/kvirt/providers/proxmox/__init__.py +++ b/kvirt/providers/proxmox/__init__.py @@ -410,8 +410,6 @@ def create( tags=[], storemetadata=False, sharedfolders=[], - kernel=None, - initrd=None, cmdline=None, placement=[], autostart=False, diff --git a/kvirt/providers/sampleprovider.py b/kvirt/providers/sampleprovider.py index 5b871cde9..e50e15b5c 100644 --- a/kvirt/providers/sampleprovider.py +++ b/kvirt/providers/sampleprovider.py @@ -36,8 +36,8 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu disks=[{'size': 10}], disksize=10, diskthin=True, diskinterface='virtio', nets=['default'], iso=None, vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, - files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], kernel=None, - initrd=None, cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, + files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], + cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): print("not implemented") diff --git a/kvirt/providers/vsphere/__init__.py b/kvirt/providers/vsphere/__init__.py index ba2a2fc98..69da12229 100644 --- a/kvirt/providers/vsphere/__init__.py +++ b/kvirt/providers/vsphere/__init__.py @@ -144,8 +144,8 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt' disks=[{'size': 10}], disksize=10, diskthin=True, diskinterface='virtio', nets=['default'], iso=None, vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, - files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], kernel=None, - initrd=None, cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, + files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], + cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): dc = self.dc diff --git a/kvirt/providers/web/__init__.py b/kvirt/providers/web/__init__.py index 9bcf4768c..8ce2d3638 100644 --- a/kvirt/providers/web/__init__.py +++ b/kvirt/providers/web/__init__.py @@ -42,8 +42,8 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu disks=[{'size': 10}], disksize=10, diskthin=True, diskinterface='virtio', nets=['default'], iso=None, vnc=True, cloudinit=True, reserveip=False, reservedns=False, reservehost=False, start=True, keys=[], cmds=[], ips=None, netmasks=None, gateway=None, nested=True, dns=None, domain=None, tunnel=False, - files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], kernel=None, - initrd=None, cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, + files=[], enableroot=True, overrides={}, tags=[], storemetadata=False, sharedfolders=[], + cmdline=None, placement=[], autostart=False, cpuhotplug=False, memoryhotplug=False, numamode=None, numa=[], pcidevices=[], tpm=False, rng=False, metadata={}, securitygroups=[], vmuser=None, guestagent=True): vms_url = f"{self.base}/vms" @@ -52,8 +52,8 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu memory, guestid, pool, image, disks, disksize, diskthin, diskinterface, nets, iso, vnc, cloudinit, reserveip, reservedns, reservehost, start, keys, cmds, ips, netmasks, gateway, nested, dns, domain, tunnel, - files, enableroot, overrides, tags, storemetadata, sharedfolders, kernel, - initrd, cmdline, placement, autostart, cpuhotplug, memoryhotplug, + files, enableroot, overrides, tags, storemetadata, sharedfolders, + cmdline, placement, autostart, cpuhotplug, memoryhotplug, numamode, numa, pcidevices, tpm, rng, metadata, securitygroups, vmuser).arguments) del data['self'] data = json.dumps(data).encode('utf-8')