{"id":1666,"date":"2026-04-20T13:47:29","date_gmt":"2026-04-20T11:47:29","guid":{"rendered":"https:\/\/merseli.com\/?p=1666"},"modified":"2026-04-20T14:11:55","modified_gmt":"2026-04-20T12:11:55","slug":"home-assistant-set-up-vm-wi-fi-connection-via-cli","status":"publish","type":"post","link":"https:\/\/merseli.com\/en\/2026\/04\/20\/home-assistant-set-up-vm-wi-fi-connection-via-cli\/","title":{"rendered":"Home Assistant set up VM Wi-Fi connection via CLI"},"content":{"rendered":"\n<p class=\"has-text-align-right\"><strong><em>2026-04-20 &#8211; Agron Merseli<\/em><\/strong><\/p>\n\n\n\n<p>Open Virtual Network Editor from VMware Workstation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1050\" height=\"715\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image.png\" alt=\"\" class=\"wp-image-1667\" style=\"aspect-ratio:2.2341353945892033;object-fit:contain\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image.png 1050w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-768x523.png 768w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-18x12.png 18w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-500x340.png 500w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-800x545.png 800w\" sizes=\"auto, (max-width: 1050px) 100vw, 1050px\" \/><\/figure>\n\n\n\n<p>Set up the network as bridged to the Wi-Fi card.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"678\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-1.png\" alt=\"\" class=\"wp-image-1668\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-1.png 707w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-1-13x12.png 13w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-1-500x479.png 500w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Enter the VM settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"550\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-2.png\" alt=\"\" class=\"wp-image-1672\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-2.png 671w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-2-15x12.png 15w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-2-500x410.png 500w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Select the virtual network.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"578\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-3.png\" alt=\"\" class=\"wp-image-1673\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-3.png 905w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-3-768x491.png 768w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-3-18x12.png 18w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-3-500x319.png 500w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-3-800x511.png 800w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Restart the machine.<\/p>\n\n\n\n<p>Check if the router has not give any ip address.<\/p>\n\n\n\n<p>Note the name of the network interface, in this case is enp2s0, this will not change also if you move the Vm to another machine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1196\" height=\"822\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-5.png\" alt=\"\" class=\"wp-image-1675\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-5.png 1196w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-5-768x528.png 768w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-5-18x12.png 18w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-5-500x344.png 500w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-5-800x550.png 800w\" sizes=\"auto, (max-width: 1196px) 100vw, 1196px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Now type the follow lines to permit to HA to connect to the existing Wi-Fi connection.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>network info<\/code><\/pre>\n\n\n\n<p>Check if network interface has no ip<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"798\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-7.png\" alt=\"\" class=\"wp-image-1677\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-7.png 646w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-7-10x12.png 10w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-7-500x618.png 500w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Now type the following command (remember to rename the interface)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>network update enp2s0 --ipv4-method auto --ipv6-method disabled<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"61\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-8.png\" alt=\"\" class=\"wp-image-1678\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-8.png 602w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-8-18x2.png 18w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-8-500x51.png 500w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This means the IPv6 is disabled you need only IPv4 set to auto that means DHCP.<\/p>\n\n\n\n<p>If you need to set up a fixed IP you need to set method static and set the ip address, using the highlighted commands.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1097\" height=\"798\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-9.png\" alt=\"\" class=\"wp-image-1679\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-9.png 1097w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-9-768x559.png 768w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-9-16x12.png 16w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-9-500x364.png 500w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-9-800x582.png 800w\" sizes=\"auto, (max-width: 1097px) 100vw, 1097px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p> Finally you have to set the Wi-Fi SSID and Wi-Fi password using the following command.<\/p>\n\n\n\n<p>Remember to change the network interface, name SSID and password.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>network update enp2s0 --wifi-auth wpa-psk --wifi-ssid WIFIXYZ123 --wifi-psk pwdwifi123<\/code><\/pre>\n\n\n\n<p>After that type <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exit<\/code><\/pre>\n\n\n\n<p>to return the the top of the CLI.<\/p>\n\n\n\n<p>And check ip the router has give a new ip address to the HA server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"525\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-10.png\" alt=\"\" class=\"wp-image-1680\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-10.png 590w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-10-13x12.png 13w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-10-500x445.png 500w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Finally you can enter the webserver running locally at the following address.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;homeassistant.local:8123<\/code><\/pre>\n\n\n\n<p>or, using the actual ip:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;192.168.X.Y:8123<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"786\" src=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-11.png\" alt=\"\" class=\"wp-image-1683\" srcset=\"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-11.png 352w, https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/image-11-5x12.png 5w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-align-right\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2026-04-20 &#8211; Agron Merseli Open Virtual Network Editor from VMware Workstation. Set up the network as bridged to the Wi-Fi card. Enter the VM settings. Select the virtual network. Restart the machine. Check if the router has not give any ip address. Note the name of the network interface, in this case is enp2s0, this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1684,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_vp_format_video_url":"","_vp_image_focal_point":[],"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[50],"tags":[],"class_list":["post-1666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/merseli.com\/wp-content\/uploads\/2026\/04\/ha-cli.jpg","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/posts\/1666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/comments?post=1666"}],"version-history":[{"count":10,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/posts\/1666\/revisions"}],"predecessor-version":[{"id":1698,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/posts\/1666\/revisions\/1698"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/media\/1684"}],"wp:attachment":[{"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/media?parent=1666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/categories?post=1666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merseli.com\/en\/wp-json\/wp\/v2\/tags?post=1666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}