{"id":1852,"date":"2025-08-15T10:37:37","date_gmt":"2025-08-15T01:37:37","guid":{"rendered":"https:\/\/www.typea.info\/blog\/?p=1852"},"modified":"2025-08-15T10:37:37","modified_gmt":"2025-08-15T01:37:37","slug":"ubuntu_multipass_vm_brideged_nw","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2025\/08\/15\/ubuntu_multipass_vm_brideged_nw\/","title":{"rendered":"Ubuntu Multipass VM\u306e\u30d6\u30ea\u30c3\u30b8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u624b\u9806"},"content":{"rendered":"<div class=\"container\">\n<h1>Multipass VM\u306e\u30d6\u30ea\u30c3\u30b8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u624b\u9806<\/h1>\n<p>Multipass\u3067\u4f5c\u6210\u3057\u305f\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u30db\u30b9\u30c8PC\u3068\u540c\u3058\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u624b\u9806\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u3001<a href=\"https:\/\/www.typea.info\/blog\/index.php\/2021\/03\/10\/create_ubuntu_multipass_kvm_bridge_network\/\">KVM\u3068\u3067\u3081\u3093\u3093\u3069\u3046\u306a\u624b\u9806\u3092\u8e0f\u3093\u3067\u69cb\u7bc9\u3057\u3066\u3044\u307e\u3057\u305f<\/a>\u304c\u3001\u304b\u306a\u308a\u7c21\u5358\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f(\u77e5\u3089\u306a\u304b\u3063\u305f\u3060\u3051\u304b\u3082)<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001VM\u306fLAN\u4e0a\u306e\u4ed6\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"warning\"><strong>\u6ce8\u610f:<\/strong> \u3053\u306e\u8a2d\u5b9a\u306f\u30db\u30b9\u30c8PC\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u305f\u3081\u3001\u30cd\u30c3\u30c8\u63a5\u7d9a\u304c\u9014\u5207\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u30ea\u30e2\u30fc\u30c8PC\u306b\u884c\u3046\u5834\u5408\u30013.\u30db\u30b9\u30c8PC\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u5fa9\u65e7\u3055\u305b\u308b\u624b\u9806\u306f\u3001\u7269\u7406PC\u306b\u5bfe\u3057\u3066\u5b9f\u65bd\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff01\uff01<\/div>\n<h2>1. \u65e2\u5b58\u306eVM\u3092\u524a\u9664\u3057\u3066\u65b0\u3057\u3044VM\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<p>\u65e2\u5b58\u306eVM\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u76f4\u63a5\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u4e00\u5ea6\u524a\u9664\u3057\u3066\u518d\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code># \u65e2\u5b58\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u505c\u6b62\nmultipass stop primary\n\n# \u65e2\u5b58\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u524a\u9664\nmultipass delete primary\n\n# \u5b8c\u5168\u306b\u6d88\u53bb\nmultipass purge\n\n# \u30d6\u30ea\u30c3\u30b8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u65b0\u3057\u3044\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\nmultipass launch --name ubuntu-vm --network [\u30db\u30b9\u30c8\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d]<\/code><\/pre>\n<p><code>[\u30db\u30b9\u30c8\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d]<\/code>\u306f\u3001<code>ip a<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u308b<code>eno1<\/code>\u3001<code>eth0<\/code>\u3001<code>enp1s0f1<\/code>\u306a\u3069\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30e1\u30e2\uff1a<\/p>\n<pre class=\"prittypring\">piroto@ubuntu-mouse:~$ multipass launch --memory 4G --disk 20G --cpus 2 --name ubuntu-vm --network enp1s0f1\nMultipass needs to create a bridge to connect to enp1s0f1.\nThis will temporarily disrupt connectivity on that interface.\n<\/pre>\n<h2>2. \u30db\u30b9\u30c8PC\u306e\u30d6\u30ea\u30c3\u30b8\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3092\u78ba\u8a8d\u3059\u308b<\/h2>\n<p>Multipass\u304c\u81ea\u52d5\u3067\u4f5c\u6210\u3057\u305f\u30d6\u30ea\u30c3\u30b8\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre><code>brctl show<\/code><\/pre>\n<p>\u51fa\u529b\u306b<code>br-enp1s0f1<\/code>\u306e\u3088\u3046\u306a<code>br-<\/code>\u3067\u59cb\u307e\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<h2>3. \u30db\u30b9\u30c8PC\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u5fa9\u65e7\u3055\u305b\u308b<\/h2>\n<p>Multipass\u304c\u30d6\u30ea\u30c3\u30b8\u3092\u4f5c\u6210\u3057\u305f\u3053\u3068\u3067\u3001\u30db\u30b9\u30c8PC\u304c\u5916\u90e8\u304b\u3089\u898b\u3048\u306a\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u4f5c\u6210\u3055\u308c\u305f\u30d6\u30ea\u30c3\u30b8\u306bIP\u30a2\u30c9\u30ec\u30b9\u3092\u5272\u308a\u5f53\u3066\u3066\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u5fa9\u65e7\u3055\u305b\u307e\u3059\u3002<\/p>\n<p><strong>\u6ce8\u610f:<\/strong>\u7269\u7406PC\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b(\u3082\u3057\u304f\u306f2\u7cfb\u7d71\u306e\u63a5\u7d9a\u3092\u4e8b\u524d\u306b\u6e96\u5099\u3057\u3066\u304a\u304f\u5fc5\u8981\u3042\u308a)<\/p>\n<h3>\u30d6\u30ea\u30c3\u30b8\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092DHCP\u3067\u8a2d\u5b9a\u3059\u308b<\/h3>\n<pre><code># br-enp1s0f1\u306f\u78ba\u8a8d\u3057\u305f\u30d6\u30ea\u30c3\u30b8\u540d\u306b\u7f6e\u304d\u63db\u3048\u308b\nsudo netplan set network.bridges.br-enp1s0f1.dhcp4=true\nsudo netplan apply<\/code><\/pre>\n<h3>\u30d6\u30ea\u30c3\u30b8\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u9759\u7684\u306b\u8a2d\u5b9a\u3059\u308b<\/h3>\n<pre><code># br-enp1s0f1\u306f\u78ba\u8a8d\u3057\u305f\u30d6\u30ea\u30c3\u30b8\u540d\u306b\u7f6e\u304d\u63db\u3048\u308b\nsudo netplan set network.bridges.br-enp1s0f1.dhcp4=false\nsudo netplan set network.bridges.br-enp1s0f1.addresses=[IP\u30a2\u30c9\u30ec\u30b9]\/[\u30b5\u30d6\u30cd\u30c3\u30c8\u30de\u30b9\u30af]\nsudo netplan set network.bridges.br-enp1s0f1.routes=[\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4]\nsudo netplan apply<\/code><\/pre>\n<h2>4. \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u4fee\u6b63\u3059\u308b<\/h2>\n<p><code>sudo netplan apply<\/code>\u5b9f\u884c\u6642\u306b\u300c\u30d5\u30a1\u30a4\u30eb\u304c\u30aa\u30fc\u30d7\u30f3\u3059\u304e\u308b\u300d\u3068\u3044\u3046\u8b66\u544a\u304c\u51fa\u305f\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre><code>sudo chmod 600 \/etc\/netplan\/[\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u540d].yaml<\/code><\/pre>\n<h2>5. \u63a5\u7d9a\u306e\u78ba\u8a8d<\/h2>\n<p>VM\u304c\u30db\u30b9\u30c8\u3068\u540c\u3058\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre><code>multipass list<\/code><\/pre>\n<p>VM\u306eIPv4\u30a2\u30c9\u30ec\u30b9\u304c\u30db\u30b9\u30c8\u3068\u540c\u3058\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30bb\u30b0\u30e1\u30f3\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n<p>\u00a0<\/p>\n<p>Mac\u304b\u3089\u3001Multipass\u4e0a\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u306bSSH\u63a5\u7d9a<\/p>\n<p>SSH\u63a5\u7d9a\u624b\u9806\u306b\u3082\u306f\u307e\u308a\u30dd\u30a4\u30f3\u30c8\u304c\u3044\u304f\u3064\u304b\u3042\u3063\u305f\u306e\u3067\u3001\u5225\u9014\u30e1\u30e2\u3059\u308b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"multipass_bridged_nw.png\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/2025\/08\/multipass_bridged_nw.png\" alt=\"Multipass bridged nw\" width=\"599\" height=\"365\" border=\"0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multipass VM\u306e\u30d6\u30ea\u30c3\u30b8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u624b\u9806 Multipass\u3067\u4f5c\u6210\u3057\u305f\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u30db\u30b9\u30c8PC\u3068\u540c\u3058\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u624b\u9806\u3092\u307e\u3068\u3081\u307e\u3059\u3002 \u4ee5\u524d\u3001KVM\u3068\u3067\u3081\u3093\u3093\u3069\u3046\u306a\u624b\u9806\u3092\u8e0f\u3093\u3067\u69cb\u7bc9\u3057\u3066\u3044\u307e\u3057\u305f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1851,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[],"tags":[145,148],"class_list":["post-1852","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-multipass","tag-ubuntu"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1852"}],"version-history":[{"count":1,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1852\/revisions"}],"predecessor-version":[{"id":1853,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1852\/revisions\/1853"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media\/1851"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}