Home / Community / Blog

When you will try to use VirtualBox on Windows 11 you can notice that VM performance is very low.

One of the reason can be Windows Hypervisor-enforced Code Integrity (HVCI).

The easiest way to check if it active is via Settings > Update & Security > Windows Security > Device security > Core isolation details > Memory integrity.

To turn it off run cmd as privileged user:

bcdedit /set hypervisorlaunchtype off

and restart the system.

Be aware, that HVCI is turned on to improve system security - so turn if off only when you really need it.

The solution is similar as in Windows 7. To add a drive you have to type command (single line):

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" 
internalcommands createrawvmdk -filename 
"C:\Users\jaqb\SP900.vmdk" -rawdisk "\\.\PhysicalDrive1"

The VirutalBox also have to be run as privileged user (administrator).

I've upgraded Pi-hole do 4.0 version:

docker run -d --name pihole-4.0.0-1 \
           --dns 127.0.0.1 --dns 1.1.1.1 \
           -e ServerIP=192.168.1.28 -e DNS1=192.168.1.4 \
           -e WEBPASSWORD=secret \
           -p 8018:80 -p 53:53 -p 53:53/udp \
           --restart=unless-stopped \
           pihole/pihole:4.0.0-1

as you can see I use new name (pihole/pihole), set power policy and additional --dns option - it's necessary.

Last time I've to manually edit /etc/resolve.conf inside container - this is simple workaround.

To backup running QEMU/KVM machine I use script made by Daniel Berteaud. I've installed it in this way:

cd /usr/local/sbin/
wget "http://gitweb.firewall-services.com/?p=virt-backup;a=blob_plain;f=virt-backup;hb=HEAD" -O virt-backup-0.2.17-1.pl
ln -s virt-backup-0.2.17-1.pl virt-backup
chmod u+x virt-backup-0.2.17-1.pl

as you can see current version is 0.2.17-1

There is also a fork of virt-backup: github.com/vazhnov/virt-backup.pl - it's based on some earlier version.

Example command to backup centos-test machine (name shown by virsh list) to /mnt/backups directory.

virt-backup --action=dump --no-snapshot --compress --shutdown --shutdown-timeout=300 --vm=centos-test --backupdir=/mnt/backups

If you forgot to set-up power policy during container creation you can easy modify it:

docker update --restart=always my-container

you can check it:

docker@docker:~$ docker inspect my-container | grep -A3 "RestartPolicy"
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },

If you use ReadyNAS OS 6 you can install Pi-hole in Docker container:

docker run --name my-new-pi-hole \
     -e ServerIP=191.168.1.28 \
     -e DNS1=192.168.1.4 \
     -e WEBPASSWORD=secret \
     -d \
     -p 8080:80 -p 53:53 -p 53:53/udp \
     diginc/pi-hole

you don't have to run

docker pull diginc/pi-hole

it will be done automatic (or rather automagic).

As You can see I've set up several parameters:

  • run is command to docker to run container
  • --name my-new-pi-hole is name of container (optional)
  • -e means Environment Variable - it is to pass some options to container
    • ServerIP - it is IP that Pi-hole should use (mandatory)
    • DNS1 - IP of your DNS server (optional) - if you not provide it will use google's DNS
    • WEBPASSWORD (useful) - you will need it to login to administration portal
  • -d - tells to docker that this container should work in background
  • -p - is port redirection from your docker machine to port in container
    • 8080:80 (useful) - is redirection of 8080 port of your docker machine to port 80 in container
    • 53:53 (optional)- is redirection of 53 port of your docker machine to port 53 in container (not necessary in my case)
    • 53:53/udp (very useful) - is the same for UDP port - this is what we need to work
  • diginc/pi-hole - is of course name of image to run

Now you can use command

docker ps

to get some information about your container

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                            PORTS                                                          NAMES
891aeb2c127b        diginc/pi-hole      "/s6-init"          7 seconds ago       Up 2 seconds (health: starting)   0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp, 0.0.0.0:8080->80/tcp   my-new-pi-hole

as you can see status is health: starting, after some time it will change to healthy.

Now you can login to (192.168.1.28 is address of may docker machine) http://192.168.1.28:8080/admin/ to check that no one has used your server (Total queries 0).

Let's check if it works:

root@mynas:~# host jaqb.gda.pl 192.168.1.28
Using domain server:
Name: 192.168.1.28
Address: 192.168.1.28#53
Aliases:

jaqb.gda.pl has address 185.204.216.106
jaqb.gda.pl mail is handled by 0 mail.jaqb.gda.pl.

Yes!

Now it's enough to change default DNS in your LAN to your docker machine (in my case 192.168.1.28).

To list your hard drives you can use command:

wmic diskdrive list brief /format:list

...

I just found that I've wrote similar article some times ago:

I've tried to install virtual Linux on my second HDD (using optical bay adapter). To add physical drive you have to type command:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" \
internalcommands createrawvmdk -filename \
"C:\Users\jaqb\SP900.vmdk" -rawdisk "\\.\PhysicalDrive1"


(based on Using a raw disk as a VirtualBox drive in Windows 7 by Dan Fox) In my case I've to add full path to VBoxManage.

Then to install additional packages in CentOS 7 (using minimal installation) you have to manually enter full URL:

http://mirror.centos.org/centos/7/os/x86_64/

(How To Install CentOS 7 Via NetInstall)

I've tried to install virtual Linux on my second HDD (using optical bay adapter). To add physical drive you have to type command:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" \
internalcommands createrawvmdk -filename \
"C:\Users\jaqb\SP900.vmdk" -rawdisk "\\.\PhysicalDrive1"


(based on Using a raw disk as a VirtualBox drive in Windows 7 by Dan Fox) In my case I've to add full path to VBoxManage.

Then to install additional packages in CentOS 7 (using minimal installation) you have to manually enter full URL:

http://mirror.centos.org/centos/7/os/x86_64/

(How To Install CentOS 7 Via NetInstall)

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31