diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md
index 6d50176..d7a8abb 100644
--- a/DOCUMENTATION.md
+++ b/DOCUMENTATION.md
@@ -10,6 +10,12 @@ Please refer to the README file, all install steps are described.
Not refered in the install, but you can pipx for you install.
+# Networking
+
+Hype use OpenvSwicth for interface and network creation. Common ovs command use in case of debgug.
+DNSMask, provided by LXC, is used to create DHCP for Interface configuration.
+
+
# Storage
The server storage are in *{HYPE}/storage/*
@@ -99,3 +105,9 @@ SOLUTION 1 (on CLI): virsh reset VM_NAME
SOLUTION 2 (on CLI): virsh destroy VM_NAME (destroy the VM)
+
+
+ERROR: libvirt: Storage Driver error : Requested operation is not valid: storage pool 'iso' is not active
+
+SOLUTION (on CLI): pool = conn.storagePoolLookupByName('iso')
+ pool.undefine()
diff --git a/README.md b/README.md
index 7e08f65..d21adbc 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
- Now compatible with Windows Install, just take care to launch the driver before scanning disks.
- Screenshot and VM live edition (RAM and vCPU until Max declared) added
- Disk creation and resize
-
+- Nework management (add,del network and interfaces)
```mermaid
graph LR
@@ -15,7 +15,8 @@ Server[Server] <----> LXC((LXC))
-## Install requirements
+## Install requirements (Debian example
+For your safty you can also find the packages on pip or pipx
1 - Update and Install packages :
@@ -24,6 +25,8 @@ apt-get update -y -qq
apt-get install git lxc lxcfs lxc-templates qemu qemu-utils qemu-kvm virtinst bridge-utils virt-manager libvirt-daemon libvirt-daemon-system virt-viewer libvirt-clients libosinfo-bin websockify sqlite3 novnc
apt-get install python3 python3-flask python3-flask-login python3-flask-sqlalchemy python3-requests python3-lxc python3-libvirt python3-psutil python3-werkzeug python3-websockify python3-novnc python3-flask-socketio python3-types-pyopenssl
+apt-get install openvswitch-switch openvswitch-common
+
```
Clone the repository :
@@ -222,7 +225,6 @@ systemctl start hype.service
You can also change some configuration in the file *configuration.py* such as flask port, storage location...use it at your own risk.
-
## Others
You can upload ISO directly from the interface.
diff --git a/functions/fnet.py b/functions/fnet.py
index f6fec25..e3262e8 100644
--- a/functions/fnet.py
+++ b/functions/fnet.py
@@ -44,18 +44,28 @@ def get_int(net_name):
def create_vswitch_int(net_int):
cmd="ovs-vsctl add-br "+net_int
- subprocess.call(cmd, shell=True)
+ out = subprocess.call(cmd, shell=True)
+ if out2 != 0:
+ raise Exception("Error on creating interface")
+
def delete_network(net_name,net_int):
cmd = "ovs-vsctl del-br "+net_int
- subprocess.call(cmd, shell=True)
- network = conn.networkLookupByName(net_name) #Lapin
+ out = subprocess.call(cmd, shell=True)
+ if out != 0:
+ raise Exception("Error deleting interface")
+ network = conn.networkLookupByName(net_name)
network.destroy()
network.undefine()
cmd2="kill $(cat /run/dhypecp_"+net_int+".pid)"
- subprocess.call(cmd2, shell=True)
+ out2 = subprocess.call(cmd2, shell=True)
+ if out2 != 0:
+ raise Exception("Error on killing DHCP process")
cmd3="rm -f /run/dhypecp_"+net_int+".pid"
- subprocess.call(cmd3, shell=True)
+ out3 = subprocess.call(cmd3, shell=True)
+ if out3 != 0:
+ raise Exception("Error on Deleting DHCP process")
+
def create_network(net_name,net_int):
create_vswitch_int(net_int)
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..1387f44
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,4 @@
+flask
+flask_sqlalchemy
+flask_login
+pyopenssl
diff --git a/templates/edit.html b/templates/edit.html
index b09fa99..9268962 100644
--- a/templates/edit.html
+++ b/templates/edit.html
@@ -34,7 +34,7 @@
Changing vCPU and/or Memory will restart {{ vm_name }}