diff options
author | Manuel Bentele | 2021-07-30 15:41:37 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-07-30 15:41:37 +0200 |
commit | 4ac4c4ce4abdf7a20285dce9260e3364c14fff3f (patch) | |
tree | 358125b125671938ceae53bcfcca8f8a04dfbd44 /src | |
parent | Remove the SDL graphics in the Libvirt XML domain representation (diff) | |
download | master-sync-shared-4ac4c4ce4abdf7a20285dce9260e3364c14fff3f.tar.gz master-sync-shared-4ac4c4ce4abdf7a20285dce9260e3364c14fff3f.tar.xz master-sync-shared-4ac4c4ce4abdf7a20285dce9260e3364c14fff3f.zip |
[qemu] Do not remove boot order and network interfaces for VM edit
Diffstat (limited to 'src')
2 files changed, 6 insertions, 8 deletions
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java index b4bc0ba..bb99eb5 100644 --- a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java +++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java @@ -355,11 +355,6 @@ public class VirtualizationConfigurationQemu extends @Override public void transformEditable() throws VirtualizationConfigurationException { - // removes all specified boot order entries - this.vmConfig.removeBootOrder(); - - // removes all source networks of all specified network interfaces - this.vmConfig.removeInterfaceDevicesSource(); } @Override @@ -428,7 +423,9 @@ public class VirtualizationConfigurationQemu extends @Override public boolean addDefaultNat() { - return this.addEthernet( EtherType.NAT ); + // since network interface was not filtered during VM upload, + // do not add or configure any network interface here + return true; } @Override diff --git a/src/test/resources/libvirt/xml/qemu-kvm_default-ubuntu-20-04-vm_transform-editable.xml b/src/test/resources/libvirt/xml/qemu-kvm_default-ubuntu-20-04-vm_transform-editable.xml index ca09cf6..aaaee23 100644 --- a/src/test/resources/libvirt/xml/qemu-kvm_default-ubuntu-20-04-vm_transform-editable.xml +++ b/src/test/resources/libvirt/xml/qemu-kvm_default-ubuntu-20-04-vm_transform-editable.xml @@ -13,6 +13,7 @@ <vcpu placement="static">1</vcpu> <os> <type arch="x86_64" machine="pc-q35-5.1">hvm</type> + <boot dev="hd"/> </os> <features> <acpi/> @@ -109,9 +110,9 @@ <address bus="0x06" domain="0x0000" function="0x0" slot="0x00" type="pci"/> </controller> <controller index="0" type="fdc"/> - <interface type="bridge"> + <interface type="network"> <mac address="52:54:00:0d:90:0c"/> - <source bridge=""/> + <source network="default"/> <model type="virtio"/> <address bus="0x01" domain="0x0000" function="0x0" slot="0x00" type="pci"/> </interface> |